@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.
Files changed (199) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/{LICENSE.txt → LICENSE} +21 -21
  3. package/README.md +98 -96
  4. package/dist/index.js +2926 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +692 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +21 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +35 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/dist-esm/src/models/mappers.js +1013 -0
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +22 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +182 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/adminKeys.d.ts +33 -0
  29. package/dist-esm/src/operations/adminKeys.d.ts.map +1 -0
  30. package/dist-esm/src/operations/adminKeys.js +90 -0
  31. package/dist-esm/src/operations/adminKeys.js.map +1 -0
  32. package/dist-esm/src/operations/index.d.ts +8 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/dist-esm/src/operations/index.js +15 -0
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/operations.d.ts +26 -0
  37. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/operations.js +90 -0
  39. package/dist-esm/src/operations/operations.js.map +1 -0
  40. package/dist-esm/src/operations/privateEndpointConnections.d.ts +79 -0
  41. package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -0
  42. package/dist-esm/src/operations/privateEndpointConnections.js +273 -0
  43. package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -0
  44. package/dist-esm/src/operations/privateLinkResources.d.ts +34 -0
  45. package/dist-esm/src/operations/privateLinkResources.d.ts.map +1 -0
  46. package/dist-esm/src/operations/privateLinkResources.js +103 -0
  47. package/dist-esm/src/operations/privateLinkResources.js.map +1 -0
  48. package/dist-esm/src/operations/queryKeys.d.ts +66 -0
  49. package/dist-esm/src/operations/queryKeys.d.ts.map +1 -0
  50. package/dist-esm/src/operations/queryKeys.js +213 -0
  51. package/dist-esm/src/operations/queryKeys.js.map +1 -0
  52. package/dist-esm/src/operations/services.d.ts +123 -0
  53. package/dist-esm/src/operations/services.d.ts.map +1 -0
  54. package/dist-esm/src/operations/services.js +475 -0
  55. package/dist-esm/src/operations/services.js.map +1 -0
  56. package/dist-esm/src/operations/sharedPrivateLinkResources.d.ts +107 -0
  57. package/dist-esm/src/operations/sharedPrivateLinkResources.d.ts.map +1 -0
  58. package/dist-esm/src/operations/sharedPrivateLinkResources.js +379 -0
  59. package/dist-esm/src/operations/sharedPrivateLinkResources.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/adminKeys.d.ts +25 -0
  61. package/dist-esm/src/operationsInterfaces/adminKeys.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/adminKeys.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/adminKeys.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/index.d.ts +8 -0
  65. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/index.js +15 -0
  67. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  69. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  71. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +50 -0
  73. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/privateEndpointConnections.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +15 -0
  77. package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/privateLinkResources.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/privateLinkResources.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/queryKeys.d.ts +37 -0
  81. package/dist-esm/src/operationsInterfaces/queryKeys.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/queryKeys.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/queryKeys.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/services.d.ts +85 -0
  85. package/dist-esm/src/operationsInterfaces/services.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/services.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/services.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.d.ts +78 -0
  89. package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.js.map +1 -0
  92. package/dist-esm/src/searchManagementClient.d.ts +25 -0
  93. package/dist-esm/src/searchManagementClient.d.ts.map +1 -0
  94. package/dist-esm/src/searchManagementClient.js +58 -0
  95. package/dist-esm/src/searchManagementClient.js.map +1 -0
  96. package/dist-esm/test/search_examples.d.ts +4 -0
  97. package/dist-esm/test/search_examples.d.ts.map +1 -0
  98. package/dist-esm/test/search_examples.js +163 -0
  99. package/dist-esm/test/search_examples.js.map +1 -0
  100. package/package.json +70 -34
  101. package/review/arm-search.api.md +600 -0
  102. package/rollup.config.js +184 -27
  103. package/src/index.ts +12 -0
  104. package/src/lroImpl.ts +34 -0
  105. package/src/models/index.ts +837 -0
  106. package/src/models/mappers.ts +1092 -0
  107. package/src/models/parameters.ts +213 -0
  108. package/src/operations/adminKeys.ts +122 -0
  109. package/{lib → src}/operations/index.ts +6 -5
  110. package/src/operations/operations.ts +98 -0
  111. package/src/operations/privateEndpointConnections.ts +363 -0
  112. package/src/operations/privateLinkResources.ts +139 -0
  113. package/src/operations/queryKeys.ts +288 -0
  114. package/src/operations/services.ts +606 -0
  115. package/src/operations/sharedPrivateLinkResources.ts +525 -0
  116. package/src/operationsInterfaces/adminKeys.ts +48 -0
  117. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +7 -6
  118. package/src/operationsInterfaces/operations.ts +22 -0
  119. package/src/operationsInterfaces/privateEndpointConnections.ts +88 -0
  120. package/src/operationsInterfaces/privateLinkResources.ts +31 -0
  121. package/src/operationsInterfaces/queryKeys.ts +66 -0
  122. package/src/operationsInterfaces/services.ts +144 -0
  123. package/src/operationsInterfaces/sharedPrivateLinkResources.ts +131 -0
  124. package/src/searchManagementClient.ts +104 -0
  125. package/tsconfig.json +4 -4
  126. package/types/arm-search.d.ts +1104 -0
  127. package/types/tsdoc-metadata.json +11 -0
  128. package/dist/arm-search.js +0 -1329
  129. package/dist/arm-search.js.map +0 -1
  130. package/dist/arm-search.min.js +0 -1
  131. package/dist/arm-search.min.js.map +0 -1
  132. package/esm/models/adminKeysMappers.d.ts +0 -2
  133. package/esm/models/adminKeysMappers.d.ts.map +0 -1
  134. package/esm/models/adminKeysMappers.js +0 -11
  135. package/esm/models/adminKeysMappers.js.map +0 -1
  136. package/esm/models/index.d.ts +0 -788
  137. package/esm/models/index.d.ts.map +0 -1
  138. package/esm/models/index.js +0 -10
  139. package/esm/models/index.js.map +0 -1
  140. package/esm/models/mappers.d.ts +0 -18
  141. package/esm/models/mappers.d.ts.map +0 -1
  142. package/esm/models/mappers.js +0 -438
  143. package/esm/models/mappers.js.map +0 -1
  144. package/esm/models/operationsMappers.d.ts +0 -2
  145. package/esm/models/operationsMappers.d.ts.map +0 -1
  146. package/esm/models/operationsMappers.js +0 -11
  147. package/esm/models/operationsMappers.js.map +0 -1
  148. package/esm/models/parameters.d.ts +0 -11
  149. package/esm/models/parameters.d.ts.map +0 -1
  150. package/esm/models/parameters.js +0 -107
  151. package/esm/models/parameters.js.map +0 -1
  152. package/esm/models/queryKeysMappers.d.ts +0 -2
  153. package/esm/models/queryKeysMappers.d.ts.map +0 -1
  154. package/esm/models/queryKeysMappers.js +0 -11
  155. package/esm/models/queryKeysMappers.js.map +0 -1
  156. package/esm/models/servicesMappers.d.ts +0 -2
  157. package/esm/models/servicesMappers.d.ts.map +0 -1
  158. package/esm/models/servicesMappers.js +0 -11
  159. package/esm/models/servicesMappers.js.map +0 -1
  160. package/esm/operations/adminKeys.d.ts +0 -74
  161. package/esm/operations/adminKeys.d.ts.map +0 -1
  162. package/esm/operations/adminKeys.js +0 -93
  163. package/esm/operations/adminKeys.js.map +0 -1
  164. package/esm/operations/index.d.ts +0 -5
  165. package/esm/operations/index.d.ts.map +0 -1
  166. package/esm/operations/index.js.map +0 -1
  167. package/esm/operations/operations.d.ts +0 -28
  168. package/esm/operations/operations.d.ts.map +0 -1
  169. package/esm/operations/operations.js +0 -51
  170. package/esm/operations/operations.js.map +0 -1
  171. package/esm/operations/queryKeys.d.ts +0 -102
  172. package/esm/operations/queryKeys.d.ts.map +0 -1
  173. package/esm/operations/queryKeys.js +0 -127
  174. package/esm/operations/queryKeys.js.map +0 -1
  175. package/esm/operations/services.d.ts +0 -174
  176. package/esm/operations/services.d.ts.map +0 -1
  177. package/esm/operations/services.js +0 -268
  178. package/esm/operations/services.js.map +0 -1
  179. package/esm/searchManagementClient.d.ts +0 -22
  180. package/esm/searchManagementClient.d.ts.map +0 -1
  181. package/esm/searchManagementClient.js +0 -37
  182. package/esm/searchManagementClient.js.map +0 -1
  183. package/esm/searchManagementClientContext.d.ts +0 -17
  184. package/esm/searchManagementClientContext.d.ts.map +0 -1
  185. package/esm/searchManagementClientContext.js +0 -57
  186. package/esm/searchManagementClientContext.js.map +0 -1
  187. package/lib/models/adminKeysMappers.ts +0 -15
  188. package/lib/models/index.ts +0 -842
  189. package/lib/models/mappers.ts +0 -462
  190. package/lib/models/operationsMappers.ts +0 -17
  191. package/lib/models/parameters.ts +0 -109
  192. package/lib/models/queryKeysMappers.ts +0 -16
  193. package/lib/models/servicesMappers.ts +0 -22
  194. package/lib/operations/adminKeys.ts +0 -167
  195. package/lib/operations/operations.ts +0 -74
  196. package/lib/operations/queryKeys.ts +0 -234
  197. package/lib/operations/services.ts +0 -439
  198. package/lib/searchManagementClient.ts +0 -49
  199. package/lib/searchManagementClientContext.ts +0 -63
