@azure/arm-databricks 0.1.0 → 3.0.0-alpha.20211103.2
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 +26 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +71 -77
- package/dist/index.js +3186 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/azureDatabricksManagementClient.d.ts +20 -0
- package/dist-esm/src/azureDatabricksManagementClient.d.ts.map +1 -0
- package/dist-esm/src/azureDatabricksManagementClient.js +27 -0
- package/dist-esm/src/azureDatabricksManagementClient.js.map +1 -0
- package/dist-esm/src/azureDatabricksManagementClientContext.d.ts +16 -0
- package/dist-esm/src/azureDatabricksManagementClientContext.d.ts.map +1 -0
- package/dist-esm/src/azureDatabricksManagementClientContext.js +49 -0
- package/dist-esm/src/azureDatabricksManagementClientContext.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +839 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +94 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +44 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +1298 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +17 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +149 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +7 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +14 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.d.ts +22 -0
- package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.d.ts.map +1 -0
- package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.js +65 -0
- package/dist-esm/src/operations/outboundNetworkDependenciesEndpoints.js.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +81 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +347 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +46 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +169 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operations/vNetPeering.d.ts +81 -0
- package/dist-esm/src/operations/vNetPeering.d.ts.map +1 -0
- package/dist-esm/src/operations/vNetPeering.js +338 -0
- package/dist-esm/src/operations/vNetPeering.js.map +1 -0
- package/dist-esm/src/operations/workspaces.d.ts +107 -0
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operations/workspaces.js +500 -0
- package/dist-esm/src/operations/workspaces.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +7 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +14 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.d.ts +14 -0
- package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.js +9 -0
- package/dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +21 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/vNetPeering.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/vNetPeering.js +9 -0
- package/dist-esm/src/operationsInterfaces/vNetPeering.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js.map +1 -0
- package/dist-esm/test/databricks_examples.d.ts +2 -0
- package/dist-esm/test/databricks_examples.d.ts.map +1 -0
- package/dist-esm/test/databricks_examples.js +100 -0
- package/dist-esm/test/databricks_examples.js.map +1 -0
- package/package.json +72 -25
- package/review/arm-databricks.api.md +742 -0
- package/rollup.config.js +184 -27
- package/src/azureDatabricksManagementClient.ts +58 -0
- package/src/azureDatabricksManagementClientContext.ts +70 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +960 -0
- package/src/models/mappers.ts +1368 -0
- package/src/models/parameters.ts +174 -0
- package/src/operations/index.ts +14 -0
- package/src/operations/operations.ts +137 -0
- package/src/operations/outboundNetworkDependenciesEndpoints.ts +85 -0
- package/src/operations/privateEndpointConnections.ts +481 -0
- package/src/operations/privateLinkResources.ts +221 -0
- package/src/operations/vNetPeering.ts +483 -0
- package/src/operations/workspaces.ts +674 -0
- package/src/operationsInterfaces/index.ts +14 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.ts +29 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +109 -0
- package/src/operationsInterfaces/privateLinkResources.ts +44 -0
- package/src/operationsInterfaces/vNetPeering.ts +109 -0
- package/src/operationsInterfaces/workspaces.ts +139 -0
- package/tsconfig.json +4 -4
- package/types/arm-databricks.d.ts +1198 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-databricks.js +0 -1078
- package/dist/arm-databricks.js.map +0 -1
- package/dist/arm-databricks.min.js +0 -1
- package/dist/arm-databricks.min.js.map +0 -1
- package/esm/databricksClient.d.ts +0 -19
- package/esm/databricksClient.d.ts.map +0 -1
- package/esm/databricksClient.js +0 -34
- package/esm/databricksClient.js.map +0 -1
- package/esm/databricksClientContext.d.ts +0 -16
- package/esm/databricksClientContext.d.ts.map +0 -1
- package/esm/databricksClientContext.js +0 -56
- package/esm/databricksClientContext.js.map +0 -1
- package/esm/models/index.d.ts +0 -486
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -17
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js +0 -370
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -11
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -8
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -80
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/workspacesMappers.d.ts +0 -2
- package/esm/models/workspacesMappers.d.ts.map +0 -1
- package/esm/models/workspacesMappers.js +0 -11
- package/esm/models/workspacesMappers.js.map +0 -1
- package/esm/operations/index.d.ts +0 -3
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js +0 -12
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -77
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/workspaces.d.ts +0 -156
- package/esm/operations/workspaces.d.ts.map +0 -1
- package/esm/operations/workspaces.js +0 -332
- package/esm/operations/workspaces.js.map +0 -1
- package/lib/databricksClient.ts +0 -44
- package/lib/databricksClientContext.ts +0 -62
- package/lib/models/index.ts +0 -520
- package/lib/models/mappers.ts +0 -396
- package/lib/models/operationsMappers.ts +0 -19
- package/lib/models/parameters.ts +0 -82
- package/lib/models/workspacesMappers.ts +0 -24
- package/lib/operations/index.ts +0 -12
- package/lib/operations/operations.ts +0 -123
- package/lib/operations/workspaces.ts +0 -474
|
@@ -0,0 +1,483 @@
|
|
|
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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { VNetPeering } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { AzureDatabricksManagementClientContext } from "../azureDatabricksManagementClientContext";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
VirtualNetworkPeering,
|
|
19
|
+
VNetPeeringListByWorkspaceNextOptionalParams,
|
|
20
|
+
VNetPeeringListByWorkspaceOptionalParams,
|
|
21
|
+
VNetPeeringGetOptionalParams,
|
|
22
|
+
VNetPeeringGetResponse,
|
|
23
|
+
VNetPeeringDeleteOptionalParams,
|
|
24
|
+
VNetPeeringCreateOrUpdateOptionalParams,
|
|
25
|
+
VNetPeeringCreateOrUpdateResponse,
|
|
26
|
+
VNetPeeringListByWorkspaceResponse,
|
|
27
|
+
VNetPeeringListByWorkspaceNextResponse
|
|
28
|
+
} from "../models";
|
|
29
|
+
|
|
30
|
+
/// <reference lib="esnext.asynciterable" />
|
|
31
|
+
/** Class containing VNetPeering operations. */
|
|
32
|
+
export class VNetPeeringImpl implements VNetPeering {
|
|
33
|
+
private readonly client: AzureDatabricksManagementClientContext;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initialize a new instance of the class VNetPeering class.
|
|
37
|
+
* @param client Reference to the service client
|
|
38
|
+
*/
|
|
39
|
+
constructor(client: AzureDatabricksManagementClientContext) {
|
|
40
|
+
this.client = client;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Lists the workspace vNet Peerings.
|
|
45
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
46
|
+
* @param workspaceName The name of the workspace.
|
|
47
|
+
* @param options The options parameters.
|
|
48
|
+
*/
|
|
49
|
+
public listByWorkspace(
|
|
50
|
+
resourceGroupName: string,
|
|
51
|
+
workspaceName: string,
|
|
52
|
+
options?: VNetPeeringListByWorkspaceOptionalParams
|
|
53
|
+
): PagedAsyncIterableIterator<VirtualNetworkPeering> {
|
|
54
|
+
const iter = this.listByWorkspacePagingAll(
|
|
55
|
+
resourceGroupName,
|
|
56
|
+
workspaceName,
|
|
57
|
+
options
|
|
58
|
+
);
|
|
59
|
+
return {
|
|
60
|
+
next() {
|
|
61
|
+
return iter.next();
|
|
62
|
+
},
|
|
63
|
+
[Symbol.asyncIterator]() {
|
|
64
|
+
return this;
|
|
65
|
+
},
|
|
66
|
+
byPage: () => {
|
|
67
|
+
return this.listByWorkspacePagingPage(
|
|
68
|
+
resourceGroupName,
|
|
69
|
+
workspaceName,
|
|
70
|
+
options
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private async *listByWorkspacePagingPage(
|
|
77
|
+
resourceGroupName: string,
|
|
78
|
+
workspaceName: string,
|
|
79
|
+
options?: VNetPeeringListByWorkspaceOptionalParams
|
|
80
|
+
): AsyncIterableIterator<VirtualNetworkPeering[]> {
|
|
81
|
+
let result = await this._listByWorkspace(
|
|
82
|
+
resourceGroupName,
|
|
83
|
+
workspaceName,
|
|
84
|
+
options
|
|
85
|
+
);
|
|
86
|
+
yield result.value || [];
|
|
87
|
+
let continuationToken = result.nextLink;
|
|
88
|
+
while (continuationToken) {
|
|
89
|
+
result = await this._listByWorkspaceNext(
|
|
90
|
+
resourceGroupName,
|
|
91
|
+
workspaceName,
|
|
92
|
+
continuationToken,
|
|
93
|
+
options
|
|
94
|
+
);
|
|
95
|
+
continuationToken = result.nextLink;
|
|
96
|
+
yield result.value || [];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private async *listByWorkspacePagingAll(
|
|
101
|
+
resourceGroupName: string,
|
|
102
|
+
workspaceName: string,
|
|
103
|
+
options?: VNetPeeringListByWorkspaceOptionalParams
|
|
104
|
+
): AsyncIterableIterator<VirtualNetworkPeering> {
|
|
105
|
+
for await (const page of this.listByWorkspacePagingPage(
|
|
106
|
+
resourceGroupName,
|
|
107
|
+
workspaceName,
|
|
108
|
+
options
|
|
109
|
+
)) {
|
|
110
|
+
yield* page;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Gets the workspace vNet Peering.
|
|
116
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
117
|
+
* @param workspaceName The name of the workspace.
|
|
118
|
+
* @param peeringName The name of the workspace vNet peering.
|
|
119
|
+
* @param options The options parameters.
|
|
120
|
+
*/
|
|
121
|
+
get(
|
|
122
|
+
resourceGroupName: string,
|
|
123
|
+
workspaceName: string,
|
|
124
|
+
peeringName: string,
|
|
125
|
+
options?: VNetPeeringGetOptionalParams
|
|
126
|
+
): Promise<VNetPeeringGetResponse> {
|
|
127
|
+
return this.client.sendOperationRequest(
|
|
128
|
+
{ resourceGroupName, workspaceName, peeringName, options },
|
|
129
|
+
getOperationSpec
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Deletes the workspace vNetPeering.
|
|
135
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
136
|
+
* @param workspaceName The name of the workspace.
|
|
137
|
+
* @param peeringName The name of the workspace vNet peering.
|
|
138
|
+
* @param options The options parameters.
|
|
139
|
+
*/
|
|
140
|
+
async beginDelete(
|
|
141
|
+
resourceGroupName: string,
|
|
142
|
+
workspaceName: string,
|
|
143
|
+
peeringName: string,
|
|
144
|
+
options?: VNetPeeringDeleteOptionalParams
|
|
145
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
146
|
+
const directSendOperation = async (
|
|
147
|
+
args: coreClient.OperationArguments,
|
|
148
|
+
spec: coreClient.OperationSpec
|
|
149
|
+
): Promise<void> => {
|
|
150
|
+
return this.client.sendOperationRequest(args, spec);
|
|
151
|
+
};
|
|
152
|
+
const sendOperation = async (
|
|
153
|
+
args: coreClient.OperationArguments,
|
|
154
|
+
spec: coreClient.OperationSpec
|
|
155
|
+
) => {
|
|
156
|
+
let currentRawResponse:
|
|
157
|
+
| coreClient.FullOperationResponse
|
|
158
|
+
| undefined = undefined;
|
|
159
|
+
const providedCallback = args.options?.onResponse;
|
|
160
|
+
const callback: coreClient.RawResponseCallback = (
|
|
161
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
162
|
+
flatResponse: unknown
|
|
163
|
+
) => {
|
|
164
|
+
currentRawResponse = rawResponse;
|
|
165
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
166
|
+
};
|
|
167
|
+
const updatedArgs = {
|
|
168
|
+
...args,
|
|
169
|
+
options: {
|
|
170
|
+
...args.options,
|
|
171
|
+
onResponse: callback
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
175
|
+
return {
|
|
176
|
+
flatResponse,
|
|
177
|
+
rawResponse: {
|
|
178
|
+
statusCode: currentRawResponse!.status,
|
|
179
|
+
body: currentRawResponse!.parsedBody,
|
|
180
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
const lro = new LroImpl(
|
|
186
|
+
sendOperation,
|
|
187
|
+
{ resourceGroupName, workspaceName, peeringName, options },
|
|
188
|
+
deleteOperationSpec
|
|
189
|
+
);
|
|
190
|
+
return new LroEngine(lro, {
|
|
191
|
+
resumeFrom: options?.resumeFrom,
|
|
192
|
+
intervalInMs: options?.updateIntervalInMs
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Deletes the workspace vNetPeering.
|
|
198
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
199
|
+
* @param workspaceName The name of the workspace.
|
|
200
|
+
* @param peeringName The name of the workspace vNet peering.
|
|
201
|
+
* @param options The options parameters.
|
|
202
|
+
*/
|
|
203
|
+
async beginDeleteAndWait(
|
|
204
|
+
resourceGroupName: string,
|
|
205
|
+
workspaceName: string,
|
|
206
|
+
peeringName: string,
|
|
207
|
+
options?: VNetPeeringDeleteOptionalParams
|
|
208
|
+
): Promise<void> {
|
|
209
|
+
const poller = await this.beginDelete(
|
|
210
|
+
resourceGroupName,
|
|
211
|
+
workspaceName,
|
|
212
|
+
peeringName,
|
|
213
|
+
options
|
|
214
|
+
);
|
|
215
|
+
return poller.pollUntilDone();
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Creates vNet Peering for workspace.
|
|
220
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
221
|
+
* @param workspaceName The name of the workspace.
|
|
222
|
+
* @param peeringName The name of the workspace vNet peering.
|
|
223
|
+
* @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering.
|
|
224
|
+
* @param options The options parameters.
|
|
225
|
+
*/
|
|
226
|
+
async beginCreateOrUpdate(
|
|
227
|
+
resourceGroupName: string,
|
|
228
|
+
workspaceName: string,
|
|
229
|
+
peeringName: string,
|
|
230
|
+
virtualNetworkPeeringParameters: VirtualNetworkPeering,
|
|
231
|
+
options?: VNetPeeringCreateOrUpdateOptionalParams
|
|
232
|
+
): Promise<
|
|
233
|
+
PollerLike<
|
|
234
|
+
PollOperationState<VNetPeeringCreateOrUpdateResponse>,
|
|
235
|
+
VNetPeeringCreateOrUpdateResponse
|
|
236
|
+
>
|
|
237
|
+
> {
|
|
238
|
+
const directSendOperation = async (
|
|
239
|
+
args: coreClient.OperationArguments,
|
|
240
|
+
spec: coreClient.OperationSpec
|
|
241
|
+
): Promise<VNetPeeringCreateOrUpdateResponse> => {
|
|
242
|
+
return this.client.sendOperationRequest(args, spec);
|
|
243
|
+
};
|
|
244
|
+
const sendOperation = async (
|
|
245
|
+
args: coreClient.OperationArguments,
|
|
246
|
+
spec: coreClient.OperationSpec
|
|
247
|
+
) => {
|
|
248
|
+
let currentRawResponse:
|
|
249
|
+
| coreClient.FullOperationResponse
|
|
250
|
+
| undefined = undefined;
|
|
251
|
+
const providedCallback = args.options?.onResponse;
|
|
252
|
+
const callback: coreClient.RawResponseCallback = (
|
|
253
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
254
|
+
flatResponse: unknown
|
|
255
|
+
) => {
|
|
256
|
+
currentRawResponse = rawResponse;
|
|
257
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
258
|
+
};
|
|
259
|
+
const updatedArgs = {
|
|
260
|
+
...args,
|
|
261
|
+
options: {
|
|
262
|
+
...args.options,
|
|
263
|
+
onResponse: callback
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
267
|
+
return {
|
|
268
|
+
flatResponse,
|
|
269
|
+
rawResponse: {
|
|
270
|
+
statusCode: currentRawResponse!.status,
|
|
271
|
+
body: currentRawResponse!.parsedBody,
|
|
272
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
const lro = new LroImpl(
|
|
278
|
+
sendOperation,
|
|
279
|
+
{
|
|
280
|
+
resourceGroupName,
|
|
281
|
+
workspaceName,
|
|
282
|
+
peeringName,
|
|
283
|
+
virtualNetworkPeeringParameters,
|
|
284
|
+
options
|
|
285
|
+
},
|
|
286
|
+
createOrUpdateOperationSpec
|
|
287
|
+
);
|
|
288
|
+
return new LroEngine(lro, {
|
|
289
|
+
resumeFrom: options?.resumeFrom,
|
|
290
|
+
intervalInMs: options?.updateIntervalInMs
|
|
291
|
+
});
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Creates vNet Peering for workspace.
|
|
296
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
297
|
+
* @param workspaceName The name of the workspace.
|
|
298
|
+
* @param peeringName The name of the workspace vNet peering.
|
|
299
|
+
* @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering.
|
|
300
|
+
* @param options The options parameters.
|
|
301
|
+
*/
|
|
302
|
+
async beginCreateOrUpdateAndWait(
|
|
303
|
+
resourceGroupName: string,
|
|
304
|
+
workspaceName: string,
|
|
305
|
+
peeringName: string,
|
|
306
|
+
virtualNetworkPeeringParameters: VirtualNetworkPeering,
|
|
307
|
+
options?: VNetPeeringCreateOrUpdateOptionalParams
|
|
308
|
+
): Promise<VNetPeeringCreateOrUpdateResponse> {
|
|
309
|
+
const poller = await this.beginCreateOrUpdate(
|
|
310
|
+
resourceGroupName,
|
|
311
|
+
workspaceName,
|
|
312
|
+
peeringName,
|
|
313
|
+
virtualNetworkPeeringParameters,
|
|
314
|
+
options
|
|
315
|
+
);
|
|
316
|
+
return poller.pollUntilDone();
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Lists the workspace vNet Peerings.
|
|
321
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
322
|
+
* @param workspaceName The name of the workspace.
|
|
323
|
+
* @param options The options parameters.
|
|
324
|
+
*/
|
|
325
|
+
private _listByWorkspace(
|
|
326
|
+
resourceGroupName: string,
|
|
327
|
+
workspaceName: string,
|
|
328
|
+
options?: VNetPeeringListByWorkspaceOptionalParams
|
|
329
|
+
): Promise<VNetPeeringListByWorkspaceResponse> {
|
|
330
|
+
return this.client.sendOperationRequest(
|
|
331
|
+
{ resourceGroupName, workspaceName, options },
|
|
332
|
+
listByWorkspaceOperationSpec
|
|
333
|
+
);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* ListByWorkspaceNext
|
|
338
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
339
|
+
* @param workspaceName The name of the workspace.
|
|
340
|
+
* @param nextLink The nextLink from the previous successful call to the ListByWorkspace method.
|
|
341
|
+
* @param options The options parameters.
|
|
342
|
+
*/
|
|
343
|
+
private _listByWorkspaceNext(
|
|
344
|
+
resourceGroupName: string,
|
|
345
|
+
workspaceName: string,
|
|
346
|
+
nextLink: string,
|
|
347
|
+
options?: VNetPeeringListByWorkspaceNextOptionalParams
|
|
348
|
+
): Promise<VNetPeeringListByWorkspaceNextResponse> {
|
|
349
|
+
return this.client.sendOperationRequest(
|
|
350
|
+
{ resourceGroupName, workspaceName, nextLink, options },
|
|
351
|
+
listByWorkspaceNextOperationSpec
|
|
352
|
+
);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
// Operation Specifications
|
|
356
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
357
|
+
|
|
358
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
359
|
+
path:
|
|
360
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}",
|
|
361
|
+
httpMethod: "GET",
|
|
362
|
+
responses: {
|
|
363
|
+
200: {
|
|
364
|
+
bodyMapper: Mappers.VirtualNetworkPeering
|
|
365
|
+
},
|
|
366
|
+
204: {},
|
|
367
|
+
default: {
|
|
368
|
+
bodyMapper: Mappers.ErrorResponse
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
queryParameters: [Parameters.apiVersion],
|
|
372
|
+
urlParameters: [
|
|
373
|
+
Parameters.$host,
|
|
374
|
+
Parameters.resourceGroupName,
|
|
375
|
+
Parameters.workspaceName,
|
|
376
|
+
Parameters.subscriptionId,
|
|
377
|
+
Parameters.peeringName
|
|
378
|
+
],
|
|
379
|
+
headerParameters: [Parameters.accept],
|
|
380
|
+
serializer
|
|
381
|
+
};
|
|
382
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
383
|
+
path:
|
|
384
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}",
|
|
385
|
+
httpMethod: "DELETE",
|
|
386
|
+
responses: {
|
|
387
|
+
200: {},
|
|
388
|
+
201: {},
|
|
389
|
+
202: {},
|
|
390
|
+
204: {},
|
|
391
|
+
default: {
|
|
392
|
+
bodyMapper: Mappers.ErrorResponse
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
queryParameters: [Parameters.apiVersion],
|
|
396
|
+
urlParameters: [
|
|
397
|
+
Parameters.$host,
|
|
398
|
+
Parameters.resourceGroupName,
|
|
399
|
+
Parameters.workspaceName,
|
|
400
|
+
Parameters.subscriptionId,
|
|
401
|
+
Parameters.peeringName
|
|
402
|
+
],
|
|
403
|
+
headerParameters: [Parameters.accept],
|
|
404
|
+
serializer
|
|
405
|
+
};
|
|
406
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
407
|
+
path:
|
|
408
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}",
|
|
409
|
+
httpMethod: "PUT",
|
|
410
|
+
responses: {
|
|
411
|
+
200: {
|
|
412
|
+
bodyMapper: Mappers.VirtualNetworkPeering
|
|
413
|
+
},
|
|
414
|
+
201: {
|
|
415
|
+
bodyMapper: Mappers.VirtualNetworkPeering
|
|
416
|
+
},
|
|
417
|
+
202: {
|
|
418
|
+
bodyMapper: Mappers.VirtualNetworkPeering
|
|
419
|
+
},
|
|
420
|
+
204: {
|
|
421
|
+
bodyMapper: Mappers.VirtualNetworkPeering
|
|
422
|
+
},
|
|
423
|
+
default: {
|
|
424
|
+
bodyMapper: Mappers.ErrorResponse
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
requestBody: Parameters.virtualNetworkPeeringParameters,
|
|
428
|
+
queryParameters: [Parameters.apiVersion],
|
|
429
|
+
urlParameters: [
|
|
430
|
+
Parameters.$host,
|
|
431
|
+
Parameters.resourceGroupName,
|
|
432
|
+
Parameters.workspaceName,
|
|
433
|
+
Parameters.subscriptionId,
|
|
434
|
+
Parameters.peeringName
|
|
435
|
+
],
|
|
436
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
437
|
+
mediaType: "json",
|
|
438
|
+
serializer
|
|
439
|
+
};
|
|
440
|
+
const listByWorkspaceOperationSpec: coreClient.OperationSpec = {
|
|
441
|
+
path:
|
|
442
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings",
|
|
443
|
+
httpMethod: "GET",
|
|
444
|
+
responses: {
|
|
445
|
+
200: {
|
|
446
|
+
bodyMapper: Mappers.VirtualNetworkPeeringList
|
|
447
|
+
},
|
|
448
|
+
default: {
|
|
449
|
+
bodyMapper: Mappers.ErrorResponse
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
queryParameters: [Parameters.apiVersion],
|
|
453
|
+
urlParameters: [
|
|
454
|
+
Parameters.$host,
|
|
455
|
+
Parameters.resourceGroupName,
|
|
456
|
+
Parameters.workspaceName,
|
|
457
|
+
Parameters.subscriptionId
|
|
458
|
+
],
|
|
459
|
+
headerParameters: [Parameters.accept],
|
|
460
|
+
serializer
|
|
461
|
+
};
|
|
462
|
+
const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {
|
|
463
|
+
path: "{nextLink}",
|
|
464
|
+
httpMethod: "GET",
|
|
465
|
+
responses: {
|
|
466
|
+
200: {
|
|
467
|
+
bodyMapper: Mappers.VirtualNetworkPeeringList
|
|
468
|
+
},
|
|
469
|
+
default: {
|
|
470
|
+
bodyMapper: Mappers.ErrorResponse
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
queryParameters: [Parameters.apiVersion],
|
|
474
|
+
urlParameters: [
|
|
475
|
+
Parameters.$host,
|
|
476
|
+
Parameters.resourceGroupName,
|
|
477
|
+
Parameters.workspaceName,
|
|
478
|
+
Parameters.subscriptionId,
|
|
479
|
+
Parameters.nextLink
|
|
480
|
+
],
|
|
481
|
+
headerParameters: [Parameters.accept],
|
|
482
|
+
serializer
|
|
483
|
+
};
|