@azure/arm-search 1.3.0 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/{LICENSE.txt → LICENSE} +21 -21
- package/README.md +98 -96
- package/dist/index.js +2926 -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/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 +692 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +21 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +35 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +1013 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +22 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +182 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/adminKeys.d.ts +33 -0
- package/dist-esm/src/operations/adminKeys.d.ts.map +1 -0
- package/dist-esm/src/operations/adminKeys.js +90 -0
- package/dist-esm/src/operations/adminKeys.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +8 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +15 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +26 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +90 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +79 -0
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
- package/dist-esm/src/operations/privateEndpointConnections.js +273 -0
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts +34 -0
- package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/privateLinkResources.js +103 -0
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operations/queryKeys.d.ts +66 -0
- package/dist-esm/src/operations/queryKeys.d.ts.map +1 -0
- package/dist-esm/src/operations/queryKeys.js +213 -0
- package/dist-esm/src/operations/queryKeys.js.map +1 -0
- package/dist-esm/src/operations/services.d.ts +123 -0
- package/dist-esm/src/operations/services.d.ts.map +1 -0
- package/dist-esm/src/operations/services.js +475 -0
- package/dist-esm/src/operations/services.js.map +1 -0
- package/dist-esm/src/operations/sharedPrivateLinkResources.d.ts +107 -0
- package/dist-esm/src/operations/sharedPrivateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operations/sharedPrivateLinkResources.js +379 -0
- package/dist-esm/src/operations/sharedPrivateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/adminKeys.d.ts +25 -0
- package/dist-esm/src/operationsInterfaces/adminKeys.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/adminKeys.js +9 -0
- package/dist-esm/src/operationsInterfaces/adminKeys.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +8 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +15 -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 +50 -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 +15 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/queryKeys.d.ts +37 -0
- package/dist-esm/src/operationsInterfaces/queryKeys.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/queryKeys.js +9 -0
- package/dist-esm/src/operationsInterfaces/queryKeys.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/services.d.ts +85 -0
- package/dist-esm/src/operationsInterfaces/services.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/services.js +9 -0
- package/dist-esm/src/operationsInterfaces/services.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.d.ts +78 -0
- package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.js +9 -0
- package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.js.map +1 -0
- package/dist-esm/src/searchManagementClient.d.ts +25 -0
- package/dist-esm/src/searchManagementClient.d.ts.map +1 -0
- package/dist-esm/src/searchManagementClient.js +58 -0
- package/dist-esm/src/searchManagementClient.js.map +1 -0
- package/dist-esm/test/search_examples.d.ts +4 -0
- package/dist-esm/test/search_examples.d.ts.map +1 -0
- package/dist-esm/test/search_examples.js +163 -0
- package/dist-esm/test/search_examples.js.map +1 -0
- package/package.json +70 -34
- package/review/arm-search.api.md +600 -0
- package/rollup.config.js +184 -27
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +837 -0
- package/src/models/mappers.ts +1092 -0
- package/src/models/parameters.ts +213 -0
- package/src/operations/adminKeys.ts +122 -0
- package/{lib → src}/operations/index.ts +6 -5
- package/src/operations/operations.ts +98 -0
- package/src/operations/privateEndpointConnections.ts +363 -0
- package/src/operations/privateLinkResources.ts +139 -0
- package/src/operations/queryKeys.ts +288 -0
- package/src/operations/services.ts +606 -0
- package/src/operations/sharedPrivateLinkResources.ts +525 -0
- package/src/operationsInterfaces/adminKeys.ts +48 -0
- package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +7 -6
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/privateEndpointConnections.ts +88 -0
- package/src/operationsInterfaces/privateLinkResources.ts +31 -0
- package/src/operationsInterfaces/queryKeys.ts +66 -0
- package/src/operationsInterfaces/services.ts +144 -0
- package/src/operationsInterfaces/sharedPrivateLinkResources.ts +131 -0
- package/src/searchManagementClient.ts +104 -0
- package/tsconfig.json +4 -4
- package/types/arm-search.d.ts +1104 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-search.js +0 -1329
- package/dist/arm-search.js.map +0 -1
- package/dist/arm-search.min.js +0 -1
- package/dist/arm-search.min.js.map +0 -1
- package/esm/models/adminKeysMappers.d.ts +0 -2
- package/esm/models/adminKeysMappers.d.ts.map +0 -1
- package/esm/models/adminKeysMappers.js +0 -11
- package/esm/models/adminKeysMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -788
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -18
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js +0 -438
- 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 -11
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -11
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -107
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/queryKeysMappers.d.ts +0 -2
- package/esm/models/queryKeysMappers.d.ts.map +0 -1
- package/esm/models/queryKeysMappers.js +0 -11
- package/esm/models/queryKeysMappers.js.map +0 -1
- package/esm/models/servicesMappers.d.ts +0 -2
- package/esm/models/servicesMappers.d.ts.map +0 -1
- package/esm/models/servicesMappers.js +0 -11
- package/esm/models/servicesMappers.js.map +0 -1
- package/esm/operations/adminKeys.d.ts +0 -74
- package/esm/operations/adminKeys.d.ts.map +0 -1
- package/esm/operations/adminKeys.js +0 -93
- package/esm/operations/adminKeys.js.map +0 -1
- package/esm/operations/index.d.ts +0 -5
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -28
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -51
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/queryKeys.d.ts +0 -102
- package/esm/operations/queryKeys.d.ts.map +0 -1
- package/esm/operations/queryKeys.js +0 -127
- package/esm/operations/queryKeys.js.map +0 -1
- package/esm/operations/services.d.ts +0 -174
- package/esm/operations/services.d.ts.map +0 -1
- package/esm/operations/services.js +0 -268
- package/esm/operations/services.js.map +0 -1
- package/esm/searchManagementClient.d.ts +0 -22
- package/esm/searchManagementClient.d.ts.map +0 -1
- package/esm/searchManagementClient.js +0 -37
- package/esm/searchManagementClient.js.map +0 -1
- package/esm/searchManagementClientContext.d.ts +0 -17
- package/esm/searchManagementClientContext.d.ts.map +0 -1
- package/esm/searchManagementClientContext.js +0 -57
- package/esm/searchManagementClientContext.js.map +0 -1
- package/lib/models/adminKeysMappers.ts +0 -15
- package/lib/models/index.ts +0 -842
- package/lib/models/mappers.ts +0 -462
- package/lib/models/operationsMappers.ts +0 -17
- package/lib/models/parameters.ts +0 -109
- package/lib/models/queryKeysMappers.ts +0 -16
- package/lib/models/servicesMappers.ts +0 -22
- package/lib/operations/adminKeys.ts +0 -167
- package/lib/operations/operations.ts +0 -74
- package/lib/operations/queryKeys.ts +0 -234
- package/lib/operations/services.ts +0 -439
- package/lib/searchManagementClient.ts +0 -49
- package/lib/searchManagementClientContext.ts +0 -63
|
@@ -0,0 +1,363 @@
|
|
|
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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { PrivateEndpointConnections } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { SearchManagementClient } from "../searchManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
PrivateEndpointConnection,
|
|
17
|
+
PrivateEndpointConnectionsListByServiceNextOptionalParams,
|
|
18
|
+
PrivateEndpointConnectionsListByServiceOptionalParams,
|
|
19
|
+
PrivateEndpointConnectionsUpdateOptionalParams,
|
|
20
|
+
PrivateEndpointConnectionsUpdateResponse,
|
|
21
|
+
PrivateEndpointConnectionsGetOptionalParams,
|
|
22
|
+
PrivateEndpointConnectionsGetResponse,
|
|
23
|
+
PrivateEndpointConnectionsDeleteOptionalParams,
|
|
24
|
+
PrivateEndpointConnectionsDeleteResponse,
|
|
25
|
+
PrivateEndpointConnectionsListByServiceResponse,
|
|
26
|
+
PrivateEndpointConnectionsListByServiceNextResponse
|
|
27
|
+
} from "../models";
|
|
28
|
+
|
|
29
|
+
/// <reference lib="esnext.asynciterable" />
|
|
30
|
+
/** Class containing PrivateEndpointConnections operations. */
|
|
31
|
+
export class PrivateEndpointConnectionsImpl
|
|
32
|
+
implements PrivateEndpointConnections {
|
|
33
|
+
private readonly client: SearchManagementClient;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initialize a new instance of the class PrivateEndpointConnections class.
|
|
37
|
+
* @param client Reference to the service client
|
|
38
|
+
*/
|
|
39
|
+
constructor(client: SearchManagementClient) {
|
|
40
|
+
this.client = client;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Gets a list of all private endpoint connections in the given service.
|
|
45
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
46
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
47
|
+
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
48
|
+
* specified resource group.
|
|
49
|
+
* @param options The options parameters.
|
|
50
|
+
*/
|
|
51
|
+
public listByService(
|
|
52
|
+
resourceGroupName: string,
|
|
53
|
+
searchServiceName: string,
|
|
54
|
+
options?: PrivateEndpointConnectionsListByServiceOptionalParams
|
|
55
|
+
): PagedAsyncIterableIterator<PrivateEndpointConnection> {
|
|
56
|
+
const iter = this.listByServicePagingAll(
|
|
57
|
+
resourceGroupName,
|
|
58
|
+
searchServiceName,
|
|
59
|
+
options
|
|
60
|
+
);
|
|
61
|
+
return {
|
|
62
|
+
next() {
|
|
63
|
+
return iter.next();
|
|
64
|
+
},
|
|
65
|
+
[Symbol.asyncIterator]() {
|
|
66
|
+
return this;
|
|
67
|
+
},
|
|
68
|
+
byPage: () => {
|
|
69
|
+
return this.listByServicePagingPage(
|
|
70
|
+
resourceGroupName,
|
|
71
|
+
searchServiceName,
|
|
72
|
+
options
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
private async *listByServicePagingPage(
|
|
79
|
+
resourceGroupName: string,
|
|
80
|
+
searchServiceName: string,
|
|
81
|
+
options?: PrivateEndpointConnectionsListByServiceOptionalParams
|
|
82
|
+
): AsyncIterableIterator<PrivateEndpointConnection[]> {
|
|
83
|
+
let result = await this._listByService(
|
|
84
|
+
resourceGroupName,
|
|
85
|
+
searchServiceName,
|
|
86
|
+
options
|
|
87
|
+
);
|
|
88
|
+
yield result.value || [];
|
|
89
|
+
let continuationToken = result.nextLink;
|
|
90
|
+
while (continuationToken) {
|
|
91
|
+
result = await this._listByServiceNext(
|
|
92
|
+
resourceGroupName,
|
|
93
|
+
searchServiceName,
|
|
94
|
+
continuationToken,
|
|
95
|
+
options
|
|
96
|
+
);
|
|
97
|
+
continuationToken = result.nextLink;
|
|
98
|
+
yield result.value || [];
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
private async *listByServicePagingAll(
|
|
103
|
+
resourceGroupName: string,
|
|
104
|
+
searchServiceName: string,
|
|
105
|
+
options?: PrivateEndpointConnectionsListByServiceOptionalParams
|
|
106
|
+
): AsyncIterableIterator<PrivateEndpointConnection> {
|
|
107
|
+
for await (const page of this.listByServicePagingPage(
|
|
108
|
+
resourceGroupName,
|
|
109
|
+
searchServiceName,
|
|
110
|
+
options
|
|
111
|
+
)) {
|
|
112
|
+
yield* page;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Updates a Private Endpoint connection to the search service in the given resource group.
|
|
118
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
119
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
120
|
+
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
121
|
+
* specified resource group.
|
|
122
|
+
* @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
|
|
123
|
+
* Cognitive Search service with the specified resource group.
|
|
124
|
+
* @param privateEndpointConnection The definition of the private endpoint connection to update.
|
|
125
|
+
* @param options The options parameters.
|
|
126
|
+
*/
|
|
127
|
+
update(
|
|
128
|
+
resourceGroupName: string,
|
|
129
|
+
searchServiceName: string,
|
|
130
|
+
privateEndpointConnectionName: string,
|
|
131
|
+
privateEndpointConnection: PrivateEndpointConnection,
|
|
132
|
+
options?: PrivateEndpointConnectionsUpdateOptionalParams
|
|
133
|
+
): Promise<PrivateEndpointConnectionsUpdateResponse> {
|
|
134
|
+
return this.client.sendOperationRequest(
|
|
135
|
+
{
|
|
136
|
+
resourceGroupName,
|
|
137
|
+
searchServiceName,
|
|
138
|
+
privateEndpointConnectionName,
|
|
139
|
+
privateEndpointConnection,
|
|
140
|
+
options
|
|
141
|
+
},
|
|
142
|
+
updateOperationSpec
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Gets the details of the private endpoint connection to the search service in the given resource
|
|
148
|
+
* group.
|
|
149
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
150
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
151
|
+
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
152
|
+
* specified resource group.
|
|
153
|
+
* @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
|
|
154
|
+
* Cognitive Search service with the specified resource group.
|
|
155
|
+
* @param options The options parameters.
|
|
156
|
+
*/
|
|
157
|
+
get(
|
|
158
|
+
resourceGroupName: string,
|
|
159
|
+
searchServiceName: string,
|
|
160
|
+
privateEndpointConnectionName: string,
|
|
161
|
+
options?: PrivateEndpointConnectionsGetOptionalParams
|
|
162
|
+
): Promise<PrivateEndpointConnectionsGetResponse> {
|
|
163
|
+
return this.client.sendOperationRequest(
|
|
164
|
+
{
|
|
165
|
+
resourceGroupName,
|
|
166
|
+
searchServiceName,
|
|
167
|
+
privateEndpointConnectionName,
|
|
168
|
+
options
|
|
169
|
+
},
|
|
170
|
+
getOperationSpec
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Disconnects the private endpoint connection and deletes it from the search service.
|
|
176
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
177
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
178
|
+
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
179
|
+
* specified resource group.
|
|
180
|
+
* @param privateEndpointConnectionName The name of the private endpoint connection to the Azure
|
|
181
|
+
* Cognitive Search service with the specified resource group.
|
|
182
|
+
* @param options The options parameters.
|
|
183
|
+
*/
|
|
184
|
+
delete(
|
|
185
|
+
resourceGroupName: string,
|
|
186
|
+
searchServiceName: string,
|
|
187
|
+
privateEndpointConnectionName: string,
|
|
188
|
+
options?: PrivateEndpointConnectionsDeleteOptionalParams
|
|
189
|
+
): Promise<PrivateEndpointConnectionsDeleteResponse> {
|
|
190
|
+
return this.client.sendOperationRequest(
|
|
191
|
+
{
|
|
192
|
+
resourceGroupName,
|
|
193
|
+
searchServiceName,
|
|
194
|
+
privateEndpointConnectionName,
|
|
195
|
+
options
|
|
196
|
+
},
|
|
197
|
+
deleteOperationSpec
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Gets a list of all private endpoint connections in the given service.
|
|
203
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
204
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
205
|
+
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
206
|
+
* specified resource group.
|
|
207
|
+
* @param options The options parameters.
|
|
208
|
+
*/
|
|
209
|
+
private _listByService(
|
|
210
|
+
resourceGroupName: string,
|
|
211
|
+
searchServiceName: string,
|
|
212
|
+
options?: PrivateEndpointConnectionsListByServiceOptionalParams
|
|
213
|
+
): Promise<PrivateEndpointConnectionsListByServiceResponse> {
|
|
214
|
+
return this.client.sendOperationRequest(
|
|
215
|
+
{ resourceGroupName, searchServiceName, options },
|
|
216
|
+
listByServiceOperationSpec
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* ListByServiceNext
|
|
222
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
223
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
224
|
+
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
225
|
+
* specified resource group.
|
|
226
|
+
* @param nextLink The nextLink from the previous successful call to the ListByService method.
|
|
227
|
+
* @param options The options parameters.
|
|
228
|
+
*/
|
|
229
|
+
private _listByServiceNext(
|
|
230
|
+
resourceGroupName: string,
|
|
231
|
+
searchServiceName: string,
|
|
232
|
+
nextLink: string,
|
|
233
|
+
options?: PrivateEndpointConnectionsListByServiceNextOptionalParams
|
|
234
|
+
): Promise<PrivateEndpointConnectionsListByServiceNextResponse> {
|
|
235
|
+
return this.client.sendOperationRequest(
|
|
236
|
+
{ resourceGroupName, searchServiceName, nextLink, options },
|
|
237
|
+
listByServiceNextOperationSpec
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
// Operation Specifications
|
|
242
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
243
|
+
|
|
244
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
245
|
+
path:
|
|
246
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
|
247
|
+
httpMethod: "PUT",
|
|
248
|
+
responses: {
|
|
249
|
+
200: {
|
|
250
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
251
|
+
},
|
|
252
|
+
default: {
|
|
253
|
+
bodyMapper: Mappers.CloudError
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
requestBody: Parameters.privateEndpointConnection,
|
|
257
|
+
queryParameters: [Parameters.apiVersion],
|
|
258
|
+
urlParameters: [
|
|
259
|
+
Parameters.$host,
|
|
260
|
+
Parameters.resourceGroupName,
|
|
261
|
+
Parameters.searchServiceName,
|
|
262
|
+
Parameters.subscriptionId,
|
|
263
|
+
Parameters.privateEndpointConnectionName
|
|
264
|
+
],
|
|
265
|
+
headerParameters: [
|
|
266
|
+
Parameters.accept,
|
|
267
|
+
Parameters.clientRequestId,
|
|
268
|
+
Parameters.contentType
|
|
269
|
+
],
|
|
270
|
+
mediaType: "json",
|
|
271
|
+
serializer
|
|
272
|
+
};
|
|
273
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
274
|
+
path:
|
|
275
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
|
276
|
+
httpMethod: "GET",
|
|
277
|
+
responses: {
|
|
278
|
+
200: {
|
|
279
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
280
|
+
},
|
|
281
|
+
default: {
|
|
282
|
+
bodyMapper: Mappers.CloudError
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
queryParameters: [Parameters.apiVersion],
|
|
286
|
+
urlParameters: [
|
|
287
|
+
Parameters.$host,
|
|
288
|
+
Parameters.resourceGroupName,
|
|
289
|
+
Parameters.searchServiceName,
|
|
290
|
+
Parameters.subscriptionId,
|
|
291
|
+
Parameters.privateEndpointConnectionName
|
|
292
|
+
],
|
|
293
|
+
headerParameters: [Parameters.accept, Parameters.clientRequestId],
|
|
294
|
+
serializer
|
|
295
|
+
};
|
|
296
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
297
|
+
path:
|
|
298
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections/{privateEndpointConnectionName}",
|
|
299
|
+
httpMethod: "DELETE",
|
|
300
|
+
responses: {
|
|
301
|
+
200: {
|
|
302
|
+
bodyMapper: Mappers.PrivateEndpointConnection
|
|
303
|
+
},
|
|
304
|
+
404: {},
|
|
305
|
+
default: {
|
|
306
|
+
bodyMapper: Mappers.CloudError
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
queryParameters: [Parameters.apiVersion],
|
|
310
|
+
urlParameters: [
|
|
311
|
+
Parameters.$host,
|
|
312
|
+
Parameters.resourceGroupName,
|
|
313
|
+
Parameters.searchServiceName,
|
|
314
|
+
Parameters.subscriptionId,
|
|
315
|
+
Parameters.privateEndpointConnectionName
|
|
316
|
+
],
|
|
317
|
+
headerParameters: [Parameters.accept, Parameters.clientRequestId],
|
|
318
|
+
serializer
|
|
319
|
+
};
|
|
320
|
+
const listByServiceOperationSpec: coreClient.OperationSpec = {
|
|
321
|
+
path:
|
|
322
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateEndpointConnections",
|
|
323
|
+
httpMethod: "GET",
|
|
324
|
+
responses: {
|
|
325
|
+
200: {
|
|
326
|
+
bodyMapper: Mappers.PrivateEndpointConnectionListResult
|
|
327
|
+
},
|
|
328
|
+
default: {
|
|
329
|
+
bodyMapper: Mappers.CloudError
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
queryParameters: [Parameters.apiVersion],
|
|
333
|
+
urlParameters: [
|
|
334
|
+
Parameters.$host,
|
|
335
|
+
Parameters.resourceGroupName,
|
|
336
|
+
Parameters.searchServiceName,
|
|
337
|
+
Parameters.subscriptionId
|
|
338
|
+
],
|
|
339
|
+
headerParameters: [Parameters.accept, Parameters.clientRequestId],
|
|
340
|
+
serializer
|
|
341
|
+
};
|
|
342
|
+
const listByServiceNextOperationSpec: coreClient.OperationSpec = {
|
|
343
|
+
path: "{nextLink}",
|
|
344
|
+
httpMethod: "GET",
|
|
345
|
+
responses: {
|
|
346
|
+
200: {
|
|
347
|
+
bodyMapper: Mappers.PrivateEndpointConnectionListResult
|
|
348
|
+
},
|
|
349
|
+
default: {
|
|
350
|
+
bodyMapper: Mappers.CloudError
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
queryParameters: [Parameters.apiVersion],
|
|
354
|
+
urlParameters: [
|
|
355
|
+
Parameters.$host,
|
|
356
|
+
Parameters.resourceGroupName,
|
|
357
|
+
Parameters.searchServiceName,
|
|
358
|
+
Parameters.subscriptionId,
|
|
359
|
+
Parameters.nextLink
|
|
360
|
+
],
|
|
361
|
+
headerParameters: [Parameters.accept, Parameters.clientRequestId],
|
|
362
|
+
serializer
|
|
363
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
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 { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { PrivateLinkResources } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { SearchManagementClient } from "../searchManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
PrivateLinkResource,
|
|
17
|
+
PrivateLinkResourcesListSupportedOptionalParams,
|
|
18
|
+
PrivateLinkResourcesListSupportedResponse
|
|
19
|
+
} from "../models";
|
|
20
|
+
|
|
21
|
+
/// <reference lib="esnext.asynciterable" />
|
|
22
|
+
/** Class containing PrivateLinkResources operations. */
|
|
23
|
+
export class PrivateLinkResourcesImpl implements PrivateLinkResources {
|
|
24
|
+
private readonly client: SearchManagementClient;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Initialize a new instance of the class PrivateLinkResources class.
|
|
28
|
+
* @param client Reference to the service client
|
|
29
|
+
*/
|
|
30
|
+
constructor(client: SearchManagementClient) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Gets a list of all supported private link resource types for the given service.
|
|
36
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
37
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
38
|
+
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
39
|
+
* specified resource group.
|
|
40
|
+
* @param options The options parameters.
|
|
41
|
+
*/
|
|
42
|
+
public listSupported(
|
|
43
|
+
resourceGroupName: string,
|
|
44
|
+
searchServiceName: string,
|
|
45
|
+
options?: PrivateLinkResourcesListSupportedOptionalParams
|
|
46
|
+
): PagedAsyncIterableIterator<PrivateLinkResource> {
|
|
47
|
+
const iter = this.listSupportedPagingAll(
|
|
48
|
+
resourceGroupName,
|
|
49
|
+
searchServiceName,
|
|
50
|
+
options
|
|
51
|
+
);
|
|
52
|
+
return {
|
|
53
|
+
next() {
|
|
54
|
+
return iter.next();
|
|
55
|
+
},
|
|
56
|
+
[Symbol.asyncIterator]() {
|
|
57
|
+
return this;
|
|
58
|
+
},
|
|
59
|
+
byPage: () => {
|
|
60
|
+
return this.listSupportedPagingPage(
|
|
61
|
+
resourceGroupName,
|
|
62
|
+
searchServiceName,
|
|
63
|
+
options
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private async *listSupportedPagingPage(
|
|
70
|
+
resourceGroupName: string,
|
|
71
|
+
searchServiceName: string,
|
|
72
|
+
options?: PrivateLinkResourcesListSupportedOptionalParams
|
|
73
|
+
): AsyncIterableIterator<PrivateLinkResource[]> {
|
|
74
|
+
let result = await this._listSupported(
|
|
75
|
+
resourceGroupName,
|
|
76
|
+
searchServiceName,
|
|
77
|
+
options
|
|
78
|
+
);
|
|
79
|
+
yield result.value || [];
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
private async *listSupportedPagingAll(
|
|
83
|
+
resourceGroupName: string,
|
|
84
|
+
searchServiceName: string,
|
|
85
|
+
options?: PrivateLinkResourcesListSupportedOptionalParams
|
|
86
|
+
): AsyncIterableIterator<PrivateLinkResource> {
|
|
87
|
+
for await (const page of this.listSupportedPagingPage(
|
|
88
|
+
resourceGroupName,
|
|
89
|
+
searchServiceName,
|
|
90
|
+
options
|
|
91
|
+
)) {
|
|
92
|
+
yield* page;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Gets a list of all supported private link resource types for the given service.
|
|
98
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
99
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
100
|
+
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
101
|
+
* specified resource group.
|
|
102
|
+
* @param options The options parameters.
|
|
103
|
+
*/
|
|
104
|
+
private _listSupported(
|
|
105
|
+
resourceGroupName: string,
|
|
106
|
+
searchServiceName: string,
|
|
107
|
+
options?: PrivateLinkResourcesListSupportedOptionalParams
|
|
108
|
+
): Promise<PrivateLinkResourcesListSupportedResponse> {
|
|
109
|
+
return this.client.sendOperationRequest(
|
|
110
|
+
{ resourceGroupName, searchServiceName, options },
|
|
111
|
+
listSupportedOperationSpec
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
// Operation Specifications
|
|
116
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
117
|
+
|
|
118
|
+
const listSupportedOperationSpec: coreClient.OperationSpec = {
|
|
119
|
+
path:
|
|
120
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources",
|
|
121
|
+
httpMethod: "GET",
|
|
122
|
+
responses: {
|
|
123
|
+
200: {
|
|
124
|
+
bodyMapper: Mappers.PrivateLinkResourcesResult
|
|
125
|
+
},
|
|
126
|
+
default: {
|
|
127
|
+
bodyMapper: Mappers.CloudError
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
queryParameters: [Parameters.apiVersion],
|
|
131
|
+
urlParameters: [
|
|
132
|
+
Parameters.$host,
|
|
133
|
+
Parameters.resourceGroupName,
|
|
134
|
+
Parameters.searchServiceName,
|
|
135
|
+
Parameters.subscriptionId
|
|
136
|
+
],
|
|
137
|
+
headerParameters: [Parameters.accept, Parameters.clientRequestId],
|
|
138
|
+
serializer
|
|
139
|
+
};
|