@@ -0,0 +1,525 @@
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 { SharedPrivateLinkResources } 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 { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
16
+ import { LroImpl } from "../lroImpl";
17
+ import {
18
+ SharedPrivateLinkResource,
19
+ SharedPrivateLinkResourcesListByServiceNextOptionalParams,
20
+ SharedPrivateLinkResourcesListByServiceOptionalParams,
21
+ SharedPrivateLinkResourcesCreateOrUpdateOptionalParams,
22
+ SharedPrivateLinkResourcesCreateOrUpdateResponse,
23
+ SharedPrivateLinkResourcesGetOptionalParams,
24
+ SharedPrivateLinkResourcesGetResponse,
25
+ SharedPrivateLinkResourcesDeleteOptionalParams,
26
+ SharedPrivateLinkResourcesListByServiceResponse,
27
+ SharedPrivateLinkResourcesListByServiceNextResponse
28
+ } from "../models";
29
+
30
+ /// <reference lib="esnext.asynciterable" />
31
+ /** Class containing SharedPrivateLinkResources operations. */
32
+ export class SharedPrivateLinkResourcesImpl
33
+ implements SharedPrivateLinkResources {
34
+ private readonly client: SearchManagementClient;
35
+
36
+ /**
37
+ * Initialize a new instance of the class SharedPrivateLinkResources class.
38
+ * @param client Reference to the service client
39
+ */
40
+ constructor(client: SearchManagementClient) {
41
+ this.client = client;
42
+ }
43
+
44
+ /**
45
+ * Gets a list of all shared private link resources managed by the given service.
46
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
47
+ * obtain this value from the Azure Resource Manager API or the portal.
48
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
49
+ * specified resource group.
50
+ * @param options The options parameters.
51
+ */
52
+ public listByService(
53
+ resourceGroupName: string,
54
+ searchServiceName: string,
55
+ options?: SharedPrivateLinkResourcesListByServiceOptionalParams
56
+ ): PagedAsyncIterableIterator<SharedPrivateLinkResource> {
57
+ const iter = this.listByServicePagingAll(
58
+ resourceGroupName,
59
+ searchServiceName,
60
+ options
61
+ );
62
+ return {
63
+ next() {
64
+ return iter.next();
65
+ },
66
+ [Symbol.asyncIterator]() {
67
+ return this;
68
+ },
69
+ byPage: () => {
70
+ return this.listByServicePagingPage(
71
+ resourceGroupName,
72
+ searchServiceName,
73
+ options
74
+ );
75
+ }
76
+ };
77
+ }
78
+
79
+ private async *listByServicePagingPage(
80
+ resourceGroupName: string,
81
+ searchServiceName: string,
82
+ options?: SharedPrivateLinkResourcesListByServiceOptionalParams
83
+ ): AsyncIterableIterator<SharedPrivateLinkResource[]> {
84
+ let result = await this._listByService(
85
+ resourceGroupName,
86
+ searchServiceName,
87
+ options
88
+ );
89
+ yield result.value || [];
90
+ let continuationToken = result.nextLink;
91
+ while (continuationToken) {
92
+ result = await this._listByServiceNext(
93
+ resourceGroupName,
94
+ searchServiceName,
95
+ continuationToken,
96
+ options
97
+ );
98
+ continuationToken = result.nextLink;
99
+ yield result.value || [];
100
+ }
101
+ }
102
+
103
+ private async *listByServicePagingAll(
104
+ resourceGroupName: string,
105
+ searchServiceName: string,
106
+ options?: SharedPrivateLinkResourcesListByServiceOptionalParams
107
+ ): AsyncIterableIterator<SharedPrivateLinkResource> {
108
+ for await (const page of this.listByServicePagingPage(
109
+ resourceGroupName,
110
+ searchServiceName,
111
+ options
112
+ )) {
113
+ yield* page;
114
+ }
115
+ }
116
+
117
+ /**
118
+ * Initiates the creation or update of a shared private link resource managed by the search service in
119
+ * the given resource group.
120
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
121
+ * obtain this value from the Azure Resource Manager API or the portal.
122
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
123
+ * specified resource group.
124
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
125
+ * Azure Cognitive Search service within the specified resource group.
126
+ * @param sharedPrivateLinkResource The definition of the shared private link resource to create or
127
+ * update.
128
+ * @param options The options parameters.
129
+ */
130
+ async beginCreateOrUpdate(
131
+ resourceGroupName: string,
132
+ searchServiceName: string,
133
+ sharedPrivateLinkResourceName: string,
134
+ sharedPrivateLinkResource: SharedPrivateLinkResource,
135
+ options?: SharedPrivateLinkResourcesCreateOrUpdateOptionalParams
136
+ ): Promise<
137
+ PollerLike<
138
+ PollOperationState<SharedPrivateLinkResourcesCreateOrUpdateResponse>,
139
+ SharedPrivateLinkResourcesCreateOrUpdateResponse
140
+ >
141
+ > {
142
+ const directSendOperation = async (
143
+ args: coreClient.OperationArguments,
144
+ spec: coreClient.OperationSpec
145
+ ): Promise<SharedPrivateLinkResourcesCreateOrUpdateResponse> => {
146
+ return this.client.sendOperationRequest(args, spec);
147
+ };
148
+ const sendOperation = async (
149
+ args: coreClient.OperationArguments,
150
+ spec: coreClient.OperationSpec
151
+ ) => {
152
+ let currentRawResponse:
153
+ | coreClient.FullOperationResponse
154
+ | undefined = undefined;
155
+ const providedCallback = args.options?.onResponse;
156
+ const callback: coreClient.RawResponseCallback = (
157
+ rawResponse: coreClient.FullOperationResponse,
158
+ flatResponse: unknown
159
+ ) => {
160
+ currentRawResponse = rawResponse;
161
+ providedCallback?.(rawResponse, flatResponse);
162
+ };
163
+ const updatedArgs = {
164
+ ...args,
165
+ options: {
166
+ ...args.options,
167
+ onResponse: callback
168
+ }
169
+ };
170
+ const flatResponse = await directSendOperation(updatedArgs, spec);
171
+ return {
172
+ flatResponse,
173
+ rawResponse: {
174
+ statusCode: currentRawResponse!.status,
175
+ body: currentRawResponse!.parsedBody,
176
+ headers: currentRawResponse!.headers.toJSON()
177
+ }
178
+ };
179
+ };
180
+
181
+ const lro = new LroImpl(
182
+ sendOperation,
183
+ {
184
+ resourceGroupName,
185
+ searchServiceName,
186
+ sharedPrivateLinkResourceName,
187
+ sharedPrivateLinkResource,
188
+ options
189
+ },
190
+ createOrUpdateOperationSpec
191
+ );
192
+ return new LroEngine(lro, {
193
+ resumeFrom: options?.resumeFrom,
194
+ intervalInMs: options?.updateIntervalInMs,
195
+ lroResourceLocationConfig: "azure-async-operation"
196
+ });
197
+ }
198
+
199
+ /**
200
+ * Initiates the creation or update of a shared private link resource managed by the search service in
201
+ * the given resource group.
202
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
203
+ * obtain this value from the Azure Resource Manager API or the portal.
204
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
205
+ * specified resource group.
206
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
207
+ * Azure Cognitive Search service within the specified resource group.
208
+ * @param sharedPrivateLinkResource The definition of the shared private link resource to create or
209
+ * update.
210
+ * @param options The options parameters.
211
+ */
212
+ async beginCreateOrUpdateAndWait(
213
+ resourceGroupName: string,
214
+ searchServiceName: string,
215
+ sharedPrivateLinkResourceName: string,
216
+ sharedPrivateLinkResource: SharedPrivateLinkResource,
217
+ options?: SharedPrivateLinkResourcesCreateOrUpdateOptionalParams
218
+ ): Promise<SharedPrivateLinkResourcesCreateOrUpdateResponse> {
219
+ const poller = await this.beginCreateOrUpdate(
220
+ resourceGroupName,
221
+ searchServiceName,
222
+ sharedPrivateLinkResourceName,
223
+ sharedPrivateLinkResource,
224
+ options
225
+ );
226
+ return poller.pollUntilDone();
227
+ }
228
+
229
+ /**
230
+ * Gets the details of the shared private link resource managed by the search service in the given
231
+ * resource group.
232
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
233
+ * obtain this value from the Azure Resource Manager API or the portal.
234
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
235
+ * specified resource group.
236
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
237
+ * Azure Cognitive Search service within the specified resource group.
238
+ * @param options The options parameters.
239
+ */
240
+ get(
241
+ resourceGroupName: string,
242
+ searchServiceName: string,
243
+ sharedPrivateLinkResourceName: string,
244
+ options?: SharedPrivateLinkResourcesGetOptionalParams
245
+ ): Promise<SharedPrivateLinkResourcesGetResponse> {
246
+ return this.client.sendOperationRequest(
247
+ {
248
+ resourceGroupName,
249
+ searchServiceName,
250
+ sharedPrivateLinkResourceName,
251
+ options
252
+ },
253
+ getOperationSpec
254
+ );
255
+ }
256
+
257
+ /**
258
+ * Initiates the deletion of the shared private link resource from the search service.
259
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
260
+ * obtain this value from the Azure Resource Manager API or the portal.
261
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
262
+ * specified resource group.
263
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
264
+ * Azure Cognitive Search service within the specified resource group.
265
+ * @param options The options parameters.
266
+ */
267
+ async beginDelete(
268
+ resourceGroupName: string,
269
+ searchServiceName: string,
270
+ sharedPrivateLinkResourceName: string,
271
+ options?: SharedPrivateLinkResourcesDeleteOptionalParams
272
+ ): Promise<PollerLike<PollOperationState<void>, void>> {
273
+ const directSendOperation = async (
274
+ args: coreClient.OperationArguments,
275
+ spec: coreClient.OperationSpec
276
+ ): Promise<void> => {
277
+ return this.client.sendOperationRequest(args, spec);
278
+ };
279
+ const sendOperation = async (
280
+ args: coreClient.OperationArguments,
281
+ spec: coreClient.OperationSpec
282
+ ) => {
283
+ let currentRawResponse:
284
+ | coreClient.FullOperationResponse
285
+ | undefined = undefined;
286
+ const providedCallback = args.options?.onResponse;
287
+ const callback: coreClient.RawResponseCallback = (
288
+ rawResponse: coreClient.FullOperationResponse,
289
+ flatResponse: unknown
290
+ ) => {
291
+ currentRawResponse = rawResponse;
292
+ providedCallback?.(rawResponse, flatResponse);
293
+ };
294
+ const updatedArgs = {
295
+ ...args,
296
+ options: {
297
+ ...args.options,
298
+ onResponse: callback
299
+ }
300
+ };
301
+ const flatResponse = await directSendOperation(updatedArgs, spec);
302
+ return {
303
+ flatResponse,
304
+ rawResponse: {
305
+ statusCode: currentRawResponse!.status,
306
+ body: currentRawResponse!.parsedBody,
307
+ headers: currentRawResponse!.headers.toJSON()
308
+ }
309
+ };
310
+ };
311
+
312
+ const lro = new LroImpl(
313
+ sendOperation,
314
+ {
315
+ resourceGroupName,
316
+ searchServiceName,
317
+ sharedPrivateLinkResourceName,
318
+ options
319
+ },
320
+ deleteOperationSpec
321
+ );
322
+ return new LroEngine(lro, {
323
+ resumeFrom: options?.resumeFrom,
324
+ intervalInMs: options?.updateIntervalInMs,
325
+ lroResourceLocationConfig: "azure-async-operation"
326
+ });
327
+ }
328
+
329
+ /**
330
+ * Initiates the deletion of the shared private link resource from the search service.
331
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
332
+ * obtain this value from the Azure Resource Manager API or the portal.
333
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
334
+ * specified resource group.
335
+ * @param sharedPrivateLinkResourceName The name of the shared private link resource managed by the
336
+ * Azure Cognitive Search service within the specified resource group.
337
+ * @param options The options parameters.
338
+ */
339
+ async beginDeleteAndWait(
340
+ resourceGroupName: string,
341
+ searchServiceName: string,
342
+ sharedPrivateLinkResourceName: string,
343
+ options?: SharedPrivateLinkResourcesDeleteOptionalParams
344
+ ): Promise<void> {
345
+ const poller = await this.beginDelete(
346
+ resourceGroupName,
347
+ searchServiceName,
348
+ sharedPrivateLinkResourceName,
349
+ options
350
+ );
351
+ return poller.pollUntilDone();
352
+ }
353
+
354
+ /**
355
+ * Gets a list of all shared private link resources managed by the given service.
356
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
357
+ * obtain this value from the Azure Resource Manager API or the portal.
358
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
359
+ * specified resource group.
360
+ * @param options The options parameters.
361
+ */
362
+ private _listByService(
363
+ resourceGroupName: string,
364
+ searchServiceName: string,
365
+ options?: SharedPrivateLinkResourcesListByServiceOptionalParams
366
+ ): Promise<SharedPrivateLinkResourcesListByServiceResponse> {
367
+ return this.client.sendOperationRequest(
368
+ { resourceGroupName, searchServiceName, options },
369
+ listByServiceOperationSpec
370
+ );
371
+ }
372
+
373
+ /**
374
+ * ListByServiceNext
375
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
376
+ * obtain this value from the Azure Resource Manager API or the portal.
377
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
378
+ * specified resource group.
379
+ * @param nextLink The nextLink from the previous successful call to the ListByService method.
380
+ * @param options The options parameters.
381
+ */
382
+ private _listByServiceNext(
383
+ resourceGroupName: string,
384
+ searchServiceName: string,
385
+ nextLink: string,
386
+ options?: SharedPrivateLinkResourcesListByServiceNextOptionalParams
387
+ ): Promise<SharedPrivateLinkResourcesListByServiceNextResponse> {
388
+ return this.client.sendOperationRequest(
389
+ { resourceGroupName, searchServiceName, nextLink, options },
390
+ listByServiceNextOperationSpec
391
+ );
392
+ }
393
+ }
394
+ // Operation Specifications
395
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
396
+
397
+ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
398
+ path:
399
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}",
400
+ httpMethod: "PUT",
401
+ responses: {
402
+ 200: {
403
+ bodyMapper: Mappers.SharedPrivateLinkResource
404
+ },
405
+ 201: {
406
+ bodyMapper: Mappers.SharedPrivateLinkResource
407
+ },
408
+ 202: {
409
+ bodyMapper: Mappers.SharedPrivateLinkResource
410
+ },
411
+ 204: {
412
+ bodyMapper: Mappers.SharedPrivateLinkResource
413
+ },
414
+ default: {
415
+ bodyMapper: Mappers.CloudError
416
+ }
417
+ },
418
+ requestBody: Parameters.sharedPrivateLinkResource,
419
+ queryParameters: [Parameters.apiVersion],
420
+ urlParameters: [
421
+ Parameters.$host,
422
+ Parameters.resourceGroupName,
423
+ Parameters.searchServiceName,
424
+ Parameters.subscriptionId,
425
+ Parameters.sharedPrivateLinkResourceName
426
+ ],
427
+ headerParameters: [
428
+ Parameters.accept,
429
+ Parameters.clientRequestId,
430
+ Parameters.contentType
431
+ ],
432
+ mediaType: "json",
433
+ serializer
434
+ };
435
+ const getOperationSpec: coreClient.OperationSpec = {
436
+ path:
437
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}",
438
+ httpMethod: "GET",
439
+ responses: {
440
+ 200: {
441
+ bodyMapper: Mappers.SharedPrivateLinkResource
442
+ },
443
+ default: {
444
+ bodyMapper: Mappers.CloudError
445
+ }
446
+ },
447
+ queryParameters: [Parameters.apiVersion],
448
+ urlParameters: [
449
+ Parameters.$host,
450
+ Parameters.resourceGroupName,
451
+ Parameters.searchServiceName,
452
+ Parameters.subscriptionId,
453
+ Parameters.sharedPrivateLinkResourceName
454
+ ],
455
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
456
+ serializer
457
+ };
458
+ const deleteOperationSpec: coreClient.OperationSpec = {
459
+ path:
460
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources/{sharedPrivateLinkResourceName}",
461
+ httpMethod: "DELETE",
462
+ responses: {
463
+ 200: {},
464
+ 201: {},
465
+ 202: {},
466
+ 204: {},
467
+ default: {
468
+ bodyMapper: Mappers.CloudError
469
+ }
470
+ },
471
+ queryParameters: [Parameters.apiVersion],
472
+ urlParameters: [
473
+ Parameters.$host,
474
+ Parameters.resourceGroupName,
475
+ Parameters.searchServiceName,
476
+ Parameters.subscriptionId,
477
+ Parameters.sharedPrivateLinkResourceName
478
+ ],
479
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
480
+ serializer
481
+ };
482
+ const listByServiceOperationSpec: coreClient.OperationSpec = {
483
+ path:
484
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/sharedPrivateLinkResources",
485
+ httpMethod: "GET",
486
+ responses: {
487
+ 200: {
488
+ bodyMapper: Mappers.SharedPrivateLinkResourceListResult
489
+ },
490
+ default: {
491
+ bodyMapper: Mappers.CloudError
492
+ }
493
+ },
494
+ queryParameters: [Parameters.apiVersion],
495
+ urlParameters: [
496
+ Parameters.$host,
497
+ Parameters.resourceGroupName,
498
+ Parameters.searchServiceName,
499
+ Parameters.subscriptionId
500
+ ],
501
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
502
+ serializer
503
+ };
504
+ const listByServiceNextOperationSpec: coreClient.OperationSpec = {
505
+ path: "{nextLink}",
506
+ httpMethod: "GET",
507
+ responses: {
508
+ 200: {
509
+ bodyMapper: Mappers.SharedPrivateLinkResourceListResult
510
+ },
511
+ default: {
512
+ bodyMapper: Mappers.CloudError
513
+ }
514
+ },
515
+ queryParameters: [Parameters.apiVersion],
516
+ urlParameters: [
517
+ Parameters.$host,
518
+ Parameters.resourceGroupName,
519
+ Parameters.searchServiceName,
520
+ Parameters.subscriptionId,
521
+ Parameters.nextLink
522
+ ],
523
+ headerParameters: [Parameters.accept, Parameters.clientRequestId],
524
+ serializer
525
+ };
@@ -0,0 +1,48 @@
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 {
10
+ AdminKeysGetOptionalParams,
11
+ AdminKeysGetResponse,
12
+ AdminKeyKind,
13
+ AdminKeysRegenerateOptionalParams,
14
+ AdminKeysRegenerateResponse
15
+ } from "../models";
16
+
17
+ /** Interface representing a AdminKeys. */
18
+ export interface AdminKeys {
19
+ /**
20
+ * Gets the primary and secondary admin API keys for the specified Azure Cognitive Search service.
21
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
22
+ * obtain this value from the Azure Resource Manager API or the portal.
23
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
24
+ * specified resource group.
25
+ * @param options The options parameters.
26
+ */
27
+ get(
28
+ resourceGroupName: string,
29
+ searchServiceName: string,
30
+ options?: AdminKeysGetOptionalParams
31
+ ): Promise<AdminKeysGetResponse>;
32
+ /**
33
+ * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a
34
+ * time.
35
+ * @param resourceGroupName The name of the resource group within the current subscription. You can
36
+ * obtain this value from the Azure Resource Manager API or the portal.
37
+ * @param searchServiceName The name of the Azure Cognitive Search service associated with the
38
+ * specified resource group.
39
+ * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and 'secondary'.
40
+ * @param options The options parameters.
41
+ */
42
+ regenerate(
43
+ resourceGroupName: string,
44
+ searchServiceName: string,
45
+ keyKind: AdminKeyKind,
46
+ options?: AdminKeysRegenerateOptionalParams
47
+ ): Promise<AdminKeysRegenerateResponse>;
48
+ }
@@ -1,14 +1,15 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
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
  */
8
+
10
9
  export * from "./operations";
11
10
  export * from "./adminKeys";
12
11
  export * from "./queryKeys";
13
12
  export * from "./services";
14
- //# sourceMappingURL=index.js.map
13
+ export * from "./privateLinkResources";
14
+ export * from "./privateEndpointConnections";
15
+ export * from "./sharedPrivateLinkResources";
@@ -0,0 +1,22 @@
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 { Operation, OperationsListOptionalParams } from "../models";
11
+
12
+ /// <reference lib="esnext.asynciterable" />
13
+ /** Interface representing a Operations. */
14
+ export interface Operations {
15
+ /**
16
+ * Lists all of the available REST API operations of the Microsoft.Search provider.
17
+ * @param options The options parameters.
18
+ */
19
+ list(
20
+ options?: OperationsListOptionalParams
21
+ ): PagedAsyncIterableIterator<Operation>;
22
+ }