@azure/arm-databricks 2.0.0 → 3.0.0-beta.1
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 +14 -0
- package/{LICENSE.txt → LICENSE} +1 -1
- package/README.md +66 -82
- 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/{esm → dist-esm/src}/models/mappers.js +578 -549
- 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/{esm → dist-esm/src}/models/parameters.js +77 -51
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +1 -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/{esm/models/index.js → dist-esm/src/operationsInterfaces/operations.js} +2 -1
- 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/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/outboundNetworkDependenciesEndpoints.js} +2 -9
- 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/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/privateEndpointConnections.js} +2 -2
- 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 +65 -32
- package/review/arm-databricks.api.md +742 -0
- package/rollup.config.js +181 -30
- package/src/azureDatabricksManagementClient.ts +42 -39
- package/src/azureDatabricksManagementClientContext.ts +45 -40
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +712 -1127
- package/src/models/mappers.ts +585 -552
- package/src/models/parameters.ts +101 -52
- package/src/operations/index.ts +2 -2
- package/src/operations/operations.ts +82 -70
- package/src/operations/outboundNetworkDependenciesEndpoints.ts +85 -0
- package/src/operations/privateEndpointConnections.ts +326 -184
- package/src/operations/privateLinkResources.ts +141 -123
- package/src/operations/vNetPeering.ts +349 -199
- package/src/operations/workspaces.ts +503 -308
- package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +3 -3
- 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 +3 -3
- package/types/arm-databricks.d.ts +1198 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-databricks.js +0 -2791
- 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/azureDatabricksManagementClient.d.ts +0 -28
- package/esm/azureDatabricksManagementClient.d.ts.map +0 -1
- package/esm/azureDatabricksManagementClient.js +0 -41
- package/esm/azureDatabricksManagementClient.js.map +0 -1
- package/esm/azureDatabricksManagementClientContext.d.ts +0 -21
- package/esm/azureDatabricksManagementClientContext.d.ts.map +0 -1
- package/esm/azureDatabricksManagementClientContext.js +0 -59
- package/esm/azureDatabricksManagementClientContext.js.map +0 -1
- package/esm/models/index.d.ts +0 -1273
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -43
- package/esm/models/mappers.d.ts.map +0 -1
- 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.map +0 -1
- package/esm/models/parameters.d.ts +0 -12
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
- package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.js +0 -9
- package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
- package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
- package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
- package/esm/models/privateLinkResourcesMappers.js +0 -9
- package/esm/models/privateLinkResourcesMappers.js.map +0 -1
- package/esm/models/vNetPeeringMappers.d.ts +0 -2
- package/esm/models/vNetPeeringMappers.d.ts.map +0 -1
- package/esm/models/vNetPeeringMappers.js +0 -9
- package/esm/models/vNetPeeringMappers.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 -9
- package/esm/models/workspacesMappers.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- 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 -79
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/privateEndpointConnections.d.ts +0 -122
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -240
- package/esm/operations/privateEndpointConnections.js.map +0 -1
- package/esm/operations/privateLinkResources.d.ts +0 -79
- package/esm/operations/privateLinkResources.d.ts.map +0 -1
- package/esm/operations/privateLinkResources.js +0 -119
- package/esm/operations/privateLinkResources.js.map +0 -1
- package/esm/operations/vNetPeering.d.ts +0 -115
- package/esm/operations/vNetPeering.d.ts.map +0 -1
- package/esm/operations/vNetPeering.js +0 -237
- package/esm/operations/vNetPeering.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 -337
- package/esm/operations/workspaces.js.map +0 -1
- package/src/models/privateEndpointConnectionsMappers.ts +0 -43
- package/src/models/privateLinkResourcesMappers.ts +0 -43
- package/src/models/vNetPeeringMappers.ts +0 -43
- package/src/models/workspacesMappers.ts +0 -44
|
@@ -3,212 +3,362 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
13
|
-
import * as Mappers from "../models/
|
|
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";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
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";
|
|
16
29
|
|
|
17
|
-
|
|
18
|
-
|
|
30
|
+
/// <reference lib="esnext.asynciterable" />
|
|
31
|
+
/** Class containing VNetPeering operations. */
|
|
32
|
+
export class VNetPeeringImpl implements VNetPeering {
|
|
19
33
|
private readonly client: AzureDatabricksManagementClientContext;
|
|
20
34
|
|
|
21
35
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
36
|
+
* Initialize a new instance of the class VNetPeering class.
|
|
37
|
+
* @param client Reference to the service client
|
|
24
38
|
*/
|
|
25
39
|
constructor(client: AzureDatabricksManagementClientContext) {
|
|
26
40
|
this.client = client;
|
|
27
41
|
}
|
|
28
42
|
|
|
29
43
|
/**
|
|
30
|
-
*
|
|
31
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
32
|
-
* @param workspaceName The name of the workspace.
|
|
33
|
-
* @param peeringName The name of the workspace vNet peering.
|
|
34
|
-
* @param [options] The optional parameters
|
|
35
|
-
* @returns Promise<Models.VNetPeeringGetResponse>
|
|
36
|
-
*/
|
|
37
|
-
get(resourceGroupName: string, workspaceName: string, peeringName: string, options?: msRest.RequestOptionsBase): Promise<Models.VNetPeeringGetResponse>;
|
|
38
|
-
/**
|
|
39
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
40
|
-
* @param workspaceName The name of the workspace.
|
|
41
|
-
* @param peeringName The name of the workspace vNet peering.
|
|
42
|
-
* @param callback The callback
|
|
43
|
-
*/
|
|
44
|
-
get(resourceGroupName: string, workspaceName: string, peeringName: string, callback: msRest.ServiceCallback<Models.VirtualNetworkPeering>): void;
|
|
45
|
-
/**
|
|
44
|
+
* Lists the workspace vNet Peerings.
|
|
46
45
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
47
46
|
* @param workspaceName The name of the workspace.
|
|
48
|
-
* @param
|
|
49
|
-
* @param options The optional parameters
|
|
50
|
-
* @param callback The callback
|
|
47
|
+
* @param options The options parameters.
|
|
51
48
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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(
|
|
56
90
|
resourceGroupName,
|
|
57
91
|
workspaceName,
|
|
58
|
-
|
|
92
|
+
continuationToken,
|
|
59
93
|
options
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
+
}
|
|
63
112
|
}
|
|
64
113
|
|
|
65
114
|
/**
|
|
66
|
-
*
|
|
115
|
+
* Gets the workspace vNet Peering.
|
|
67
116
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
68
117
|
* @param workspaceName The name of the workspace.
|
|
69
118
|
* @param peeringName The name of the workspace vNet peering.
|
|
70
|
-
* @param
|
|
71
|
-
* @returns Promise<msRest.RestResponse>
|
|
119
|
+
* @param options The options parameters.
|
|
72
120
|
*/
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
+
);
|
|
76
131
|
}
|
|
77
132
|
|
|
78
133
|
/**
|
|
79
|
-
*
|
|
80
|
-
* @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering.
|
|
134
|
+
* Deletes the workspace vNetPeering.
|
|
81
135
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
82
136
|
* @param workspaceName The name of the workspace.
|
|
83
137
|
* @param peeringName The name of the workspace vNet peering.
|
|
84
|
-
* @param
|
|
85
|
-
* @returns Promise<Models.VNetPeeringCreateOrUpdateResponse>
|
|
138
|
+
* @param options The options parameters.
|
|
86
139
|
*/
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
+
});
|
|
90
194
|
}
|
|
91
195
|
|
|
92
196
|
/**
|
|
93
|
-
*
|
|
94
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
95
|
-
* @param workspaceName The name of the workspace.
|
|
96
|
-
* @param [options] The optional parameters
|
|
97
|
-
* @returns Promise<Models.VNetPeeringListByWorkspaceResponse>
|
|
98
|
-
*/
|
|
99
|
-
listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise<Models.VNetPeeringListByWorkspaceResponse>;
|
|
100
|
-
/**
|
|
101
|
-
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
102
|
-
* @param workspaceName The name of the workspace.
|
|
103
|
-
* @param callback The callback
|
|
104
|
-
*/
|
|
105
|
-
listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback<Models.VirtualNetworkPeeringList>): void;
|
|
106
|
-
/**
|
|
197
|
+
* Deletes the workspace vNetPeering.
|
|
107
198
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
108
199
|
* @param workspaceName The name of the workspace.
|
|
109
|
-
* @param
|
|
110
|
-
* @param
|
|
200
|
+
* @param peeringName The name of the workspace vNet peering.
|
|
201
|
+
* @param options The options parameters.
|
|
111
202
|
*/
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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();
|
|
122
216
|
}
|
|
123
217
|
|
|
124
218
|
/**
|
|
125
|
-
*
|
|
219
|
+
* Creates vNet Peering for workspace.
|
|
126
220
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
127
221
|
* @param workspaceName The name of the workspace.
|
|
128
222
|
* @param peeringName The name of the workspace vNet peering.
|
|
129
|
-
* @param
|
|
130
|
-
* @
|
|
223
|
+
* @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering.
|
|
224
|
+
* @param options The options parameters.
|
|
131
225
|
*/
|
|
132
|
-
|
|
133
|
-
|
|
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,
|
|
134
279
|
{
|
|
135
280
|
resourceGroupName,
|
|
136
281
|
workspaceName,
|
|
137
282
|
peeringName,
|
|
283
|
+
virtualNetworkPeeringParameters,
|
|
138
284
|
options
|
|
139
285
|
},
|
|
140
|
-
|
|
141
|
-
|
|
286
|
+
createOrUpdateOperationSpec
|
|
287
|
+
);
|
|
288
|
+
return new LroEngine(lro, {
|
|
289
|
+
resumeFrom: options?.resumeFrom,
|
|
290
|
+
intervalInMs: options?.updateIntervalInMs
|
|
291
|
+
});
|
|
142
292
|
}
|
|
143
293
|
|
|
144
294
|
/**
|
|
145
295
|
* Creates vNet Peering for workspace.
|
|
146
|
-
* @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering.
|
|
147
296
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
148
297
|
* @param workspaceName The name of the workspace.
|
|
149
298
|
* @param peeringName The name of the workspace vNet peering.
|
|
150
|
-
* @param
|
|
151
|
-
* @
|
|
299
|
+
* @param virtualNetworkPeeringParameters Parameters supplied to the create workspace vNet Peering.
|
|
300
|
+
* @param options The options parameters.
|
|
152
301
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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();
|
|
164
317
|
}
|
|
165
318
|
|
|
166
319
|
/**
|
|
167
320
|
* Lists the workspace vNet Peerings.
|
|
168
|
-
* @param
|
|
169
|
-
* @param
|
|
170
|
-
* @
|
|
171
|
-
*/
|
|
172
|
-
listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.VNetPeeringListByWorkspaceNextResponse>;
|
|
173
|
-
/**
|
|
174
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
175
|
-
* @param callback The callback
|
|
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.
|
|
176
324
|
*/
|
|
177
|
-
|
|
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
|
+
|
|
178
336
|
/**
|
|
179
|
-
*
|
|
180
|
-
* @param
|
|
181
|
-
* @param
|
|
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.
|
|
182
342
|
*/
|
|
183
|
-
|
|
184
|
-
|
|
343
|
+
private _listByWorkspaceNext(
|
|
344
|
+
resourceGroupName: string,
|
|
345
|
+
workspaceName: string,
|
|
346
|
+
nextLink: string,
|
|
347
|
+
options?: VNetPeeringListByWorkspaceNextOptionalParams
|
|
348
|
+
): Promise<VNetPeeringListByWorkspaceNextResponse> {
|
|
185
349
|
return this.client.sendOperationRequest(
|
|
186
|
-
{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
},
|
|
190
|
-
listByWorkspaceNextOperationSpec,
|
|
191
|
-
callback) as Promise<Models.VNetPeeringListByWorkspaceNextResponse>;
|
|
350
|
+
{ resourceGroupName, workspaceName, nextLink, options },
|
|
351
|
+
listByWorkspaceNextOperationSpec
|
|
352
|
+
);
|
|
192
353
|
}
|
|
193
354
|
}
|
|
194
|
-
|
|
195
355
|
// Operation Specifications
|
|
196
|
-
const serializer =
|
|
197
|
-
|
|
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}",
|
|
198
361
|
httpMethod: "GET",
|
|
199
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}",
|
|
200
|
-
urlParameters: [
|
|
201
|
-
Parameters.resourceGroupName,
|
|
202
|
-
Parameters.workspaceName,
|
|
203
|
-
Parameters.subscriptionId,
|
|
204
|
-
Parameters.peeringName
|
|
205
|
-
],
|
|
206
|
-
queryParameters: [
|
|
207
|
-
Parameters.apiVersion1
|
|
208
|
-
],
|
|
209
|
-
headerParameters: [
|
|
210
|
-
Parameters.acceptLanguage
|
|
211
|
-
],
|
|
212
362
|
responses: {
|
|
213
363
|
200: {
|
|
214
364
|
bodyMapper: Mappers.VirtualNetworkPeering
|
|
@@ -218,82 +368,45 @@ const getOperationSpec: msRest.OperationSpec = {
|
|
|
218
368
|
bodyMapper: Mappers.ErrorResponse
|
|
219
369
|
}
|
|
220
370
|
},
|
|
221
|
-
|
|
222
|
-
};
|
|
223
|
-
|
|
224
|
-
const listByWorkspaceOperationSpec: msRest.OperationSpec = {
|
|
225
|
-
httpMethod: "GET",
|
|
226
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings",
|
|
371
|
+
queryParameters: [Parameters.apiVersion],
|
|
227
372
|
urlParameters: [
|
|
373
|
+
Parameters.$host,
|
|
228
374
|
Parameters.resourceGroupName,
|
|
229
375
|
Parameters.workspaceName,
|
|
230
|
-
Parameters.subscriptionId
|
|
231
|
-
|
|
232
|
-
queryParameters: [
|
|
233
|
-
Parameters.apiVersion1
|
|
234
|
-
],
|
|
235
|
-
headerParameters: [
|
|
236
|
-
Parameters.acceptLanguage
|
|
376
|
+
Parameters.subscriptionId,
|
|
377
|
+
Parameters.peeringName
|
|
237
378
|
],
|
|
238
|
-
|
|
239
|
-
200: {
|
|
240
|
-
bodyMapper: Mappers.VirtualNetworkPeeringList
|
|
241
|
-
},
|
|
242
|
-
default: {
|
|
243
|
-
bodyMapper: Mappers.ErrorResponse
|
|
244
|
-
}
|
|
245
|
-
},
|
|
379
|
+
headerParameters: [Parameters.accept],
|
|
246
380
|
serializer
|
|
247
381
|
};
|
|
248
|
-
|
|
249
|
-
|
|
382
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
383
|
+
path:
|
|
384
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}",
|
|
250
385
|
httpMethod: "DELETE",
|
|
251
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}",
|
|
252
|
-
urlParameters: [
|
|
253
|
-
Parameters.resourceGroupName,
|
|
254
|
-
Parameters.workspaceName,
|
|
255
|
-
Parameters.subscriptionId,
|
|
256
|
-
Parameters.peeringName
|
|
257
|
-
],
|
|
258
|
-
queryParameters: [
|
|
259
|
-
Parameters.apiVersion1
|
|
260
|
-
],
|
|
261
|
-
headerParameters: [
|
|
262
|
-
Parameters.acceptLanguage
|
|
263
|
-
],
|
|
264
386
|
responses: {
|
|
265
387
|
200: {},
|
|
388
|
+
201: {},
|
|
266
389
|
202: {},
|
|
267
390
|
204: {},
|
|
268
391
|
default: {
|
|
269
392
|
bodyMapper: Mappers.ErrorResponse
|
|
270
393
|
}
|
|
271
394
|
},
|
|
272
|
-
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
276
|
-
httpMethod: "PUT",
|
|
277
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings/{peeringName}",
|
|
395
|
+
queryParameters: [Parameters.apiVersion],
|
|
278
396
|
urlParameters: [
|
|
397
|
+
Parameters.$host,
|
|
279
398
|
Parameters.resourceGroupName,
|
|
280
399
|
Parameters.workspaceName,
|
|
281
400
|
Parameters.subscriptionId,
|
|
282
401
|
Parameters.peeringName
|
|
283
402
|
],
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
parameterPath: "virtualNetworkPeeringParameters",
|
|
292
|
-
mapper: {
|
|
293
|
-
...Mappers.VirtualNetworkPeering,
|
|
294
|
-
required: true
|
|
295
|
-
}
|
|
296
|
-
},
|
|
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",
|
|
297
410
|
responses: {
|
|
298
411
|
200: {
|
|
299
412
|
bodyMapper: Mappers.VirtualNetworkPeering
|
|
@@ -301,26 +414,54 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
|
301
414
|
201: {
|
|
302
415
|
bodyMapper: Mappers.VirtualNetworkPeering
|
|
303
416
|
},
|
|
417
|
+
202: {
|
|
418
|
+
bodyMapper: Mappers.VirtualNetworkPeering
|
|
419
|
+
},
|
|
420
|
+
204: {
|
|
421
|
+
bodyMapper: Mappers.VirtualNetworkPeering
|
|
422
|
+
},
|
|
304
423
|
default: {
|
|
305
424
|
bodyMapper: Mappers.ErrorResponse
|
|
306
425
|
}
|
|
307
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",
|
|
308
438
|
serializer
|
|
309
439
|
};
|
|
310
|
-
|
|
311
|
-
|
|
440
|
+
const listByWorkspaceOperationSpec: coreClient.OperationSpec = {
|
|
441
|
+
path:
|
|
442
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Databricks/workspaces/{workspaceName}/virtualNetworkPeerings",
|
|
312
443
|
httpMethod: "GET",
|
|
313
|
-
|
|
314
|
-
|
|
444
|
+
responses: {
|
|
445
|
+
200: {
|
|
446
|
+
bodyMapper: Mappers.VirtualNetworkPeeringList
|
|
447
|
+
},
|
|
448
|
+
default: {
|
|
449
|
+
bodyMapper: Mappers.ErrorResponse
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
queryParameters: [Parameters.apiVersion],
|
|
315
453
|
urlParameters: [
|
|
316
|
-
Parameters
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
Parameters.
|
|
320
|
-
],
|
|
321
|
-
headerParameters: [
|
|
322
|
-
Parameters.acceptLanguage
|
|
454
|
+
Parameters.$host,
|
|
455
|
+
Parameters.resourceGroupName,
|
|
456
|
+
Parameters.workspaceName,
|
|
457
|
+
Parameters.subscriptionId
|
|
323
458
|
],
|
|
459
|
+
headerParameters: [Parameters.accept],
|
|
460
|
+
serializer
|
|
461
|
+
};
|
|
462
|
+
const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = {
|
|
463
|
+
path: "{nextLink}",
|
|
464
|
+
httpMethod: "GET",
|
|
324
465
|
responses: {
|
|
325
466
|
200: {
|
|
326
467
|
bodyMapper: Mappers.VirtualNetworkPeeringList
|
|
@@ -329,5 +470,14 @@ const listByWorkspaceNextOperationSpec: msRest.OperationSpec = {
|
|
|
329
470
|
bodyMapper: Mappers.ErrorResponse
|
|
330
471
|
}
|
|
331
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],
|
|
332
482
|
serializer
|
|
333
483
|
};
|