@azure/arm-digitaltwins 2.1.1 → 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 +11 -0
- package/LICENSE +21 -0
- package/README.md +69 -83
- package/dist/index.js +2613 -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/azureDigitalTwinsManagementClient.d.ts +22 -0
- package/dist-esm/src/azureDigitalTwinsManagementClient.d.ts.map +1 -0
- package/dist-esm/src/azureDigitalTwinsManagementClient.js +55 -0
- package/dist-esm/src/azureDigitalTwinsManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -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 +677 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +85 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +40 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +441 -491
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +19 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +171 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/digitalTwins.d.ts +119 -0
- package/dist-esm/src/operations/digitalTwins.d.ts.map +1 -0
- package/dist-esm/src/operations/digitalTwins.js +549 -0
- package/dist-esm/src/operations/digitalTwins.js.map +1 -0
- package/dist-esm/src/operations/digitalTwinsEndpoint.d.ts +81 -0
- package/dist-esm/src/operations/digitalTwinsEndpoint.d.ts.map +1 -0
- package/dist-esm/src/operations/digitalTwinsEndpoint.js +345 -0
- package/dist-esm/src/operations/digitalTwinsEndpoint.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +1 -2
- 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/privateEndpointConnections.d.ts +63 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +264 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +28 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +85 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/digitalTwins.d.ts +83 -0
- package/dist-esm/src/operationsInterfaces/digitalTwins.d.ts.map +1 -0
- package/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/digitalTwins.js} +2 -9
- package/dist-esm/src/operationsInterfaces/digitalTwins.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/digitalTwinsEndpoint.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/digitalTwinsEndpoint.d.ts.map +1 -0
- package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/digitalTwinsEndpoint.js} +2 -2
- package/dist-esm/src/operationsInterfaces/digitalTwinsEndpoint.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -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/privateEndpointConnections.d.ts +55 -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 +20 -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/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +65 -32
- package/review/arm-digitaltwins.api.md +620 -0
- package/rollup.config.js +181 -30
- package/src/azureDigitalTwinsManagementClient.ts +80 -40
- package/src/{models/privateLinkResourcesMappers.ts → index.ts} +4 -9
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +589 -1071
- package/src/models/mappers.ts +444 -492
- package/src/models/parameters.ts +119 -54
- package/src/operations/digitalTwins.ts +555 -371
- package/src/operations/digitalTwinsEndpoint.ts +338 -192
- package/src/operations/index.ts +1 -2
- package/src/operations/operations.ts +85 -73
- package/src/operations/privateEndpointConnections.ts +246 -151
- package/src/operations/privateLinkResources.ts +60 -92
- package/src/operationsInterfaces/digitalTwins.ts +164 -0
- package/src/operationsInterfaces/digitalTwinsEndpoint.ts +115 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +108 -0
- package/src/operationsInterfaces/privateLinkResources.ts +42 -0
- package/tsconfig.json +3 -3
- package/types/arm-digitaltwins.d.ts +1009 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-digitaltwins.js +0 -2418
- package/dist/arm-digitaltwins.js.map +0 -1
- package/dist/arm-digitaltwins.min.js +0 -1
- package/dist/arm-digitaltwins.min.js.map +0 -1
- package/esm/azureDigitalTwinsManagementClient.d.ts +0 -28
- package/esm/azureDigitalTwinsManagementClient.d.ts.map +0 -1
- package/esm/azureDigitalTwinsManagementClient.js +0 -41
- package/esm/azureDigitalTwinsManagementClient.js.map +0 -1
- package/esm/azureDigitalTwinsManagementClientContext.d.ts +0 -22
- package/esm/azureDigitalTwinsManagementClientContext.d.ts.map +0 -1
- package/esm/azureDigitalTwinsManagementClientContext.js +0 -60
- package/esm/azureDigitalTwinsManagementClientContext.js.map +0 -1
- package/esm/models/digitalTwinsEndpointMappers.d.ts +0 -2
- package/esm/models/digitalTwinsEndpointMappers.d.ts.map +0 -1
- package/esm/models/digitalTwinsEndpointMappers.js +0 -9
- package/esm/models/digitalTwinsEndpointMappers.js.map +0 -1
- package/esm/models/digitalTwinsMappers.d.ts +0 -2
- package/esm/models/digitalTwinsMappers.d.ts.map +0 -1
- package/esm/models/digitalTwinsMappers.js +0 -9
- package/esm/models/digitalTwinsMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -1169
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -42
- 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 +0 -132
- 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/operations/digitalTwins.d.ts +0 -181
- package/esm/operations/digitalTwins.d.ts.map +0 -1
- package/esm/operations/digitalTwins.js +0 -383
- package/esm/operations/digitalTwins.js.map +0 -1
- package/esm/operations/digitalTwinsEndpoint.d.ts +0 -115
- package/esm/operations/digitalTwinsEndpoint.d.ts.map +0 -1
- package/esm/operations/digitalTwinsEndpoint.js +0 -242
- package/esm/operations/digitalTwinsEndpoint.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 -97
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -209
- package/esm/operations/privateEndpointConnections.js.map +0 -1
- package/esm/operations/privateLinkResources.d.ts +0 -58
- package/esm/operations/privateLinkResources.d.ts.map +0 -1
- package/esm/operations/privateLinkResources.js +0 -90
- package/esm/operations/privateLinkResources.js.map +0 -1
- package/src/azureDigitalTwinsManagementClientContext.ts +0 -67
- package/src/models/digitalTwinsEndpointMappers.ts +0 -31
- package/src/models/digitalTwinsMappers.ts +0 -35
- package/src/models/privateEndpointConnectionsMappers.ts +0 -31
|
@@ -3,26 +3,37 @@
|
|
|
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 * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as Mappers from "../models/privateEndpointConnectionsMappers";
|
|
9
|
+
import { PrivateEndpointConnections } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
14
12
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
13
|
+
import { AzureDigitalTwinsManagementClient } from "../azureDigitalTwinsManagementClient";
|
|
14
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
15
|
+
import { LroImpl } from "../lroImpl";
|
|
16
|
+
import {
|
|
17
|
+
PrivateEndpointConnectionsListOptionalParams,
|
|
18
|
+
PrivateEndpointConnectionsListResponse,
|
|
19
|
+
PrivateEndpointConnectionsGetOptionalParams,
|
|
20
|
+
PrivateEndpointConnectionsGetResponse,
|
|
21
|
+
PrivateEndpointConnectionsDeleteOptionalParams,
|
|
22
|
+
PrivateEndpointConnection,
|
|
23
|
+
PrivateEndpointConnectionsCreateOrUpdateOptionalParams,
|
|
24
|
+
PrivateEndpointConnectionsCreateOrUpdateResponse
|
|
25
|
+
} from "../models";
|
|
16
26
|
|
|
17
|
-
/** Class
|
|
18
|
-
export class
|
|
19
|
-
|
|
27
|
+
/** Class containing PrivateEndpointConnections operations. */
|
|
28
|
+
export class PrivateEndpointConnectionsImpl
|
|
29
|
+
implements PrivateEndpointConnections {
|
|
30
|
+
private readonly client: AzureDigitalTwinsManagementClient;
|
|
20
31
|
|
|
21
32
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
33
|
+
* Initialize a new instance of the class PrivateEndpointConnections class.
|
|
34
|
+
* @param client Reference to the service client
|
|
24
35
|
*/
|
|
25
|
-
constructor(client:
|
|
36
|
+
constructor(client: AzureDigitalTwinsManagementClient) {
|
|
26
37
|
this.client = client;
|
|
27
38
|
}
|
|
28
39
|
|
|
@@ -30,68 +41,109 @@ export class PrivateEndpointConnections {
|
|
|
30
41
|
* List private endpoint connection properties.
|
|
31
42
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
32
43
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
33
|
-
* @param
|
|
34
|
-
* @returns Promise<Models.PrivateEndpointConnectionsListResponse>
|
|
44
|
+
* @param options The options parameters.
|
|
35
45
|
*/
|
|
36
|
-
list(
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
list(
|
|
47
|
+
resourceGroupName: string,
|
|
48
|
+
resourceName: string,
|
|
49
|
+
options?: PrivateEndpointConnectionsListOptionalParams
|
|
50
|
+
): Promise<PrivateEndpointConnectionsListResponse> {
|
|
51
|
+
return this.client.sendOperationRequest(
|
|
52
|
+
{ resourceGroupName, resourceName, options },
|
|
53
|
+
listOperationSpec
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
43
57
|
/**
|
|
58
|
+
* Get private endpoint connection properties for the given private endpoint.
|
|
44
59
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
45
60
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
46
|
-
* @param
|
|
47
|
-
* @param
|
|
61
|
+
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
62
|
+
* @param options The options parameters.
|
|
48
63
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
64
|
+
get(
|
|
65
|
+
resourceGroupName: string,
|
|
66
|
+
resourceName: string,
|
|
67
|
+
privateEndpointConnectionName: string,
|
|
68
|
+
options?: PrivateEndpointConnectionsGetOptionalParams
|
|
69
|
+
): Promise<PrivateEndpointConnectionsGetResponse> {
|
|
51
70
|
return this.client.sendOperationRequest(
|
|
52
71
|
{
|
|
53
72
|
resourceGroupName,
|
|
54
73
|
resourceName,
|
|
74
|
+
privateEndpointConnectionName,
|
|
55
75
|
options
|
|
56
76
|
},
|
|
57
|
-
|
|
58
|
-
|
|
77
|
+
getOperationSpec
|
|
78
|
+
);
|
|
59
79
|
}
|
|
60
80
|
|
|
61
81
|
/**
|
|
62
|
-
*
|
|
63
|
-
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
64
|
-
* @param resourceName The name of the DigitalTwinsInstance.
|
|
65
|
-
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
66
|
-
* @param [options] The optional parameters
|
|
67
|
-
* @returns Promise<Models.PrivateEndpointConnectionsGetResponse>
|
|
68
|
-
*/
|
|
69
|
-
get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<Models.PrivateEndpointConnectionsGetResponse>;
|
|
70
|
-
/**
|
|
71
|
-
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
72
|
-
* @param resourceName The name of the DigitalTwinsInstance.
|
|
73
|
-
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
74
|
-
* @param callback The callback
|
|
75
|
-
*/
|
|
76
|
-
get(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback<Models.PrivateEndpointConnection>): void;
|
|
77
|
-
/**
|
|
82
|
+
* Delete private endpoint connection with the specified name.
|
|
78
83
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
79
84
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
80
85
|
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
81
|
-
* @param options The
|
|
82
|
-
* @param callback The callback
|
|
86
|
+
* @param options The options parameters.
|
|
83
87
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
async beginDelete(
|
|
89
|
+
resourceGroupName: string,
|
|
90
|
+
resourceName: string,
|
|
91
|
+
privateEndpointConnectionName: string,
|
|
92
|
+
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
|
93
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
94
|
+
const directSendOperation = async (
|
|
95
|
+
args: coreClient.OperationArguments,
|
|
96
|
+
spec: coreClient.OperationSpec
|
|
97
|
+
): Promise<void> => {
|
|
98
|
+
return this.client.sendOperationRequest(args, spec);
|
|
99
|
+
};
|
|
100
|
+
const sendOperation = async (
|
|
101
|
+
args: coreClient.OperationArguments,
|
|
102
|
+
spec: coreClient.OperationSpec
|
|
103
|
+
) => {
|
|
104
|
+
let currentRawResponse:
|
|
105
|
+
| coreClient.FullOperationResponse
|
|
106
|
+
| undefined = undefined;
|
|
107
|
+
const providedCallback = args.options?.onResponse;
|
|
108
|
+
const callback: coreClient.RawResponseCallback = (
|
|
109
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
110
|
+
flatResponse: unknown
|
|
111
|
+
) => {
|
|
112
|
+
currentRawResponse = rawResponse;
|
|
113
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
114
|
+
};
|
|
115
|
+
const updatedArgs = {
|
|
116
|
+
...args,
|
|
117
|
+
options: {
|
|
118
|
+
...args.options,
|
|
119
|
+
onResponse: callback
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
123
|
+
return {
|
|
124
|
+
flatResponse,
|
|
125
|
+
rawResponse: {
|
|
126
|
+
statusCode: currentRawResponse!.status,
|
|
127
|
+
body: currentRawResponse!.parsedBody,
|
|
128
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
const lro = new LroImpl(
|
|
134
|
+
sendOperation,
|
|
87
135
|
{
|
|
88
136
|
resourceGroupName,
|
|
89
137
|
resourceName,
|
|
90
138
|
privateEndpointConnectionName,
|
|
91
139
|
options
|
|
92
140
|
},
|
|
93
|
-
|
|
94
|
-
|
|
141
|
+
deleteOperationSpec
|
|
142
|
+
);
|
|
143
|
+
return new LroEngine(lro, {
|
|
144
|
+
resumeFrom: options?.resumeFrom,
|
|
145
|
+
intervalInMs: options?.updateIntervalInMs
|
|
146
|
+
});
|
|
95
147
|
}
|
|
96
148
|
|
|
97
149
|
/**
|
|
@@ -99,12 +151,21 @@ export class PrivateEndpointConnections {
|
|
|
99
151
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
100
152
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
101
153
|
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
102
|
-
* @param
|
|
103
|
-
* @returns Promise<msRest.RestResponse>
|
|
154
|
+
* @param options The options parameters.
|
|
104
155
|
*/
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
156
|
+
async beginDeleteAndWait(
|
|
157
|
+
resourceGroupName: string,
|
|
158
|
+
resourceName: string,
|
|
159
|
+
privateEndpointConnectionName: string,
|
|
160
|
+
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
|
161
|
+
): Promise<void> {
|
|
162
|
+
const poller = await this.beginDelete(
|
|
163
|
+
resourceGroupName,
|
|
164
|
+
resourceName,
|
|
165
|
+
privateEndpointConnectionName,
|
|
166
|
+
options
|
|
167
|
+
);
|
|
168
|
+
return poller.pollUntilDone();
|
|
108
169
|
}
|
|
109
170
|
|
|
110
171
|
/**
|
|
@@ -112,33 +173,75 @@ export class PrivateEndpointConnections {
|
|
|
112
173
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
113
174
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
114
175
|
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
115
|
-
* @param properties
|
|
116
|
-
* @param
|
|
117
|
-
* @returns Promise<Models.PrivateEndpointConnectionsCreateOrUpdateResponse>
|
|
176
|
+
* @param privateEndpointConnection The private endpoint connection with updated properties.
|
|
177
|
+
* @param options The options parameters.
|
|
118
178
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
179
|
+
async beginCreateOrUpdate(
|
|
180
|
+
resourceGroupName: string,
|
|
181
|
+
resourceName: string,
|
|
182
|
+
privateEndpointConnectionName: string,
|
|
183
|
+
privateEndpointConnection: PrivateEndpointConnection,
|
|
184
|
+
options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams
|
|
185
|
+
): Promise<
|
|
186
|
+
PollerLike<
|
|
187
|
+
PollOperationState<PrivateEndpointConnectionsCreateOrUpdateResponse>,
|
|
188
|
+
PrivateEndpointConnectionsCreateOrUpdateResponse
|
|
189
|
+
>
|
|
190
|
+
> {
|
|
191
|
+
const directSendOperation = async (
|
|
192
|
+
args: coreClient.OperationArguments,
|
|
193
|
+
spec: coreClient.OperationSpec
|
|
194
|
+
): Promise<PrivateEndpointConnectionsCreateOrUpdateResponse> => {
|
|
195
|
+
return this.client.sendOperationRequest(args, spec);
|
|
196
|
+
};
|
|
197
|
+
const sendOperation = async (
|
|
198
|
+
args: coreClient.OperationArguments,
|
|
199
|
+
spec: coreClient.OperationSpec
|
|
200
|
+
) => {
|
|
201
|
+
let currentRawResponse:
|
|
202
|
+
| coreClient.FullOperationResponse
|
|
203
|
+
| undefined = undefined;
|
|
204
|
+
const providedCallback = args.options?.onResponse;
|
|
205
|
+
const callback: coreClient.RawResponseCallback = (
|
|
206
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
207
|
+
flatResponse: unknown
|
|
208
|
+
) => {
|
|
209
|
+
currentRawResponse = rawResponse;
|
|
210
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
211
|
+
};
|
|
212
|
+
const updatedArgs = {
|
|
213
|
+
...args,
|
|
214
|
+
options: {
|
|
215
|
+
...args.options,
|
|
216
|
+
onResponse: callback
|
|
217
|
+
}
|
|
218
|
+
};
|
|
219
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
220
|
+
return {
|
|
221
|
+
flatResponse,
|
|
222
|
+
rawResponse: {
|
|
223
|
+
statusCode: currentRawResponse!.status,
|
|
224
|
+
body: currentRawResponse!.parsedBody,
|
|
225
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
};
|
|
123
229
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
127
|
-
* @param resourceName The name of the DigitalTwinsInstance.
|
|
128
|
-
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
129
|
-
* @param [options] The optional parameters
|
|
130
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
131
|
-
*/
|
|
132
|
-
beginDeleteMethod(resourceGroupName: string, resourceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
|
|
133
|
-
return this.client.sendLRORequest(
|
|
230
|
+
const lro = new LroImpl(
|
|
231
|
+
sendOperation,
|
|
134
232
|
{
|
|
135
233
|
resourceGroupName,
|
|
136
234
|
resourceName,
|
|
137
235
|
privateEndpointConnectionName,
|
|
236
|
+
privateEndpointConnection,
|
|
138
237
|
options
|
|
139
238
|
},
|
|
140
|
-
|
|
141
|
-
|
|
239
|
+
createOrUpdateOperationSpec
|
|
240
|
+
);
|
|
241
|
+
return new LroEngine(lro, {
|
|
242
|
+
resumeFrom: options?.resumeFrom,
|
|
243
|
+
intervalInMs: options?.updateIntervalInMs
|
|
244
|
+
});
|
|
142
245
|
}
|
|
143
246
|
|
|
144
247
|
/**
|
|
@@ -146,40 +249,33 @@ export class PrivateEndpointConnections {
|
|
|
146
249
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
147
250
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
148
251
|
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
149
|
-
* @param properties
|
|
150
|
-
* @param
|
|
151
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
252
|
+
* @param privateEndpointConnection The private endpoint connection with updated properties.
|
|
253
|
+
* @param options The options parameters.
|
|
152
254
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
255
|
+
async beginCreateOrUpdateAndWait(
|
|
256
|
+
resourceGroupName: string,
|
|
257
|
+
resourceName: string,
|
|
258
|
+
privateEndpointConnectionName: string,
|
|
259
|
+
privateEndpointConnection: PrivateEndpointConnection,
|
|
260
|
+
options?: PrivateEndpointConnectionsCreateOrUpdateOptionalParams
|
|
261
|
+
): Promise<PrivateEndpointConnectionsCreateOrUpdateResponse> {
|
|
262
|
+
const poller = await this.beginCreateOrUpdate(
|
|
263
|
+
resourceGroupName,
|
|
264
|
+
resourceName,
|
|
265
|
+
privateEndpointConnectionName,
|
|
266
|
+
privateEndpointConnection,
|
|
267
|
+
options
|
|
268
|
+
);
|
|
269
|
+
return poller.pollUntilDone();
|
|
164
270
|
}
|
|
165
271
|
}
|
|
166
|
-
|
|
167
272
|
// Operation Specifications
|
|
168
|
-
const serializer =
|
|
169
|
-
|
|
273
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
274
|
+
|
|
275
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
276
|
+
path:
|
|
277
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections",
|
|
170
278
|
httpMethod: "GET",
|
|
171
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections",
|
|
172
|
-
urlParameters: [
|
|
173
|
-
Parameters.subscriptionId,
|
|
174
|
-
Parameters.resourceGroupName,
|
|
175
|
-
Parameters.resourceName
|
|
176
|
-
],
|
|
177
|
-
queryParameters: [
|
|
178
|
-
Parameters.apiVersion
|
|
179
|
-
],
|
|
180
|
-
headerParameters: [
|
|
181
|
-
Parameters.acceptLanguage
|
|
182
|
-
],
|
|
183
279
|
responses: {
|
|
184
280
|
200: {
|
|
185
281
|
bodyMapper: Mappers.PrivateEndpointConnectionsResponse
|
|
@@ -188,24 +284,20 @@ const listOperationSpec: msRest.OperationSpec = {
|
|
|
188
284
|
bodyMapper: Mappers.ErrorResponse
|
|
189
285
|
}
|
|
190
286
|
},
|
|
191
|
-
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
const getOperationSpec: msRest.OperationSpec = {
|
|
195
|
-
httpMethod: "GET",
|
|
196
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
|
287
|
+
queryParameters: [Parameters.apiVersion],
|
|
197
288
|
urlParameters: [
|
|
289
|
+
Parameters.$host,
|
|
198
290
|
Parameters.subscriptionId,
|
|
199
291
|
Parameters.resourceGroupName,
|
|
200
|
-
Parameters.resourceName
|
|
201
|
-
Parameters.privateEndpointConnectionName
|
|
202
|
-
],
|
|
203
|
-
queryParameters: [
|
|
204
|
-
Parameters.apiVersion
|
|
205
|
-
],
|
|
206
|
-
headerParameters: [
|
|
207
|
-
Parameters.acceptLanguage
|
|
292
|
+
Parameters.resourceName
|
|
208
293
|
],
|
|
294
|
+
headerParameters: [Parameters.accept],
|
|
295
|
+
serializer
|
|
296
|
+
};
|
|
297
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
298
|
+
path:
|
|
299
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
|
300
|
+
httpMethod: "GET",
|
|
209
301
|
responses: {
|
|
210
302
|
200: {
|
|
211
303
|
bodyMapper: Mappers.PrivateEndpointConnection
|
|
@@ -214,69 +306,72 @@ const getOperationSpec: msRest.OperationSpec = {
|
|
|
214
306
|
bodyMapper: Mappers.ErrorResponse
|
|
215
307
|
}
|
|
216
308
|
},
|
|
217
|
-
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
|
|
221
|
-
httpMethod: "DELETE",
|
|
222
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
|
309
|
+
queryParameters: [Parameters.apiVersion],
|
|
223
310
|
urlParameters: [
|
|
311
|
+
Parameters.$host,
|
|
224
312
|
Parameters.subscriptionId,
|
|
225
313
|
Parameters.resourceGroupName,
|
|
226
314
|
Parameters.resourceName,
|
|
227
315
|
Parameters.privateEndpointConnectionName
|
|
228
316
|
],
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
317
|
+
headerParameters: [Parameters.accept],
|
|
318
|
+
serializer
|
|
319
|
+
};
|
|
320
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
321
|
+
path:
|
|
322
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
|
323
|
+
httpMethod: "DELETE",
|
|
235
324
|
responses: {
|
|
236
325
|
200: {},
|
|
326
|
+
201: {},
|
|
237
327
|
202: {},
|
|
238
328
|
204: {},
|
|
239
329
|
default: {
|
|
240
330
|
bodyMapper: Mappers.ErrorResponse
|
|
241
331
|
}
|
|
242
332
|
},
|
|
243
|
-
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
247
|
-
httpMethod: "PUT",
|
|
248
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
|
333
|
+
queryParameters: [Parameters.apiVersion],
|
|
249
334
|
urlParameters: [
|
|
335
|
+
Parameters.$host,
|
|
250
336
|
Parameters.subscriptionId,
|
|
251
337
|
Parameters.resourceGroupName,
|
|
252
338
|
Parameters.resourceName,
|
|
253
339
|
Parameters.privateEndpointConnectionName
|
|
254
340
|
],
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
parameterPath: {
|
|
263
|
-
properties: "properties"
|
|
264
|
-
},
|
|
265
|
-
mapper: {
|
|
266
|
-
...Mappers.PrivateEndpointConnection,
|
|
267
|
-
required: true
|
|
268
|
-
}
|
|
269
|
-
},
|
|
341
|
+
headerParameters: [Parameters.accept],
|
|
342
|
+
serializer
|
|
343
|
+
};
|
|
344
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
345
|
+
path:
|
|
346
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
|
347
|
+
httpMethod: "PUT",
|
|
270
348
|
responses: {
|
|
271
349
|
200: {
|
|
272
350
|
bodyMapper: Mappers.PrivateEndpointConnection
|
|
273
351
|
},
|
|
352
|
+
201: {
|
|
353
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
354
|
+
},
|
|
274
355
|
202: {
|
|
275
356
|
bodyMapper: Mappers.PrivateEndpointConnection
|
|
276
357
|
},
|
|
358
|
+
204: {
|
|
359
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
360
|
+
},
|
|
277
361
|
default: {
|
|
278
362
|
bodyMapper: Mappers.ErrorResponse
|
|
279
363
|
}
|
|
280
364
|
},
|
|
365
|
+
requestBody: Parameters.privateEndpointConnection,
|
|
366
|
+
queryParameters: [Parameters.apiVersion],
|
|
367
|
+
urlParameters: [
|
|
368
|
+
Parameters.$host,
|
|
369
|
+
Parameters.subscriptionId,
|
|
370
|
+
Parameters.resourceGroupName,
|
|
371
|
+
Parameters.resourceName,
|
|
372
|
+
Parameters.privateEndpointConnectionName
|
|
373
|
+
],
|
|
374
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
375
|
+
mediaType: "json",
|
|
281
376
|
serializer
|
|
282
377
|
};
|