@azure/arm-digitaltwins 1.0.0 → 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/LICENSE.txt +1 -1
- package/README.md +72 -77
- 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 +609 -256
- 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/dist-esm/src/operations/index.d.ts +6 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +5 -5
- 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/dist-esm/src/operationsInterfaces/digitalTwins.js +9 -0
- 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/dist-esm/src/operationsInterfaces/digitalTwinsEndpoint.js +9 -0
- 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/dist-esm/src/operationsInterfaces/operations.js +9 -0
- 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 -31
- package/review/arm-digitaltwins.api.md +620 -0
- package/rollup.config.js +181 -30
- package/src/azureDigitalTwinsManagementClient.ts +82 -33
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +587 -684
- package/src/models/mappers.ts +638 -255
- package/src/models/parameters.ts +128 -44
- package/src/operations/digitalTwins.ts +557 -367
- package/src/operations/digitalTwinsEndpoint.ts +340 -192
- package/src/operations/index.ts +5 -5
- package/src/operations/operations.ts +87 -73
- package/src/operations/privateEndpointConnections.ts +377 -0
- package/src/operations/privateLinkResources.ts +116 -0
- 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 -1601
- 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 -20
- package/esm/azureDigitalTwinsManagementClient.d.ts.map +0 -1
- package/esm/azureDigitalTwinsManagementClient.js +0 -35
- package/esm/azureDigitalTwinsManagementClient.js.map +0 -1
- package/esm/azureDigitalTwinsManagementClientContext.d.ts +0 -16
- package/esm/azureDigitalTwinsManagementClientContext.d.ts.map +0 -1
- package/esm/azureDigitalTwinsManagementClientContext.js +0 -56
- 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 -815
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -8
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -28
- 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 +0 -9
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -10
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -113
- package/esm/models/parameters.js.map +0 -1
- package/esm/operations/digitalTwins.d.ts +0 -179
- package/esm/operations/digitalTwins.d.ts.map +0 -1
- package/esm/operations/digitalTwins.js +0 -377
- package/esm/operations/digitalTwins.js.map +0 -1
- package/esm/operations/digitalTwinsEndpoint.d.ts +0 -113
- package/esm/operations/digitalTwinsEndpoint.d.ts.map +0 -1
- package/esm/operations/digitalTwinsEndpoint.js +0 -240
- package/esm/operations/digitalTwinsEndpoint.js.map +0 -1
- package/esm/operations/index.d.ts +0 -4
- 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 -77
- package/esm/operations/operations.js.map +0 -1
- package/src/azureDigitalTwinsManagementClientContext.ts +0 -62
- package/src/models/digitalTwinsEndpointMappers.ts +0 -23
- package/src/models/digitalTwinsMappers.ts +0 -26
- package/src/models/operationsMappers.ts +0 -16
|
@@ -1,29 +1,43 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
4
|
-
* license information.
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
5
4
|
*
|
|
6
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
9
7
|
*/
|
|
10
8
|
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import * as
|
|
14
|
-
import * as Mappers from "../models/
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { DigitalTwinsEndpoint } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
15
13
|
import * as Parameters from "../models/parameters";
|
|
16
|
-
import {
|
|
14
|
+
import { AzureDigitalTwinsManagementClient } from "../azureDigitalTwinsManagementClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
DigitalTwinsEndpointResource,
|
|
19
|
+
DigitalTwinsEndpointListNextOptionalParams,
|
|
20
|
+
DigitalTwinsEndpointListOptionalParams,
|
|
21
|
+
DigitalTwinsEndpointListResponse,
|
|
22
|
+
DigitalTwinsEndpointGetOptionalParams,
|
|
23
|
+
DigitalTwinsEndpointGetResponse,
|
|
24
|
+
DigitalTwinsEndpointCreateOrUpdateOptionalParams,
|
|
25
|
+
DigitalTwinsEndpointCreateOrUpdateResponse,
|
|
26
|
+
DigitalTwinsEndpointDeleteOptionalParams,
|
|
27
|
+
DigitalTwinsEndpointDeleteResponse,
|
|
28
|
+
DigitalTwinsEndpointListNextResponse
|
|
29
|
+
} from "../models";
|
|
17
30
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
/// <reference lib="esnext.asynciterable" />
|
|
32
|
+
/** Class containing DigitalTwinsEndpoint operations. */
|
|
33
|
+
export class DigitalTwinsEndpointImpl implements DigitalTwinsEndpoint {
|
|
34
|
+
private readonly client: AzureDigitalTwinsManagementClient;
|
|
21
35
|
|
|
22
36
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @param
|
|
37
|
+
* Initialize a new instance of the class DigitalTwinsEndpoint class.
|
|
38
|
+
* @param client Reference to the service client
|
|
25
39
|
*/
|
|
26
|
-
constructor(client:
|
|
40
|
+
constructor(client: AzureDigitalTwinsManagementClient) {
|
|
27
41
|
this.client = client;
|
|
28
42
|
}
|
|
29
43
|
|
|
@@ -31,68 +45,171 @@ export class DigitalTwinsEndpoint {
|
|
|
31
45
|
* Get DigitalTwinsInstance Endpoints.
|
|
32
46
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
33
47
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
34
|
-
* @param
|
|
35
|
-
* @returns Promise<Models.DigitalTwinsEndpointListResponse>
|
|
48
|
+
* @param options The options parameters.
|
|
36
49
|
*/
|
|
37
|
-
list(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
public list(
|
|
51
|
+
resourceGroupName: string,
|
|
52
|
+
resourceName: string,
|
|
53
|
+
options?: DigitalTwinsEndpointListOptionalParams
|
|
54
|
+
): PagedAsyncIterableIterator<DigitalTwinsEndpointResource> {
|
|
55
|
+
const iter = this.listPagingAll(resourceGroupName, resourceName, options);
|
|
56
|
+
return {
|
|
57
|
+
next() {
|
|
58
|
+
return iter.next();
|
|
59
|
+
},
|
|
60
|
+
[Symbol.asyncIterator]() {
|
|
61
|
+
return this;
|
|
62
|
+
},
|
|
63
|
+
byPage: () => {
|
|
64
|
+
return this.listPagingPage(resourceGroupName, resourceName, options);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private async *listPagingPage(
|
|
70
|
+
resourceGroupName: string,
|
|
71
|
+
resourceName: string,
|
|
72
|
+
options?: DigitalTwinsEndpointListOptionalParams
|
|
73
|
+
): AsyncIterableIterator<DigitalTwinsEndpointResource[]> {
|
|
74
|
+
let result = await this._list(resourceGroupName, resourceName, options);
|
|
75
|
+
yield result.value || [];
|
|
76
|
+
let continuationToken = result.nextLink;
|
|
77
|
+
while (continuationToken) {
|
|
78
|
+
result = await this._listNext(
|
|
54
79
|
resourceGroupName,
|
|
55
80
|
resourceName,
|
|
81
|
+
continuationToken,
|
|
56
82
|
options
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
83
|
+
);
|
|
84
|
+
continuationToken = result.nextLink;
|
|
85
|
+
yield result.value || [];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private async *listPagingAll(
|
|
90
|
+
resourceGroupName: string,
|
|
91
|
+
resourceName: string,
|
|
92
|
+
options?: DigitalTwinsEndpointListOptionalParams
|
|
93
|
+
): AsyncIterableIterator<DigitalTwinsEndpointResource> {
|
|
94
|
+
for await (const page of this.listPagingPage(
|
|
95
|
+
resourceGroupName,
|
|
96
|
+
resourceName,
|
|
97
|
+
options
|
|
98
|
+
)) {
|
|
99
|
+
yield* page;
|
|
100
|
+
}
|
|
60
101
|
}
|
|
61
102
|
|
|
62
103
|
/**
|
|
63
|
-
* Get
|
|
104
|
+
* Get DigitalTwinsInstance Endpoints.
|
|
64
105
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
65
106
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
66
|
-
* @param
|
|
67
|
-
* @param [options] The optional parameters
|
|
68
|
-
* @returns Promise<Models.DigitalTwinsEndpointGetResponse>
|
|
107
|
+
* @param options The options parameters.
|
|
69
108
|
*/
|
|
70
|
-
|
|
109
|
+
private _list(
|
|
110
|
+
resourceGroupName: string,
|
|
111
|
+
resourceName: string,
|
|
112
|
+
options?: DigitalTwinsEndpointListOptionalParams
|
|
113
|
+
): Promise<DigitalTwinsEndpointListResponse> {
|
|
114
|
+
return this.client.sendOperationRequest(
|
|
115
|
+
{ resourceGroupName, resourceName, options },
|
|
116
|
+
listOperationSpec
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
71
120
|
/**
|
|
121
|
+
* Get DigitalTwinsInstances Endpoint.
|
|
72
122
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
73
123
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
74
124
|
* @param endpointName Name of Endpoint Resource.
|
|
75
|
-
* @param
|
|
125
|
+
* @param options The options parameters.
|
|
76
126
|
*/
|
|
77
|
-
get(
|
|
127
|
+
get(
|
|
128
|
+
resourceGroupName: string,
|
|
129
|
+
resourceName: string,
|
|
130
|
+
endpointName: string,
|
|
131
|
+
options?: DigitalTwinsEndpointGetOptionalParams
|
|
132
|
+
): Promise<DigitalTwinsEndpointGetResponse> {
|
|
133
|
+
return this.client.sendOperationRequest(
|
|
134
|
+
{ resourceGroupName, resourceName, endpointName, options },
|
|
135
|
+
getOperationSpec
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
|
|
78
139
|
/**
|
|
140
|
+
* Create or update DigitalTwinsInstance endpoint.
|
|
79
141
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
80
142
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
81
143
|
* @param endpointName Name of Endpoint Resource.
|
|
82
|
-
* @param
|
|
83
|
-
* @param
|
|
144
|
+
* @param endpointDescription The DigitalTwinsInstance endpoint metadata and security metadata.
|
|
145
|
+
* @param options The options parameters.
|
|
84
146
|
*/
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
147
|
+
async beginCreateOrUpdate(
|
|
148
|
+
resourceGroupName: string,
|
|
149
|
+
resourceName: string,
|
|
150
|
+
endpointName: string,
|
|
151
|
+
endpointDescription: DigitalTwinsEndpointResource,
|
|
152
|
+
options?: DigitalTwinsEndpointCreateOrUpdateOptionalParams
|
|
153
|
+
): Promise<
|
|
154
|
+
PollerLike<
|
|
155
|
+
PollOperationState<DigitalTwinsEndpointCreateOrUpdateResponse>,
|
|
156
|
+
DigitalTwinsEndpointCreateOrUpdateResponse
|
|
157
|
+
>
|
|
158
|
+
> {
|
|
159
|
+
const directSendOperation = async (
|
|
160
|
+
args: coreClient.OperationArguments,
|
|
161
|
+
spec: coreClient.OperationSpec
|
|
162
|
+
): Promise<DigitalTwinsEndpointCreateOrUpdateResponse> => {
|
|
163
|
+
return this.client.sendOperationRequest(args, spec);
|
|
164
|
+
};
|
|
165
|
+
const sendOperation = async (
|
|
166
|
+
args: coreClient.OperationArguments,
|
|
167
|
+
spec: coreClient.OperationSpec
|
|
168
|
+
) => {
|
|
169
|
+
let currentRawResponse:
|
|
170
|
+
| coreClient.FullOperationResponse
|
|
171
|
+
| undefined = undefined;
|
|
172
|
+
const providedCallback = args.options?.onResponse;
|
|
173
|
+
const callback: coreClient.RawResponseCallback = (
|
|
174
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
175
|
+
flatResponse: unknown
|
|
176
|
+
) => {
|
|
177
|
+
currentRawResponse = rawResponse;
|
|
178
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
179
|
+
};
|
|
180
|
+
const updatedArgs = {
|
|
181
|
+
...args,
|
|
182
|
+
options: {
|
|
183
|
+
...args.options,
|
|
184
|
+
onResponse: callback
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
188
|
+
return {
|
|
189
|
+
flatResponse,
|
|
190
|
+
rawResponse: {
|
|
191
|
+
statusCode: currentRawResponse!.status,
|
|
192
|
+
body: currentRawResponse!.parsedBody,
|
|
193
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
const lro = new LroImpl(
|
|
199
|
+
sendOperation,
|
|
88
200
|
{
|
|
89
201
|
resourceGroupName,
|
|
90
202
|
resourceName,
|
|
91
203
|
endpointName,
|
|
204
|
+
endpointDescription,
|
|
92
205
|
options
|
|
93
206
|
},
|
|
94
|
-
|
|
95
|
-
|
|
207
|
+
createOrUpdateOperationSpec
|
|
208
|
+
);
|
|
209
|
+
return new LroEngine(lro, {
|
|
210
|
+
resumeFrom: options?.resumeFrom,
|
|
211
|
+
intervalInMs: options?.updateIntervalInMs
|
|
212
|
+
});
|
|
96
213
|
}
|
|
97
214
|
|
|
98
215
|
/**
|
|
@@ -100,12 +217,24 @@ export class DigitalTwinsEndpoint {
|
|
|
100
217
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
101
218
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
102
219
|
* @param endpointName Name of Endpoint Resource.
|
|
103
|
-
* @param
|
|
104
|
-
* @
|
|
220
|
+
* @param endpointDescription The DigitalTwinsInstance endpoint metadata and security metadata.
|
|
221
|
+
* @param options The options parameters.
|
|
105
222
|
*/
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
223
|
+
async beginCreateOrUpdateAndWait(
|
|
224
|
+
resourceGroupName: string,
|
|
225
|
+
resourceName: string,
|
|
226
|
+
endpointName: string,
|
|
227
|
+
endpointDescription: DigitalTwinsEndpointResource,
|
|
228
|
+
options?: DigitalTwinsEndpointCreateOrUpdateOptionalParams
|
|
229
|
+
): Promise<DigitalTwinsEndpointCreateOrUpdateResponse> {
|
|
230
|
+
const poller = await this.beginCreateOrUpdate(
|
|
231
|
+
resourceGroupName,
|
|
232
|
+
resourceName,
|
|
233
|
+
endpointName,
|
|
234
|
+
endpointDescription,
|
|
235
|
+
options
|
|
236
|
+
);
|
|
237
|
+
return poller.pollUntilDone();
|
|
109
238
|
}
|
|
110
239
|
|
|
111
240
|
/**
|
|
@@ -113,32 +242,67 @@ export class DigitalTwinsEndpoint {
|
|
|
113
242
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
114
243
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
115
244
|
* @param endpointName Name of Endpoint Resource.
|
|
116
|
-
* @param
|
|
117
|
-
* @returns Promise<Models.DigitalTwinsEndpointDeleteMethodResponse>
|
|
245
|
+
* @param options The options parameters.
|
|
118
246
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
247
|
+
async beginDelete(
|
|
248
|
+
resourceGroupName: string,
|
|
249
|
+
resourceName: string,
|
|
250
|
+
endpointName: string,
|
|
251
|
+
options?: DigitalTwinsEndpointDeleteOptionalParams
|
|
252
|
+
): Promise<
|
|
253
|
+
PollerLike<
|
|
254
|
+
PollOperationState<DigitalTwinsEndpointDeleteResponse>,
|
|
255
|
+
DigitalTwinsEndpointDeleteResponse
|
|
256
|
+
>
|
|
257
|
+
> {
|
|
258
|
+
const directSendOperation = async (
|
|
259
|
+
args: coreClient.OperationArguments,
|
|
260
|
+
spec: coreClient.OperationSpec
|
|
261
|
+
): Promise<DigitalTwinsEndpointDeleteResponse> => {
|
|
262
|
+
return this.client.sendOperationRequest(args, spec);
|
|
263
|
+
};
|
|
264
|
+
const sendOperation = async (
|
|
265
|
+
args: coreClient.OperationArguments,
|
|
266
|
+
spec: coreClient.OperationSpec
|
|
267
|
+
) => {
|
|
268
|
+
let currentRawResponse:
|
|
269
|
+
| coreClient.FullOperationResponse
|
|
270
|
+
| undefined = undefined;
|
|
271
|
+
const providedCallback = args.options?.onResponse;
|
|
272
|
+
const callback: coreClient.RawResponseCallback = (
|
|
273
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
274
|
+
flatResponse: unknown
|
|
275
|
+
) => {
|
|
276
|
+
currentRawResponse = rawResponse;
|
|
277
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
278
|
+
};
|
|
279
|
+
const updatedArgs = {
|
|
280
|
+
...args,
|
|
281
|
+
options: {
|
|
282
|
+
...args.options,
|
|
283
|
+
onResponse: callback
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
287
|
+
return {
|
|
288
|
+
flatResponse,
|
|
289
|
+
rawResponse: {
|
|
290
|
+
statusCode: currentRawResponse!.status,
|
|
291
|
+
body: currentRawResponse!.parsedBody,
|
|
292
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
293
|
+
}
|
|
294
|
+
};
|
|
295
|
+
};
|
|
123
296
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return this.client.sendLRORequest(
|
|
134
|
-
{
|
|
135
|
-
resourceGroupName,
|
|
136
|
-
resourceName,
|
|
137
|
-
endpointName,
|
|
138
|
-
options
|
|
139
|
-
},
|
|
140
|
-
beginCreateOrUpdateOperationSpec,
|
|
141
|
-
options);
|
|
297
|
+
const lro = new LroImpl(
|
|
298
|
+
sendOperation,
|
|
299
|
+
{ resourceGroupName, resourceName, endpointName, options },
|
|
300
|
+
deleteOperationSpec
|
|
301
|
+
);
|
|
302
|
+
return new LroEngine(lro, {
|
|
303
|
+
resumeFrom: options?.resumeFrom,
|
|
304
|
+
intervalInMs: options?.updateIntervalInMs
|
|
305
|
+
});
|
|
142
306
|
}
|
|
143
307
|
|
|
144
308
|
/**
|
|
@@ -146,66 +310,49 @@ export class DigitalTwinsEndpoint {
|
|
|
146
310
|
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
147
311
|
* @param resourceName The name of the DigitalTwinsInstance.
|
|
148
312
|
* @param endpointName Name of Endpoint Resource.
|
|
149
|
-
* @param
|
|
150
|
-
* @returns Promise<msRestAzure.LROPoller>
|
|
313
|
+
* @param options The options parameters.
|
|
151
314
|
*/
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
315
|
+
async beginDeleteAndWait(
|
|
316
|
+
resourceGroupName: string,
|
|
317
|
+
resourceName: string,
|
|
318
|
+
endpointName: string,
|
|
319
|
+
options?: DigitalTwinsEndpointDeleteOptionalParams
|
|
320
|
+
): Promise<DigitalTwinsEndpointDeleteResponse> {
|
|
321
|
+
const poller = await this.beginDelete(
|
|
322
|
+
resourceGroupName,
|
|
323
|
+
resourceName,
|
|
324
|
+
endpointName,
|
|
325
|
+
options
|
|
326
|
+
);
|
|
327
|
+
return poller.pollUntilDone();
|
|
162
328
|
}
|
|
163
329
|
|
|
164
330
|
/**
|
|
165
|
-
*
|
|
166
|
-
* @param
|
|
167
|
-
* @param
|
|
168
|
-
* @
|
|
169
|
-
|
|
170
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.DigitalTwinsEndpointListNextResponse>;
|
|
171
|
-
/**
|
|
172
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
173
|
-
* @param callback The callback
|
|
174
|
-
*/
|
|
175
|
-
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.DigitalTwinsEndpointResourceListResult>): void;
|
|
176
|
-
/**
|
|
177
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
178
|
-
* @param options The optional parameters
|
|
179
|
-
* @param callback The callback
|
|
331
|
+
* ListNext
|
|
332
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
333
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
334
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
335
|
+
* @param options The options parameters.
|
|
180
336
|
*/
|
|
181
|
-
|
|
182
|
-
|
|
337
|
+
private _listNext(
|
|
338
|
+
resourceGroupName: string,
|
|
339
|
+
resourceName: string,
|
|
340
|
+
nextLink: string,
|
|
341
|
+
options?: DigitalTwinsEndpointListNextOptionalParams
|
|
342
|
+
): Promise<DigitalTwinsEndpointListNextResponse> {
|
|
183
343
|
return this.client.sendOperationRequest(
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
},
|
|
188
|
-
listNextOperationSpec,
|
|
189
|
-
callback) as Promise<Models.DigitalTwinsEndpointListNextResponse>;
|
|
344
|
+
{ resourceGroupName, resourceName, nextLink, options },
|
|
345
|
+
listNextOperationSpec
|
|
346
|
+
);
|
|
190
347
|
}
|
|
191
348
|
}
|
|
192
|
-
|
|
193
349
|
// Operation Specifications
|
|
194
|
-
const serializer =
|
|
195
|
-
|
|
350
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
351
|
+
|
|
352
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
353
|
+
path:
|
|
354
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints",
|
|
196
355
|
httpMethod: "GET",
|
|
197
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints",
|
|
198
|
-
urlParameters: [
|
|
199
|
-
Parameters.subscriptionId,
|
|
200
|
-
Parameters.resourceGroupName,
|
|
201
|
-
Parameters.resourceName
|
|
202
|
-
],
|
|
203
|
-
queryParameters: [
|
|
204
|
-
Parameters.apiVersion
|
|
205
|
-
],
|
|
206
|
-
headerParameters: [
|
|
207
|
-
Parameters.acceptLanguage
|
|
208
|
-
],
|
|
209
356
|
responses: {
|
|
210
357
|
200: {
|
|
211
358
|
bodyMapper: Mappers.DigitalTwinsEndpointResourceListResult
|
|
@@ -214,24 +361,20 @@ const listOperationSpec: msRest.OperationSpec = {
|
|
|
214
361
|
bodyMapper: Mappers.ErrorResponse
|
|
215
362
|
}
|
|
216
363
|
},
|
|
217
|
-
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
const getOperationSpec: msRest.OperationSpec = {
|
|
221
|
-
httpMethod: "GET",
|
|
222
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
364
|
+
queryParameters: [Parameters.apiVersion],
|
|
223
365
|
urlParameters: [
|
|
366
|
+
Parameters.$host,
|
|
224
367
|
Parameters.subscriptionId,
|
|
225
368
|
Parameters.resourceGroupName,
|
|
226
|
-
Parameters.resourceName
|
|
227
|
-
Parameters.endpointName
|
|
228
|
-
],
|
|
229
|
-
queryParameters: [
|
|
230
|
-
Parameters.apiVersion
|
|
231
|
-
],
|
|
232
|
-
headerParameters: [
|
|
233
|
-
Parameters.acceptLanguage
|
|
369
|
+
Parameters.resourceName
|
|
234
370
|
],
|
|
371
|
+
headerParameters: [Parameters.accept],
|
|
372
|
+
serializer
|
|
373
|
+
};
|
|
374
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
375
|
+
path:
|
|
376
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
377
|
+
httpMethod: "GET",
|
|
235
378
|
responses: {
|
|
236
379
|
200: {
|
|
237
380
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
@@ -240,36 +383,21 @@ const getOperationSpec: msRest.OperationSpec = {
|
|
|
240
383
|
bodyMapper: Mappers.ErrorResponse
|
|
241
384
|
}
|
|
242
385
|
},
|
|
243
|
-
|
|
244
|
-
};
|
|
245
|
-
|
|
246
|
-
const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
247
|
-
httpMethod: "PUT",
|
|
248
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
386
|
+
queryParameters: [Parameters.apiVersion],
|
|
249
387
|
urlParameters: [
|
|
388
|
+
Parameters.$host,
|
|
250
389
|
Parameters.subscriptionId,
|
|
251
390
|
Parameters.resourceGroupName,
|
|
252
391
|
Parameters.resourceName,
|
|
253
392
|
Parameters.endpointName
|
|
254
393
|
],
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
parameterPath: {
|
|
263
|
-
properties: [
|
|
264
|
-
"options",
|
|
265
|
-
"properties"
|
|
266
|
-
]
|
|
267
|
-
},
|
|
268
|
-
mapper: {
|
|
269
|
-
...Mappers.DigitalTwinsEndpointResource,
|
|
270
|
-
required: true
|
|
271
|
-
}
|
|
272
|
-
},
|
|
394
|
+
headerParameters: [Parameters.accept],
|
|
395
|
+
serializer
|
|
396
|
+
};
|
|
397
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
398
|
+
path:
|
|
399
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
400
|
+
httpMethod: "PUT",
|
|
273
401
|
responses: {
|
|
274
402
|
200: {
|
|
275
403
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
@@ -277,53 +405,64 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = {
|
|
|
277
405
|
201: {
|
|
278
406
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
279
407
|
},
|
|
408
|
+
202: {
|
|
409
|
+
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
410
|
+
},
|
|
411
|
+
204: {
|
|
412
|
+
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
413
|
+
},
|
|
280
414
|
default: {
|
|
281
415
|
bodyMapper: Mappers.ErrorResponse
|
|
282
416
|
}
|
|
283
417
|
},
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
const beginDeleteMethodOperationSpec: msRest.OperationSpec = {
|
|
288
|
-
httpMethod: "DELETE",
|
|
289
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
418
|
+
requestBody: Parameters.endpointDescription,
|
|
419
|
+
queryParameters: [Parameters.apiVersion],
|
|
290
420
|
urlParameters: [
|
|
421
|
+
Parameters.$host,
|
|
291
422
|
Parameters.subscriptionId,
|
|
292
423
|
Parameters.resourceGroupName,
|
|
293
424
|
Parameters.resourceName,
|
|
294
425
|
Parameters.endpointName
|
|
295
426
|
],
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
427
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
428
|
+
mediaType: "json",
|
|
429
|
+
serializer
|
|
430
|
+
};
|
|
431
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
432
|
+
path:
|
|
433
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DigitalTwins/digitalTwinsInstances/{resourceName}/endpoints/{endpointName}",
|
|
434
|
+
httpMethod: "DELETE",
|
|
302
435
|
responses: {
|
|
303
436
|
200: {
|
|
304
437
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
305
438
|
},
|
|
439
|
+
201: {
|
|
440
|
+
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
441
|
+
},
|
|
306
442
|
202: {
|
|
307
443
|
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
308
444
|
},
|
|
309
|
-
204: {
|
|
445
|
+
204: {
|
|
446
|
+
bodyMapper: Mappers.DigitalTwinsEndpointResource
|
|
447
|
+
},
|
|
310
448
|
default: {
|
|
311
449
|
bodyMapper: Mappers.ErrorResponse
|
|
312
450
|
}
|
|
313
451
|
},
|
|
452
|
+
queryParameters: [Parameters.apiVersion],
|
|
453
|
+
urlParameters: [
|
|
454
|
+
Parameters.$host,
|
|
455
|
+
Parameters.subscriptionId,
|
|
456
|
+
Parameters.resourceGroupName,
|
|
457
|
+
Parameters.resourceName,
|
|
458
|
+
Parameters.endpointName
|
|
459
|
+
],
|
|
460
|
+
headerParameters: [Parameters.accept],
|
|
314
461
|
serializer
|
|
315
462
|
};
|
|
316
|
-
|
|
317
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
318
|
-
httpMethod: "GET",
|
|
319
|
-
baseUrl: "https://management.azure.com",
|
|
463
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
320
464
|
path: "{nextLink}",
|
|
321
|
-
|
|
322
|
-
Parameters.nextPageLink
|
|
323
|
-
],
|
|
324
|
-
headerParameters: [
|
|
325
|
-
Parameters.acceptLanguage
|
|
326
|
-
],
|
|
465
|
+
httpMethod: "GET",
|
|
327
466
|
responses: {
|
|
328
467
|
200: {
|
|
329
468
|
bodyMapper: Mappers.DigitalTwinsEndpointResourceListResult
|
|
@@ -332,5 +471,14 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
332
471
|
bodyMapper: Mappers.ErrorResponse
|
|
333
472
|
}
|
|
334
473
|
},
|
|
474
|
+
queryParameters: [Parameters.apiVersion],
|
|
475
|
+
urlParameters: [
|
|
476
|
+
Parameters.$host,
|
|
477
|
+
Parameters.subscriptionId,
|
|
478
|
+
Parameters.resourceGroupName,
|
|
479
|
+
Parameters.resourceName,
|
|
480
|
+
Parameters.nextLink
|
|
481
|
+
],
|
|
482
|
+
headerParameters: [Parameters.accept],
|
|
335
483
|
serializer
|
|
336
484
|
};
|