@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,9 +6,107 @@
|
|
|
6
6
|
|
|
7
7
|
import * as coreAuth from '@azure/core-auth';
|
|
8
8
|
import * as coreClient from '@azure/core-client';
|
|
9
|
+
import { OperationState } from '@azure/core-lro';
|
|
9
10
|
import { PagedAsyncIterableIterator } from '@azure/core-paging';
|
|
10
|
-
import {
|
|
11
|
-
|
|
11
|
+
import { SimplePollerLike } from '@azure/core-lro';
|
|
12
|
+
|
|
13
|
+
// @public
|
|
14
|
+
export interface AccessConnector extends TrackedResource {
|
|
15
|
+
identity?: ManagedServiceIdentity;
|
|
16
|
+
properties?: AccessConnectorProperties;
|
|
17
|
+
readonly systemData?: SystemData;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
// @public
|
|
21
|
+
export interface AccessConnectorListResult {
|
|
22
|
+
nextLink?: string;
|
|
23
|
+
value?: AccessConnector[];
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// @public (undocumented)
|
|
27
|
+
export interface AccessConnectorProperties {
|
|
28
|
+
readonly provisioningState?: ProvisioningState;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// @public
|
|
32
|
+
export interface AccessConnectors {
|
|
33
|
+
beginCreateOrUpdate(resourceGroupName: string, connectorName: string, parameters: AccessConnector, options?: AccessConnectorsCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<AccessConnectorsCreateOrUpdateResponse>, AccessConnectorsCreateOrUpdateResponse>>;
|
|
34
|
+
beginCreateOrUpdateAndWait(resourceGroupName: string, connectorName: string, parameters: AccessConnector, options?: AccessConnectorsCreateOrUpdateOptionalParams): Promise<AccessConnectorsCreateOrUpdateResponse>;
|
|
35
|
+
beginDelete(resourceGroupName: string, connectorName: string, options?: AccessConnectorsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
36
|
+
beginDeleteAndWait(resourceGroupName: string, connectorName: string, options?: AccessConnectorsDeleteOptionalParams): Promise<void>;
|
|
37
|
+
beginUpdate(resourceGroupName: string, connectorName: string, parameters: AccessConnectorUpdate, options?: AccessConnectorsUpdateOptionalParams): Promise<SimplePollerLike<OperationState<AccessConnectorsUpdateResponse>, AccessConnectorsUpdateResponse>>;
|
|
38
|
+
beginUpdateAndWait(resourceGroupName: string, connectorName: string, parameters: AccessConnectorUpdate, options?: AccessConnectorsUpdateOptionalParams): Promise<AccessConnectorsUpdateResponse>;
|
|
39
|
+
get(resourceGroupName: string, connectorName: string, options?: AccessConnectorsGetOptionalParams): Promise<AccessConnectorsGetResponse>;
|
|
40
|
+
listByResourceGroup(resourceGroupName: string, options?: AccessConnectorsListByResourceGroupOptionalParams): PagedAsyncIterableIterator<AccessConnector>;
|
|
41
|
+
listBySubscription(options?: AccessConnectorsListBySubscriptionOptionalParams): PagedAsyncIterableIterator<AccessConnector>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// @public
|
|
45
|
+
export interface AccessConnectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
|
|
46
|
+
resumeFrom?: string;
|
|
47
|
+
updateIntervalInMs?: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// @public
|
|
51
|
+
export type AccessConnectorsCreateOrUpdateResponse = AccessConnector;
|
|
52
|
+
|
|
53
|
+
// @public
|
|
54
|
+
export interface AccessConnectorsDeleteOptionalParams extends coreClient.OperationOptions {
|
|
55
|
+
resumeFrom?: string;
|
|
56
|
+
updateIntervalInMs?: number;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// @public
|
|
60
|
+
export interface AccessConnectorsGetOptionalParams extends coreClient.OperationOptions {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// @public
|
|
64
|
+
export type AccessConnectorsGetResponse = AccessConnector;
|
|
65
|
+
|
|
66
|
+
// @public
|
|
67
|
+
export interface AccessConnectorsListByResourceGroupNextOptionalParams extends coreClient.OperationOptions {
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// @public
|
|
71
|
+
export type AccessConnectorsListByResourceGroupNextResponse = AccessConnectorListResult;
|
|
72
|
+
|
|
73
|
+
// @public
|
|
74
|
+
export interface AccessConnectorsListByResourceGroupOptionalParams extends coreClient.OperationOptions {
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// @public
|
|
78
|
+
export type AccessConnectorsListByResourceGroupResponse = AccessConnectorListResult;
|
|
79
|
+
|
|
80
|
+
// @public
|
|
81
|
+
export interface AccessConnectorsListBySubscriptionNextOptionalParams extends coreClient.OperationOptions {
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// @public
|
|
85
|
+
export type AccessConnectorsListBySubscriptionNextResponse = AccessConnectorListResult;
|
|
86
|
+
|
|
87
|
+
// @public
|
|
88
|
+
export interface AccessConnectorsListBySubscriptionOptionalParams extends coreClient.OperationOptions {
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// @public
|
|
92
|
+
export type AccessConnectorsListBySubscriptionResponse = AccessConnectorListResult;
|
|
93
|
+
|
|
94
|
+
// @public
|
|
95
|
+
export interface AccessConnectorsUpdateOptionalParams extends coreClient.OperationOptions {
|
|
96
|
+
resumeFrom?: string;
|
|
97
|
+
updateIntervalInMs?: number;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// @public
|
|
101
|
+
export type AccessConnectorsUpdateResponse = AccessConnector;
|
|
102
|
+
|
|
103
|
+
// @public
|
|
104
|
+
export interface AccessConnectorUpdate {
|
|
105
|
+
identity?: ManagedServiceIdentity;
|
|
106
|
+
tags?: {
|
|
107
|
+
[propertyName: string]: string;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
12
110
|
|
|
13
111
|
// @public
|
|
14
112
|
export interface AddressSpace {
|
|
@@ -21,7 +119,7 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
|
|
|
21
119
|
$host: string;
|
|
22
120
|
constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: AzureDatabricksManagementClientOptionalParams);
|
|
23
121
|
// (undocumented)
|
|
24
|
-
|
|
122
|
+
accessConnectors: AccessConnectors;
|
|
25
123
|
// (undocumented)
|
|
26
124
|
operations: Operations;
|
|
27
125
|
// (undocumented)
|
|
@@ -41,7 +139,6 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
|
|
|
41
139
|
// @public
|
|
42
140
|
export interface AzureDatabricksManagementClientOptionalParams extends coreClient.ServiceClientOptions {
|
|
43
141
|
$host?: string;
|
|
44
|
-
apiVersion?: string;
|
|
45
142
|
endpoint?: string;
|
|
46
143
|
}
|
|
47
144
|
|
|
@@ -68,6 +165,7 @@ export interface Encryption {
|
|
|
68
165
|
|
|
69
166
|
// @public
|
|
70
167
|
export interface EncryptionEntitiesDefinition {
|
|
168
|
+
managedDisk?: ManagedDiskEncryption;
|
|
71
169
|
managedServices?: EncryptionV2;
|
|
72
170
|
}
|
|
73
171
|
|
|
@@ -122,9 +220,12 @@ export interface ErrorResponse {
|
|
|
122
220
|
}
|
|
123
221
|
|
|
124
222
|
// @public
|
|
125
|
-
export
|
|
223
|
+
export function getContinuationToken(page: unknown): string | undefined;
|
|
224
|
+
|
|
225
|
+
// @public
|
|
226
|
+
export interface GroupIdInformation extends Resource {
|
|
126
227
|
properties: GroupIdInformationProperties;
|
|
127
|
-
}
|
|
228
|
+
}
|
|
128
229
|
|
|
129
230
|
// @public
|
|
130
231
|
export interface GroupIdInformationProperties {
|
|
@@ -138,132 +239,112 @@ export type KeySource = string;
|
|
|
138
239
|
|
|
139
240
|
// @public
|
|
140
241
|
export enum KnownCreatedByType {
|
|
141
|
-
// (undocumented)
|
|
142
242
|
Application = "Application",
|
|
143
|
-
// (undocumented)
|
|
144
243
|
Key = "Key",
|
|
145
|
-
// (undocumented)
|
|
146
244
|
ManagedIdentity = "ManagedIdentity",
|
|
147
|
-
// (undocumented)
|
|
148
245
|
User = "User"
|
|
149
246
|
}
|
|
150
247
|
|
|
151
248
|
// @public
|
|
152
249
|
export enum KnownCustomParameterType {
|
|
153
|
-
// (undocumented)
|
|
154
250
|
Bool = "Bool",
|
|
155
|
-
// (undocumented)
|
|
156
251
|
Object = "Object",
|
|
157
|
-
// (undocumented)
|
|
158
252
|
String = "String"
|
|
159
253
|
}
|
|
160
254
|
|
|
161
255
|
// @public
|
|
162
256
|
export enum KnownEncryptionKeySource {
|
|
163
|
-
// (undocumented)
|
|
164
257
|
MicrosoftKeyvault = "Microsoft.Keyvault"
|
|
165
258
|
}
|
|
166
259
|
|
|
167
260
|
// @public
|
|
168
261
|
export enum KnownKeySource {
|
|
169
|
-
// (undocumented)
|
|
170
262
|
Default = "Default",
|
|
171
|
-
// (undocumented)
|
|
172
263
|
MicrosoftKeyvault = "Microsoft.Keyvault"
|
|
173
264
|
}
|
|
174
265
|
|
|
266
|
+
// @public
|
|
267
|
+
export enum KnownManagedServiceIdentityType {
|
|
268
|
+
None = "None",
|
|
269
|
+
SystemAssigned = "SystemAssigned",
|
|
270
|
+
SystemAssignedUserAssigned = "SystemAssigned,UserAssigned",
|
|
271
|
+
UserAssigned = "UserAssigned"
|
|
272
|
+
}
|
|
273
|
+
|
|
175
274
|
// @public
|
|
176
275
|
export enum KnownPeeringProvisioningState {
|
|
177
|
-
// (undocumented)
|
|
178
276
|
Deleting = "Deleting",
|
|
179
|
-
// (undocumented)
|
|
180
277
|
Failed = "Failed",
|
|
181
|
-
// (undocumented)
|
|
182
278
|
Succeeded = "Succeeded",
|
|
183
|
-
// (undocumented)
|
|
184
279
|
Updating = "Updating"
|
|
185
280
|
}
|
|
186
281
|
|
|
187
282
|
// @public
|
|
188
283
|
export enum KnownPeeringState {
|
|
189
|
-
// (undocumented)
|
|
190
284
|
Connected = "Connected",
|
|
191
|
-
// (undocumented)
|
|
192
285
|
Disconnected = "Disconnected",
|
|
193
|
-
// (undocumented)
|
|
194
286
|
Initiated = "Initiated"
|
|
195
287
|
}
|
|
196
288
|
|
|
197
289
|
// @public
|
|
198
290
|
export enum KnownPrivateEndpointConnectionProvisioningState {
|
|
199
|
-
// (undocumented)
|
|
200
291
|
Creating = "Creating",
|
|
201
|
-
// (undocumented)
|
|
202
292
|
Deleting = "Deleting",
|
|
203
|
-
// (undocumented)
|
|
204
293
|
Failed = "Failed",
|
|
205
|
-
// (undocumented)
|
|
206
294
|
Succeeded = "Succeeded",
|
|
207
|
-
// (undocumented)
|
|
208
295
|
Updating = "Updating"
|
|
209
296
|
}
|
|
210
297
|
|
|
211
298
|
// @public
|
|
212
299
|
export enum KnownPrivateLinkServiceConnectionStatus {
|
|
213
|
-
// (undocumented)
|
|
214
300
|
Approved = "Approved",
|
|
215
|
-
// (undocumented)
|
|
216
301
|
Disconnected = "Disconnected",
|
|
217
|
-
// (undocumented)
|
|
218
302
|
Pending = "Pending",
|
|
219
|
-
// (undocumented)
|
|
220
303
|
Rejected = "Rejected"
|
|
221
304
|
}
|
|
222
305
|
|
|
223
306
|
// @public
|
|
224
307
|
export enum KnownProvisioningState {
|
|
225
|
-
// (undocumented)
|
|
226
308
|
Accepted = "Accepted",
|
|
227
|
-
// (undocumented)
|
|
228
309
|
Canceled = "Canceled",
|
|
229
|
-
// (undocumented)
|
|
230
310
|
Created = "Created",
|
|
231
|
-
// (undocumented)
|
|
232
311
|
Creating = "Creating",
|
|
233
|
-
// (undocumented)
|
|
234
312
|
Deleted = "Deleted",
|
|
235
|
-
// (undocumented)
|
|
236
313
|
Deleting = "Deleting",
|
|
237
|
-
// (undocumented)
|
|
238
314
|
Failed = "Failed",
|
|
239
|
-
// (undocumented)
|
|
240
315
|
Ready = "Ready",
|
|
241
|
-
// (undocumented)
|
|
242
316
|
Running = "Running",
|
|
243
|
-
// (undocumented)
|
|
244
317
|
Succeeded = "Succeeded",
|
|
245
|
-
// (undocumented)
|
|
246
318
|
Updating = "Updating"
|
|
247
319
|
}
|
|
248
320
|
|
|
249
321
|
// @public
|
|
250
322
|
export enum KnownPublicNetworkAccess {
|
|
251
|
-
// (undocumented)
|
|
252
323
|
Disabled = "Disabled",
|
|
253
|
-
// (undocumented)
|
|
254
324
|
Enabled = "Enabled"
|
|
255
325
|
}
|
|
256
326
|
|
|
257
327
|
// @public
|
|
258
328
|
export enum KnownRequiredNsgRules {
|
|
259
|
-
// (undocumented)
|
|
260
329
|
AllRules = "AllRules",
|
|
261
|
-
// (undocumented)
|
|
262
330
|
NoAzureDatabricksRules = "NoAzureDatabricksRules",
|
|
263
|
-
// (undocumented)
|
|
264
331
|
NoAzureServiceRules = "NoAzureServiceRules"
|
|
265
332
|
}
|
|
266
333
|
|
|
334
|
+
// @public
|
|
335
|
+
export interface ManagedDiskEncryption {
|
|
336
|
+
keySource: EncryptionKeySource;
|
|
337
|
+
keyVaultProperties: ManagedDiskEncryptionKeyVaultProperties;
|
|
338
|
+
rotationToLatestKeyVersionEnabled?: boolean;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
// @public
|
|
342
|
+
export interface ManagedDiskEncryptionKeyVaultProperties {
|
|
343
|
+
keyName: string;
|
|
344
|
+
keyVaultUri: string;
|
|
345
|
+
keyVersion: string;
|
|
346
|
+
}
|
|
347
|
+
|
|
267
348
|
// @public
|
|
268
349
|
export interface ManagedIdentityConfiguration {
|
|
269
350
|
readonly principalId?: string;
|
|
@@ -271,6 +352,19 @@ export interface ManagedIdentityConfiguration {
|
|
|
271
352
|
readonly type?: string;
|
|
272
353
|
}
|
|
273
354
|
|
|
355
|
+
// @public
|
|
356
|
+
export interface ManagedServiceIdentity {
|
|
357
|
+
readonly principalId?: string;
|
|
358
|
+
readonly tenantId?: string;
|
|
359
|
+
type: ManagedServiceIdentityType;
|
|
360
|
+
userAssignedIdentities?: {
|
|
361
|
+
[propertyName: string]: UserAssignedIdentity;
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// @public
|
|
366
|
+
export type ManagedServiceIdentityType = string;
|
|
367
|
+
|
|
274
368
|
// @public
|
|
275
369
|
export interface Operation {
|
|
276
370
|
display?: OperationDisplay;
|
|
@@ -279,6 +373,7 @@ export interface Operation {
|
|
|
279
373
|
|
|
280
374
|
// @public
|
|
281
375
|
export interface OperationDisplay {
|
|
376
|
+
description?: string;
|
|
282
377
|
operation?: string;
|
|
283
378
|
provider?: string;
|
|
284
379
|
resource?: string;
|
|
@@ -348,6 +443,7 @@ export interface PrivateEndpointConnection {
|
|
|
348
443
|
|
|
349
444
|
// @public
|
|
350
445
|
export interface PrivateEndpointConnectionProperties {
|
|
446
|
+
groupIds?: string[];
|
|
351
447
|
privateEndpoint?: PrivateEndpoint;
|
|
352
448
|
privateLinkServiceConnectionState: PrivateLinkServiceConnectionState;
|
|
353
449
|
readonly provisioningState?: PrivateEndpointConnectionProvisioningState;
|
|
@@ -358,9 +454,9 @@ export type PrivateEndpointConnectionProvisioningState = string;
|
|
|
358
454
|
|
|
359
455
|
// @public
|
|
360
456
|
export interface PrivateEndpointConnections {
|
|
361
|
-
beginCreate(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise<
|
|
457
|
+
beginCreate(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise<SimplePollerLike<OperationState<PrivateEndpointConnectionsCreateResponse>, PrivateEndpointConnectionsCreateResponse>>;
|
|
362
458
|
beginCreateAndWait(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, privateEndpointConnection: PrivateEndpointConnection, options?: PrivateEndpointConnectionsCreateOptionalParams): Promise<PrivateEndpointConnectionsCreateResponse>;
|
|
363
|
-
beginDelete(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise<
|
|
459
|
+
beginDelete(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
364
460
|
beginDeleteAndWait(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsDeleteOptionalParams): Promise<void>;
|
|
365
461
|
get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: PrivateEndpointConnectionsGetOptionalParams): Promise<PrivateEndpointConnectionsGetResponse>;
|
|
366
462
|
list(resourceGroupName: string, workspaceName: string, options?: PrivateEndpointConnectionsListOptionalParams): PagedAsyncIterableIterator<PrivateEndpointConnection>;
|
|
@@ -443,7 +539,7 @@ export type PrivateLinkResourcesListResponse = PrivateLinkResourcesList;
|
|
|
443
539
|
|
|
444
540
|
// @public
|
|
445
541
|
export interface PrivateLinkServiceConnectionState {
|
|
446
|
-
|
|
542
|
+
actionsRequired?: string;
|
|
447
543
|
description?: string;
|
|
448
544
|
status: PrivateLinkServiceConnectionStatus;
|
|
449
545
|
}
|
|
@@ -484,12 +580,18 @@ export interface SystemData {
|
|
|
484
580
|
}
|
|
485
581
|
|
|
486
582
|
// @public
|
|
487
|
-
export
|
|
583
|
+
export interface TrackedResource extends Resource {
|
|
584
|
+
location: string;
|
|
488
585
|
tags?: {
|
|
489
586
|
[propertyName: string]: string;
|
|
490
587
|
};
|
|
491
|
-
|
|
492
|
-
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
// @public
|
|
591
|
+
export interface UserAssignedIdentity {
|
|
592
|
+
readonly clientId?: string;
|
|
593
|
+
readonly principalId?: string;
|
|
594
|
+
}
|
|
493
595
|
|
|
494
596
|
// @public
|
|
495
597
|
export interface VirtualNetworkPeering {
|
|
@@ -526,9 +628,9 @@ export interface VirtualNetworkPeeringPropertiesFormatRemoteVirtualNetwork {
|
|
|
526
628
|
|
|
527
629
|
// @public
|
|
528
630
|
export interface VNetPeering {
|
|
529
|
-
beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, peeringName: string, virtualNetworkPeeringParameters: VirtualNetworkPeering, options?: VNetPeeringCreateOrUpdateOptionalParams): Promise<
|
|
631
|
+
beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, peeringName: string, virtualNetworkPeeringParameters: VirtualNetworkPeering, options?: VNetPeeringCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<VNetPeeringCreateOrUpdateResponse>, VNetPeeringCreateOrUpdateResponse>>;
|
|
530
632
|
beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, peeringName: string, virtualNetworkPeeringParameters: VirtualNetworkPeering, options?: VNetPeeringCreateOrUpdateOptionalParams): Promise<VNetPeeringCreateOrUpdateResponse>;
|
|
531
|
-
beginDelete(resourceGroupName: string, workspaceName: string, peeringName: string, options?: VNetPeeringDeleteOptionalParams): Promise<
|
|
633
|
+
beginDelete(resourceGroupName: string, workspaceName: string, peeringName: string, options?: VNetPeeringDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
532
634
|
beginDeleteAndWait(resourceGroupName: string, workspaceName: string, peeringName: string, options?: VNetPeeringDeleteOptionalParams): Promise<void>;
|
|
533
635
|
get(resourceGroupName: string, workspaceName: string, peeringName: string, options?: VNetPeeringGetOptionalParams): Promise<VNetPeeringGetResponse>;
|
|
534
636
|
listByWorkspace(resourceGroupName: string, workspaceName: string, options?: VNetPeeringListByWorkspaceOptionalParams): PagedAsyncIterableIterator<VirtualNetworkPeering>;
|
|
@@ -571,25 +673,27 @@ export interface VNetPeeringListByWorkspaceOptionalParams extends coreClient.Ope
|
|
|
571
673
|
export type VNetPeeringListByWorkspaceResponse = VirtualNetworkPeeringList;
|
|
572
674
|
|
|
573
675
|
// @public
|
|
574
|
-
export
|
|
575
|
-
sku?: Sku;
|
|
576
|
-
readonly systemData?: SystemData;
|
|
577
|
-
managedResourceGroupId: string;
|
|
578
|
-
parameters?: WorkspaceCustomParameters;
|
|
579
|
-
readonly provisioningState?: ProvisioningState;
|
|
580
|
-
uiDefinitionUri?: string;
|
|
676
|
+
export interface Workspace extends TrackedResource {
|
|
581
677
|
authorizations?: WorkspaceProviderAuthorization[];
|
|
582
678
|
createdBy?: CreatedBy;
|
|
583
|
-
updatedBy?: CreatedBy;
|
|
584
679
|
readonly createdDateTime?: Date;
|
|
585
|
-
readonly
|
|
586
|
-
readonly workspaceUrl?: string;
|
|
587
|
-
storageAccountIdentity?: ManagedIdentityConfiguration;
|
|
680
|
+
readonly diskEncryptionSetId?: string;
|
|
588
681
|
encryption?: WorkspacePropertiesEncryption;
|
|
682
|
+
managedDiskIdentity?: ManagedIdentityConfiguration;
|
|
683
|
+
managedResourceGroupId: string;
|
|
684
|
+
parameters?: WorkspaceCustomParameters;
|
|
589
685
|
readonly privateEndpointConnections?: PrivateEndpointConnection[];
|
|
686
|
+
readonly provisioningState?: ProvisioningState;
|
|
590
687
|
publicNetworkAccess?: PublicNetworkAccess;
|
|
591
688
|
requiredNsgRules?: RequiredNsgRules;
|
|
592
|
-
|
|
689
|
+
sku?: Sku;
|
|
690
|
+
storageAccountIdentity?: ManagedIdentityConfiguration;
|
|
691
|
+
readonly systemData?: SystemData;
|
|
692
|
+
uiDefinitionUri?: string;
|
|
693
|
+
updatedBy?: CreatedBy;
|
|
694
|
+
readonly workspaceId?: string;
|
|
695
|
+
readonly workspaceUrl?: string;
|
|
696
|
+
}
|
|
593
697
|
|
|
594
698
|
// @public
|
|
595
699
|
export interface WorkspaceCustomBooleanParameter {
|
|
@@ -654,11 +758,11 @@ export interface WorkspaceProviderAuthorization {
|
|
|
654
758
|
|
|
655
759
|
// @public
|
|
656
760
|
export interface Workspaces {
|
|
657
|
-
beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise<
|
|
761
|
+
beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise<SimplePollerLike<OperationState<WorkspacesCreateOrUpdateResponse>, WorkspacesCreateOrUpdateResponse>>;
|
|
658
762
|
beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, parameters: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise<WorkspacesCreateOrUpdateResponse>;
|
|
659
|
-
beginDelete(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise<
|
|
763
|
+
beginDelete(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
660
764
|
beginDeleteAndWait(resourceGroupName: string, workspaceName: string, options?: WorkspacesDeleteOptionalParams): Promise<void>;
|
|
661
|
-
beginUpdate(resourceGroupName: string, workspaceName: string, parameters: WorkspaceUpdate, options?: WorkspacesUpdateOptionalParams): Promise<
|
|
765
|
+
beginUpdate(resourceGroupName: string, workspaceName: string, parameters: WorkspaceUpdate, options?: WorkspacesUpdateOptionalParams): Promise<SimplePollerLike<OperationState<WorkspacesUpdateResponse>, WorkspacesUpdateResponse>>;
|
|
662
766
|
beginUpdateAndWait(resourceGroupName: string, workspaceName: string, parameters: WorkspaceUpdate, options?: WorkspacesUpdateOptionalParams): Promise<WorkspacesUpdateResponse>;
|
|
663
767
|
get(resourceGroupName: string, workspaceName: string, options?: WorkspacesGetOptionalParams): Promise<WorkspacesGetResponse>;
|
|
664
768
|
listByResourceGroup(resourceGroupName: string, options?: WorkspacesListByResourceGroupOptionalParams): PagedAsyncIterableIterator<Workspace>;
|
|
@@ -15,7 +15,8 @@ import {
|
|
|
15
15
|
PrivateLinkResourcesImpl,
|
|
16
16
|
PrivateEndpointConnectionsImpl,
|
|
17
17
|
OutboundNetworkDependenciesEndpointsImpl,
|
|
18
|
-
VNetPeeringImpl
|
|
18
|
+
VNetPeeringImpl,
|
|
19
|
+
AccessConnectorsImpl
|
|
19
20
|
} from "./operations";
|
|
20
21
|
import {
|
|
21
22
|
Workspaces,
|
|
@@ -23,13 +24,13 @@ import {
|
|
|
23
24
|
PrivateLinkResources,
|
|
24
25
|
PrivateEndpointConnections,
|
|
25
26
|
OutboundNetworkDependenciesEndpoints,
|
|
26
|
-
VNetPeering
|
|
27
|
+
VNetPeering,
|
|
28
|
+
AccessConnectors
|
|
27
29
|
} from "./operationsInterfaces";
|
|
28
30
|
import { AzureDatabricksManagementClientOptionalParams } from "./models";
|
|
29
31
|
|
|
30
32
|
export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
|
|
31
33
|
$host: string;
|
|
32
|
-
apiVersion: string;
|
|
33
34
|
subscriptionId: string;
|
|
34
35
|
|
|
35
36
|
/**
|
|
@@ -59,54 +60,59 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
|
|
|
59
60
|
credential: credentials
|
|
60
61
|
};
|
|
61
62
|
|
|
62
|
-
const packageDetails = `azsdk-js-arm-databricks/3.0.0
|
|
63
|
+
const packageDetails = `azsdk-js-arm-databricks/3.0.0`;
|
|
63
64
|
const userAgentPrefix =
|
|
64
65
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
65
66
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
66
67
|
: `${packageDetails}`;
|
|
67
68
|
|
|
68
|
-
if (!options.credentialScopes) {
|
|
69
|
-
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
70
|
-
}
|
|
71
69
|
const optionsWithDefaults = {
|
|
72
70
|
...defaults,
|
|
73
71
|
...options,
|
|
74
72
|
userAgentOptions: {
|
|
75
73
|
userAgentPrefix
|
|
76
74
|
},
|
|
77
|
-
|
|
75
|
+
endpoint:
|
|
78
76
|
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
79
77
|
};
|
|
80
78
|
super(optionsWithDefaults);
|
|
81
79
|
|
|
80
|
+
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
|
82
81
|
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
83
82
|
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
|
84
|
-
|
|
83
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
85
84
|
(pipelinePolicy) =>
|
|
86
85
|
pipelinePolicy.name ===
|
|
87
86
|
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
88
87
|
);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
88
|
+
}
|
|
89
|
+
if (
|
|
90
|
+
!options ||
|
|
91
|
+
!options.pipeline ||
|
|
92
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
93
|
+
!bearerTokenAuthenticationPolicyFound
|
|
94
|
+
) {
|
|
95
|
+
this.pipeline.removePolicy({
|
|
96
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
97
|
+
});
|
|
98
|
+
this.pipeline.addPolicy(
|
|
99
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
100
|
+
credential: credentials,
|
|
101
|
+
scopes:
|
|
102
|
+
optionsWithDefaults.credentialScopes ??
|
|
103
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
104
|
+
challengeCallbacks: {
|
|
105
|
+
authorizeRequestOnChallenge:
|
|
106
|
+
coreClient.authorizeRequestOnClaimChallenge
|
|
107
|
+
}
|
|
108
|
+
})
|
|
109
|
+
);
|
|
103
110
|
}
|
|
104
111
|
// Parameter assignments
|
|
105
112
|
this.subscriptionId = subscriptionId;
|
|
106
113
|
|
|
107
114
|
// Assigning values to Constant parameters
|
|
108
115
|
this.$host = options.$host || "https://management.azure.com";
|
|
109
|
-
this.apiVersion = options.apiVersion || "2021-04-01-preview";
|
|
110
116
|
this.workspaces = new WorkspacesImpl(this);
|
|
111
117
|
this.operations = new OperationsImpl(this);
|
|
112
118
|
this.privateLinkResources = new PrivateLinkResourcesImpl(this);
|
|
@@ -115,6 +121,7 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
|
|
|
115
121
|
this
|
|
116
122
|
);
|
|
117
123
|
this.vNetPeering = new VNetPeeringImpl(this);
|
|
124
|
+
this.accessConnectors = new AccessConnectorsImpl(this);
|
|
118
125
|
}
|
|
119
126
|
|
|
120
127
|
workspaces: Workspaces;
|
|
@@ -123,4 +130,5 @@ export class AzureDatabricksManagementClient extends coreClient.ServiceClient {
|
|
|
123
130
|
privateEndpointConnections: PrivateEndpointConnections;
|
|
124
131
|
outboundNetworkDependenciesEndpoints: OutboundNetworkDependenciesEndpoints;
|
|
125
132
|
vNetPeering: VNetPeering;
|
|
133
|
+
accessConnectors: AccessConnectors;
|
|
126
134
|
}
|
package/src/index.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
/// <reference lib="esnext.asynciterable" />
|
|
10
|
+
export { getContinuationToken } from "./pagingHelper";
|
|
10
11
|
export * from "./models";
|
|
11
12
|
export { AzureDatabricksManagementClient } from "./azureDatabricksManagementClient";
|
|
12
13
|
export * from "./operationsInterfaces";
|
package/src/lroImpl.ts
CHANGED
|
@@ -6,29 +6,37 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
+
// Copyright (c) Microsoft Corporation.
|
|
10
|
+
// Licensed under the MIT license.
|
|
11
|
+
|
|
12
|
+
import { AbortSignalLike } from "@azure/abort-controller";
|
|
9
13
|
import { LongRunningOperation, LroResponse } from "@azure/core-lro";
|
|
10
14
|
|
|
11
|
-
export
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
...restSpec
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
15
|
+
export function createLroSpec<T>(inputs: {
|
|
16
|
+
sendOperationFn: (args: any, spec: any) => Promise<LroResponse<T>>;
|
|
17
|
+
args: Record<string, unknown>;
|
|
18
|
+
spec: {
|
|
19
|
+
readonly requestBody?: unknown;
|
|
20
|
+
readonly path?: string;
|
|
21
|
+
readonly httpMethod: string;
|
|
22
|
+
} & Record<string, any>;
|
|
23
|
+
}): LongRunningOperation<T> {
|
|
24
|
+
const { args, spec, sendOperationFn } = inputs;
|
|
25
|
+
return {
|
|
26
|
+
requestMethod: spec.httpMethod,
|
|
27
|
+
requestPath: spec.path!,
|
|
28
|
+
sendInitialRequest: () => sendOperationFn(args, spec),
|
|
29
|
+
sendPollRequest: (
|
|
30
|
+
path: string,
|
|
31
|
+
options?: { abortSignal?: AbortSignalLike }
|
|
32
|
+
) => {
|
|
33
|
+
const { requestBody, ...restSpec } = spec;
|
|
34
|
+
return sendOperationFn(args, {
|
|
35
|
+
...restSpec,
|
|
36
|
+
httpMethod: "GET",
|
|
37
|
+
path,
|
|
38
|
+
abortSignal: options?.abortSignal
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
34
42
|
}
|