@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
package/src/operations/index.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
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
9
|
export * from "./digitalTwins";
|
|
12
10
|
export * from "./digitalTwinsEndpoint";
|
|
13
11
|
export * from "./operations";
|
|
12
|
+
export * from "./privateLinkResources";
|
|
13
|
+
export * from "./privateEndpointConnections";
|
|
@@ -1,95 +1,111 @@
|
|
|
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
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Operations } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
14
|
+
import { AzureDigitalTwinsManagementClient } from "../azureDigitalTwinsManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
Operation,
|
|
17
|
+
OperationsListNextOptionalParams,
|
|
18
|
+
OperationsListOptionalParams,
|
|
19
|
+
OperationsListResponse,
|
|
20
|
+
OperationsListNextResponse
|
|
21
|
+
} from "../models";
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
|
24
|
+
/** Class containing Operations operations. */
|
|
25
|
+
export class OperationsImpl implements Operations {
|
|
26
|
+
private readonly client: AzureDigitalTwinsManagementClient;
|
|
20
27
|
|
|
21
28
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
29
|
+
* Initialize a new instance of the class Operations class.
|
|
30
|
+
* @param client Reference to the service client
|
|
24
31
|
*/
|
|
25
|
-
constructor(client:
|
|
32
|
+
constructor(client: AzureDigitalTwinsManagementClient) {
|
|
26
33
|
this.client = client;
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
/**
|
|
30
37
|
* Lists all of the available DigitalTwins service REST API operations.
|
|
31
|
-
* @param
|
|
32
|
-
* @returns Promise<Models.OperationsListResponse>
|
|
38
|
+
* @param options The options parameters.
|
|
33
39
|
*/
|
|
34
|
-
list(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListResponse> {
|
|
45
|
-
return this.client.sendOperationRequest(
|
|
46
|
-
{
|
|
47
|
-
options
|
|
40
|
+
public list(
|
|
41
|
+
options?: OperationsListOptionalParams
|
|
42
|
+
): PagedAsyncIterableIterator<Operation> {
|
|
43
|
+
const iter = this.listPagingAll(options);
|
|
44
|
+
return {
|
|
45
|
+
next() {
|
|
46
|
+
return iter.next();
|
|
47
|
+
},
|
|
48
|
+
[Symbol.asyncIterator]() {
|
|
49
|
+
return this;
|
|
48
50
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
byPage: () => {
|
|
52
|
+
return this.listPagingPage(options);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
private async *listPagingPage(
|
|
58
|
+
options?: OperationsListOptionalParams
|
|
59
|
+
): AsyncIterableIterator<Operation[]> {
|
|
60
|
+
let result = await this._list(options);
|
|
61
|
+
yield result.value || [];
|
|
62
|
+
let continuationToken = result.nextLink;
|
|
63
|
+
while (continuationToken) {
|
|
64
|
+
result = await this._listNext(continuationToken, options);
|
|
65
|
+
continuationToken = result.nextLink;
|
|
66
|
+
yield result.value || [];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private async *listPagingAll(
|
|
71
|
+
options?: OperationsListOptionalParams
|
|
72
|
+
): AsyncIterableIterator<Operation> {
|
|
73
|
+
for await (const page of this.listPagingPage(options)) {
|
|
74
|
+
yield* page;
|
|
75
|
+
}
|
|
51
76
|
}
|
|
52
77
|
|
|
53
78
|
/**
|
|
54
79
|
* Lists all of the available DigitalTwins service REST API operations.
|
|
55
|
-
* @param
|
|
56
|
-
* @param [options] The optional parameters
|
|
57
|
-
* @returns Promise<Models.OperationsListNextResponse>
|
|
58
|
-
*/
|
|
59
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsListNextResponse>;
|
|
60
|
-
/**
|
|
61
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
62
|
-
* @param callback The callback
|
|
80
|
+
* @param options The options parameters.
|
|
63
81
|
*/
|
|
64
|
-
|
|
82
|
+
private _list(
|
|
83
|
+
options?: OperationsListOptionalParams
|
|
84
|
+
): Promise<OperationsListResponse> {
|
|
85
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
86
|
+
}
|
|
87
|
+
|
|
65
88
|
/**
|
|
66
|
-
*
|
|
67
|
-
* @param
|
|
68
|
-
* @param
|
|
89
|
+
* ListNext
|
|
90
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
91
|
+
* @param options The options parameters.
|
|
69
92
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
93
|
+
private _listNext(
|
|
94
|
+
nextLink: string,
|
|
95
|
+
options?: OperationsListNextOptionalParams
|
|
96
|
+
): Promise<OperationsListNextResponse> {
|
|
72
97
|
return this.client.sendOperationRequest(
|
|
73
|
-
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
listNextOperationSpec,
|
|
78
|
-
callback) as Promise<Models.OperationsListNextResponse>;
|
|
98
|
+
{ nextLink, options },
|
|
99
|
+
listNextOperationSpec
|
|
100
|
+
);
|
|
79
101
|
}
|
|
80
102
|
}
|
|
81
|
-
|
|
82
103
|
// Operation Specifications
|
|
83
|
-
const serializer =
|
|
84
|
-
|
|
104
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
105
|
+
|
|
106
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
107
|
+
path: "/providers/Microsoft.DigitalTwins/operations",
|
|
85
108
|
httpMethod: "GET",
|
|
86
|
-
path: "providers/Microsoft.DigitalTwins/operations",
|
|
87
|
-
queryParameters: [
|
|
88
|
-
Parameters.apiVersion
|
|
89
|
-
],
|
|
90
|
-
headerParameters: [
|
|
91
|
-
Parameters.acceptLanguage
|
|
92
|
-
],
|
|
93
109
|
responses: {
|
|
94
110
|
200: {
|
|
95
111
|
bodyMapper: Mappers.OperationListResult
|
|
@@ -98,19 +114,14 @@ const listOperationSpec: msRest.OperationSpec = {
|
|
|
98
114
|
bodyMapper: Mappers.ErrorResponse
|
|
99
115
|
}
|
|
100
116
|
},
|
|
117
|
+
queryParameters: [Parameters.apiVersion],
|
|
118
|
+
urlParameters: [Parameters.$host],
|
|
119
|
+
headerParameters: [Parameters.accept],
|
|
101
120
|
serializer
|
|
102
121
|
};
|
|
103
|
-
|
|
104
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
105
|
-
httpMethod: "GET",
|
|
106
|
-
baseUrl: "https://management.azure.com",
|
|
122
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
107
123
|
path: "{nextLink}",
|
|
108
|
-
|
|
109
|
-
Parameters.nextPageLink
|
|
110
|
-
],
|
|
111
|
-
headerParameters: [
|
|
112
|
-
Parameters.acceptLanguage
|
|
113
|
-
],
|
|
124
|
+
httpMethod: "GET",
|
|
114
125
|
responses: {
|
|
115
126
|
200: {
|
|
116
127
|
bodyMapper: Mappers.OperationListResult
|
|
@@ -119,5 +130,8 @@ const listNextOperationSpec: msRest.OperationSpec = {
|
|
|
119
130
|
bodyMapper: Mappers.ErrorResponse
|
|
120
131
|
}
|
|
121
132
|
},
|
|
133
|
+
queryParameters: [Parameters.apiVersion],
|
|
134
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
135
|
+
headerParameters: [Parameters.accept],
|
|
122
136
|
serializer
|
|
123
137
|
};
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PrivateEndpointConnections } from "../operationsInterfaces";
|
|
10
|
+
import * as coreClient from "@azure/core-client";
|
|
11
|
+
import * as Mappers from "../models/mappers";
|
|
12
|
+
import * as Parameters from "../models/parameters";
|
|
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";
|
|
26
|
+
|
|
27
|
+
/** Class containing PrivateEndpointConnections operations. */
|
|
28
|
+
export class PrivateEndpointConnectionsImpl
|
|
29
|
+
implements PrivateEndpointConnections {
|
|
30
|
+
private readonly client: AzureDigitalTwinsManagementClient;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Initialize a new instance of the class PrivateEndpointConnections class.
|
|
34
|
+
* @param client Reference to the service client
|
|
35
|
+
*/
|
|
36
|
+
constructor(client: AzureDigitalTwinsManagementClient) {
|
|
37
|
+
this.client = client;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* List private endpoint connection properties.
|
|
42
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
43
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
44
|
+
* @param options The options parameters.
|
|
45
|
+
*/
|
|
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
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Get private endpoint connection properties for the given private endpoint.
|
|
59
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
60
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
61
|
+
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
62
|
+
* @param options The options parameters.
|
|
63
|
+
*/
|
|
64
|
+
get(
|
|
65
|
+
resourceGroupName: string,
|
|
66
|
+
resourceName: string,
|
|
67
|
+
privateEndpointConnectionName: string,
|
|
68
|
+
options?: PrivateEndpointConnectionsGetOptionalParams
|
|
69
|
+
): Promise<PrivateEndpointConnectionsGetResponse> {
|
|
70
|
+
return this.client.sendOperationRequest(
|
|
71
|
+
{
|
|
72
|
+
resourceGroupName,
|
|
73
|
+
resourceName,
|
|
74
|
+
privateEndpointConnectionName,
|
|
75
|
+
options
|
|
76
|
+
},
|
|
77
|
+
getOperationSpec
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Delete private endpoint connection with the specified name.
|
|
83
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
84
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
85
|
+
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
86
|
+
* @param options The options parameters.
|
|
87
|
+
*/
|
|
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,
|
|
135
|
+
{
|
|
136
|
+
resourceGroupName,
|
|
137
|
+
resourceName,
|
|
138
|
+
privateEndpointConnectionName,
|
|
139
|
+
options
|
|
140
|
+
},
|
|
141
|
+
deleteOperationSpec
|
|
142
|
+
);
|
|
143
|
+
return new LroEngine(lro, {
|
|
144
|
+
resumeFrom: options?.resumeFrom,
|
|
145
|
+
intervalInMs: options?.updateIntervalInMs
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Delete private endpoint connection with the specified name.
|
|
151
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
152
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
153
|
+
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
154
|
+
* @param options The options parameters.
|
|
155
|
+
*/
|
|
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();
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Update the status of a private endpoint connection with the given name.
|
|
173
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
174
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
175
|
+
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
176
|
+
* @param privateEndpointConnection The private endpoint connection with updated properties.
|
|
177
|
+
* @param options The options parameters.
|
|
178
|
+
*/
|
|
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
|
+
};
|
|
229
|
+
|
|
230
|
+
const lro = new LroImpl(
|
|
231
|
+
sendOperation,
|
|
232
|
+
{
|
|
233
|
+
resourceGroupName,
|
|
234
|
+
resourceName,
|
|
235
|
+
privateEndpointConnectionName,
|
|
236
|
+
privateEndpointConnection,
|
|
237
|
+
options
|
|
238
|
+
},
|
|
239
|
+
createOrUpdateOperationSpec
|
|
240
|
+
);
|
|
241
|
+
return new LroEngine(lro, {
|
|
242
|
+
resumeFrom: options?.resumeFrom,
|
|
243
|
+
intervalInMs: options?.updateIntervalInMs
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Update the status of a private endpoint connection with the given name.
|
|
249
|
+
* @param resourceGroupName The name of the resource group that contains the DigitalTwinsInstance.
|
|
250
|
+
* @param resourceName The name of the DigitalTwinsInstance.
|
|
251
|
+
* @param privateEndpointConnectionName The name of the private endpoint connection.
|
|
252
|
+
* @param privateEndpointConnection The private endpoint connection with updated properties.
|
|
253
|
+
* @param options The options parameters.
|
|
254
|
+
*/
|
|
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();
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
// Operation Specifications
|
|
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",
|
|
278
|
+
httpMethod: "GET",
|
|
279
|
+
responses: {
|
|
280
|
+
200: {
|
|
281
|
+
bodyMapper: Mappers.PrivateEndpointConnectionsResponse
|
|
282
|
+
},
|
|
283
|
+
default: {
|
|
284
|
+
bodyMapper: Mappers.ErrorResponse
|
|
285
|
+
}
|
|
286
|
+
},
|
|
287
|
+
queryParameters: [Parameters.apiVersion],
|
|
288
|
+
urlParameters: [
|
|
289
|
+
Parameters.$host,
|
|
290
|
+
Parameters.subscriptionId,
|
|
291
|
+
Parameters.resourceGroupName,
|
|
292
|
+
Parameters.resourceName
|
|
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",
|
|
301
|
+
responses: {
|
|
302
|
+
200: {
|
|
303
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
304
|
+
},
|
|
305
|
+
default: {
|
|
306
|
+
bodyMapper: Mappers.ErrorResponse
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
queryParameters: [Parameters.apiVersion],
|
|
310
|
+
urlParameters: [
|
|
311
|
+
Parameters.$host,
|
|
312
|
+
Parameters.subscriptionId,
|
|
313
|
+
Parameters.resourceGroupName,
|
|
314
|
+
Parameters.resourceName,
|
|
315
|
+
Parameters.privateEndpointConnectionName
|
|
316
|
+
],
|
|
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",
|
|
324
|
+
responses: {
|
|
325
|
+
200: {},
|
|
326
|
+
201: {},
|
|
327
|
+
202: {},
|
|
328
|
+
204: {},
|
|
329
|
+
default: {
|
|
330
|
+
bodyMapper: Mappers.ErrorResponse
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
queryParameters: [Parameters.apiVersion],
|
|
334
|
+
urlParameters: [
|
|
335
|
+
Parameters.$host,
|
|
336
|
+
Parameters.subscriptionId,
|
|
337
|
+
Parameters.resourceGroupName,
|
|
338
|
+
Parameters.resourceName,
|
|
339
|
+
Parameters.privateEndpointConnectionName
|
|
340
|
+
],
|
|
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",
|
|
348
|
+
responses: {
|
|
349
|
+
200: {
|
|
350
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
351
|
+
},
|
|
352
|
+
201: {
|
|
353
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
354
|
+
},
|
|
355
|
+
202: {
|
|
356
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
357
|
+
},
|
|
358
|
+
204: {
|
|
359
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
360
|
+
},
|
|
361
|
+
default: {
|
|
362
|
+
bodyMapper: Mappers.ErrorResponse
|
|
363
|
+
}
|
|
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",
|
|
376
|
+
serializer
|
|
377
|
+
};
|