@azure/arm-search 2.0.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} +1 -1
- package/README.md +70 -78
- 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/{esm/models/adminKeysMappers.js → dist-esm/src/index.js} +5 -2
- 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/{esm → dist-esm/src}/models/mappers.js +503 -558
- 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/{esm → dist-esm/src}/models/parameters.js +92 -47
- 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/{esm → dist-esm/src}/operations/index.d.ts +0 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +1 -2
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +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/{src/models/adminKeysMappers.ts → dist-esm/src/operationsInterfaces/adminKeys.js} +2 -5
- 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/{src/models/queryKeysMappers.ts → dist-esm/src/operationsInterfaces/operations.js} +2 -6
- 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/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/privateEndpointConnections.js} +2 -7
- 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/{esm/models/index.js → dist-esm/src/operationsInterfaces/services.js} +2 -1
- 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 +65 -32
- package/review/arm-search.api.md +600 -0
- package/rollup.config.js +181 -30
- package/{esm/models/queryKeysMappers.js → src/index.ts} +5 -2
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +563 -1357
- package/src/models/mappers.ts +516 -575
- package/src/models/parameters.ts +122 -48
- package/src/operations/adminKeys.ts +65 -109
- package/src/operations/index.ts +1 -2
- package/src/operations/operations.ts +64 -39
- package/src/operations/privateEndpointConnections.ts +223 -235
- package/src/operations/privateLinkResources.ts +100 -54
- package/src/operations/queryKeys.ts +192 -190
- package/src/operations/services.ts +423 -409
- package/src/operations/sharedPrivateLinkResources.ts +390 -232
- package/src/operationsInterfaces/adminKeys.ts +48 -0
- package/src/operationsInterfaces/index.ts +15 -0
- 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 +90 -46
- package/tsconfig.json +3 -3
- package/types/arm-search.d.ts +1104 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-search.js +0 -2737
- 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.map +0 -1
- package/esm/models/index.d.ts +0 -1499
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -38
- 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 -14
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.d.ts +0 -2
- package/esm/models/privateEndpointConnectionsMappers.d.ts.map +0 -1
- package/esm/models/privateEndpointConnectionsMappers.js +0 -9
- package/esm/models/privateEndpointConnectionsMappers.js.map +0 -1
- package/esm/models/privateLinkResourcesMappers.d.ts +0 -2
- package/esm/models/privateLinkResourcesMappers.d.ts.map +0 -1
- package/esm/models/privateLinkResourcesMappers.js +0 -9
- package/esm/models/privateLinkResourcesMappers.js.map +0 -1
- package/esm/models/queryKeysMappers.d.ts +0 -2
- package/esm/models/queryKeysMappers.d.ts.map +0 -1
- 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 -9
- package/esm/models/servicesMappers.js.map +0 -1
- package/esm/models/sharedPrivateLinkResourcesMappers.d.ts +0 -2
- package/esm/models/sharedPrivateLinkResourcesMappers.d.ts.map +0 -1
- package/esm/models/sharedPrivateLinkResourcesMappers.js +0 -9
- package/esm/models/sharedPrivateLinkResourcesMappers.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 -92
- package/esm/operations/adminKeys.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -28
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -50
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/privateEndpointConnections.d.ts +0 -161
- package/esm/operations/privateEndpointConnections.d.ts.map +0 -1
- package/esm/operations/privateEndpointConnections.js +0 -197
- package/esm/operations/privateEndpointConnections.js.map +0 -1
- package/esm/operations/privateLinkResources.d.ts +0 -40
- package/esm/operations/privateLinkResources.d.ts.map +0 -1
- package/esm/operations/privateLinkResources.js +0 -58
- package/esm/operations/privateLinkResources.js.map +0 -1
- package/esm/operations/queryKeys.d.ts +0 -120
- package/esm/operations/queryKeys.d.ts.map +0 -1
- package/esm/operations/queryKeys.js +0 -156
- package/esm/operations/queryKeys.js.map +0 -1
- package/esm/operations/services.d.ts +0 -225
- package/esm/operations/services.d.ts.map +0 -1
- package/esm/operations/services.js +0 -355
- package/esm/operations/services.js.map +0 -1
- package/esm/operations/sharedPrivateLinkResources.d.ts +0 -147
- package/esm/operations/sharedPrivateLinkResources.d.ts.map +0 -1
- package/esm/operations/sharedPrivateLinkResources.js +0 -255
- package/esm/operations/sharedPrivateLinkResources.js.map +0 -1
- package/esm/searchManagementClient.d.ts +0 -31
- package/esm/searchManagementClient.d.ts.map +0 -1
- package/esm/searchManagementClient.js +0 -44
- package/esm/searchManagementClient.js.map +0 -1
- package/esm/searchManagementClientContext.d.ts +0 -23
- package/esm/searchManagementClientContext.d.ts.map +0 -1
- package/esm/searchManagementClientContext.js +0 -61
- package/esm/searchManagementClientContext.js.map +0 -1
- package/src/models/privateEndpointConnectionsMappers.ts +0 -33
- package/src/models/privateLinkResourcesMappers.ts +0 -33
- package/src/models/servicesMappers.ts +0 -35
- package/src/models/sharedPrivateLinkResourcesMappers.ts +0 -33
- package/src/searchManagementClientContext.ts +0 -68
|
@@ -3,84 +3,122 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
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
13
|
import * as Parameters from "../models/parameters";
|
|
14
|
-
import {
|
|
14
|
+
import { SearchManagementClient } from "../searchManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
PrivateLinkResource,
|
|
17
|
+
PrivateLinkResourcesListSupportedOptionalParams,
|
|
18
|
+
PrivateLinkResourcesListSupportedResponse
|
|
19
|
+
} from "../models";
|
|
15
20
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
/// <reference lib="esnext.asynciterable" />
|
|
22
|
+
/** Class containing PrivateLinkResources operations. */
|
|
23
|
+
export class PrivateLinkResourcesImpl implements PrivateLinkResources {
|
|
24
|
+
private readonly client: SearchManagementClient;
|
|
19
25
|
|
|
20
26
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @param
|
|
27
|
+
* Initialize a new instance of the class PrivateLinkResources class.
|
|
28
|
+
* @param client Reference to the service client
|
|
23
29
|
*/
|
|
24
|
-
constructor(client:
|
|
30
|
+
constructor(client: SearchManagementClient) {
|
|
25
31
|
this.client = client;
|
|
26
32
|
}
|
|
27
33
|
|
|
28
34
|
/**
|
|
29
35
|
* Gets a list of all supported private link resource types for the given service.
|
|
30
36
|
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
31
|
-
*
|
|
37
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
32
38
|
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
33
|
-
*
|
|
34
|
-
* @param
|
|
35
|
-
* @returns Promise<Models.PrivateLinkResourcesListSupportedResponse>
|
|
39
|
+
* specified resource group.
|
|
40
|
+
* @param options The options parameters.
|
|
36
41
|
*/
|
|
37
|
-
listSupported(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
+
|
|
46
96
|
/**
|
|
97
|
+
* Gets a list of all supported private link resource types for the given service.
|
|
47
98
|
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
48
|
-
*
|
|
99
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
49
100
|
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
50
|
-
*
|
|
51
|
-
* @param options The
|
|
52
|
-
* @param callback The callback
|
|
101
|
+
* specified resource group.
|
|
102
|
+
* @param options The options parameters.
|
|
53
103
|
*/
|
|
54
|
-
|
|
55
|
-
|
|
104
|
+
private _listSupported(
|
|
105
|
+
resourceGroupName: string,
|
|
106
|
+
searchServiceName: string,
|
|
107
|
+
options?: PrivateLinkResourcesListSupportedOptionalParams
|
|
108
|
+
): Promise<PrivateLinkResourcesListSupportedResponse> {
|
|
56
109
|
return this.client.sendOperationRequest(
|
|
57
|
-
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
options
|
|
61
|
-
},
|
|
62
|
-
listSupportedOperationSpec,
|
|
63
|
-
callback) as Promise<Models.PrivateLinkResourcesListSupportedResponse>;
|
|
110
|
+
{ resourceGroupName, searchServiceName, options },
|
|
111
|
+
listSupportedOperationSpec
|
|
112
|
+
);
|
|
64
113
|
}
|
|
65
114
|
}
|
|
66
|
-
|
|
67
115
|
// Operation Specifications
|
|
68
|
-
const serializer =
|
|
69
|
-
|
|
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",
|
|
70
121
|
httpMethod: "GET",
|
|
71
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/privateLinkResources",
|
|
72
|
-
urlParameters: [
|
|
73
|
-
Parameters.subscriptionId,
|
|
74
|
-
Parameters.resourceGroupName,
|
|
75
|
-
Parameters.searchServiceName
|
|
76
|
-
],
|
|
77
|
-
queryParameters: [
|
|
78
|
-
Parameters.apiVersion
|
|
79
|
-
],
|
|
80
|
-
headerParameters: [
|
|
81
|
-
Parameters.acceptLanguage,
|
|
82
|
-
Parameters.clientRequestId
|
|
83
|
-
],
|
|
84
122
|
responses: {
|
|
85
123
|
200: {
|
|
86
124
|
bodyMapper: Mappers.PrivateLinkResourcesResult
|
|
@@ -89,5 +127,13 @@ const listSupportedOperationSpec: msRest.OperationSpec = {
|
|
|
89
127
|
bodyMapper: Mappers.CloudError
|
|
90
128
|
}
|
|
91
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],
|
|
92
138
|
serializer
|
|
93
139
|
};
|
|
@@ -3,199 +3,203 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
7
|
-
* regenerated.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
8
7
|
*/
|
|
9
8
|
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import * as
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { QueryKeys } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
13
|
import * as Parameters from "../models/parameters";
|
|
14
|
-
import {
|
|
14
|
+
import { SearchManagementClient } from "../searchManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
QueryKey,
|
|
17
|
+
QueryKeysListBySearchServiceNextOptionalParams,
|
|
18
|
+
QueryKeysListBySearchServiceOptionalParams,
|
|
19
|
+
QueryKeysCreateOptionalParams,
|
|
20
|
+
QueryKeysCreateResponse,
|
|
21
|
+
QueryKeysListBySearchServiceResponse,
|
|
22
|
+
QueryKeysDeleteOptionalParams,
|
|
23
|
+
QueryKeysListBySearchServiceNextResponse
|
|
24
|
+
} from "../models";
|
|
15
25
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
/// <reference lib="esnext.asynciterable" />
|
|
27
|
+
/** Class containing QueryKeys operations. */
|
|
28
|
+
export class QueryKeysImpl implements QueryKeys {
|
|
29
|
+
private readonly client: SearchManagementClient;
|
|
19
30
|
|
|
20
31
|
/**
|
|
21
|
-
*
|
|
22
|
-
* @param
|
|
32
|
+
* Initialize a new instance of the class QueryKeys class.
|
|
33
|
+
* @param client Reference to the service client
|
|
23
34
|
*/
|
|
24
|
-
constructor(client:
|
|
35
|
+
constructor(client: SearchManagementClient) {
|
|
25
36
|
this.client = client;
|
|
26
37
|
}
|
|
27
38
|
|
|
28
39
|
/**
|
|
29
|
-
*
|
|
30
|
-
* per service.
|
|
31
|
-
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
32
|
-
* obtain this value from the Azure Resource Manager API or the portal.
|
|
33
|
-
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
34
|
-
* specified resource group.
|
|
35
|
-
* @param name The name of the new query API key.
|
|
36
|
-
* @param [options] The optional parameters
|
|
37
|
-
* @returns Promise<Models.QueryKeysCreateResponse>
|
|
38
|
-
*/
|
|
39
|
-
create(resourceGroupName: string, searchServiceName: string, name: string, options?: Models.QueryKeysCreateOptionalParams): Promise<Models.QueryKeysCreateResponse>;
|
|
40
|
-
/**
|
|
41
|
-
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
42
|
-
* obtain this value from the Azure Resource Manager API or the portal.
|
|
43
|
-
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
44
|
-
* specified resource group.
|
|
45
|
-
* @param name The name of the new query API key.
|
|
46
|
-
* @param callback The callback
|
|
47
|
-
*/
|
|
48
|
-
create(resourceGroupName: string, searchServiceName: string, name: string, callback: msRest.ServiceCallback<Models.QueryKey>): void;
|
|
49
|
-
/**
|
|
40
|
+
* Returns the list of query API keys for the given Azure Cognitive Search service.
|
|
50
41
|
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
51
|
-
*
|
|
42
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
52
43
|
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
53
|
-
*
|
|
54
|
-
* @param
|
|
55
|
-
* @param options The optional parameters
|
|
56
|
-
* @param callback The callback
|
|
44
|
+
* specified resource group.
|
|
45
|
+
* @param options The options parameters.
|
|
57
46
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
47
|
+
public listBySearchService(
|
|
48
|
+
resourceGroupName: string,
|
|
49
|
+
searchServiceName: string,
|
|
50
|
+
options?: QueryKeysListBySearchServiceOptionalParams
|
|
51
|
+
): PagedAsyncIterableIterator<QueryKey> {
|
|
52
|
+
const iter = this.listBySearchServicePagingAll(
|
|
53
|
+
resourceGroupName,
|
|
54
|
+
searchServiceName,
|
|
55
|
+
options
|
|
56
|
+
);
|
|
57
|
+
return {
|
|
58
|
+
next() {
|
|
59
|
+
return iter.next();
|
|
60
|
+
},
|
|
61
|
+
[Symbol.asyncIterator]() {
|
|
62
|
+
return this;
|
|
66
63
|
},
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
byPage: () => {
|
|
65
|
+
return this.listBySearchServicePagingPage(
|
|
66
|
+
resourceGroupName,
|
|
67
|
+
searchServiceName,
|
|
68
|
+
options
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
69
72
|
}
|
|
70
73
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
* specified resource group.
|
|
86
|
-
* @param callback The callback
|
|
87
|
-
*/
|
|
88
|
-
listBySearchService(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback<Models.ListQueryKeysResult>): void;
|
|
89
|
-
/**
|
|
90
|
-
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
91
|
-
* obtain this value from the Azure Resource Manager API or the portal.
|
|
92
|
-
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
93
|
-
* specified resource group.
|
|
94
|
-
* @param options The optional parameters
|
|
95
|
-
* @param callback The callback
|
|
96
|
-
*/
|
|
97
|
-
listBySearchService(resourceGroupName: string, searchServiceName: string, options: Models.QueryKeysListBySearchServiceOptionalParams, callback: msRest.ServiceCallback<Models.ListQueryKeysResult>): void;
|
|
98
|
-
listBySearchService(resourceGroupName: string, searchServiceName: string, options?: Models.QueryKeysListBySearchServiceOptionalParams | msRest.ServiceCallback<Models.ListQueryKeysResult>, callback?: msRest.ServiceCallback<Models.ListQueryKeysResult>): Promise<Models.QueryKeysListBySearchServiceResponse> {
|
|
99
|
-
return this.client.sendOperationRequest(
|
|
100
|
-
{
|
|
74
|
+
private async *listBySearchServicePagingPage(
|
|
75
|
+
resourceGroupName: string,
|
|
76
|
+
searchServiceName: string,
|
|
77
|
+
options?: QueryKeysListBySearchServiceOptionalParams
|
|
78
|
+
): AsyncIterableIterator<QueryKey[]> {
|
|
79
|
+
let result = await this._listBySearchService(
|
|
80
|
+
resourceGroupName,
|
|
81
|
+
searchServiceName,
|
|
82
|
+
options
|
|
83
|
+
);
|
|
84
|
+
yield result.value || [];
|
|
85
|
+
let continuationToken = result.nextLink;
|
|
86
|
+
while (continuationToken) {
|
|
87
|
+
result = await this._listBySearchServiceNext(
|
|
101
88
|
resourceGroupName,
|
|
102
89
|
searchServiceName,
|
|
90
|
+
continuationToken,
|
|
103
91
|
options
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
92
|
+
);
|
|
93
|
+
continuationToken = result.nextLink;
|
|
94
|
+
yield result.value || [];
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
private async *listBySearchServicePagingAll(
|
|
99
|
+
resourceGroupName: string,
|
|
100
|
+
searchServiceName: string,
|
|
101
|
+
options?: QueryKeysListBySearchServiceOptionalParams
|
|
102
|
+
): AsyncIterableIterator<QueryKey> {
|
|
103
|
+
for await (const page of this.listBySearchServicePagingPage(
|
|
104
|
+
resourceGroupName,
|
|
105
|
+
searchServiceName,
|
|
106
|
+
options
|
|
107
|
+
)) {
|
|
108
|
+
yield* page;
|
|
109
|
+
}
|
|
107
110
|
}
|
|
108
111
|
|
|
109
112
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
113
|
+
* Generates a new query key for the specified search service. You can create up to 50 query keys per
|
|
114
|
+
* service.
|
|
112
115
|
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
113
|
-
*
|
|
116
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
114
117
|
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
115
|
-
*
|
|
116
|
-
* @param
|
|
117
|
-
* @param
|
|
118
|
-
* @returns Promise<msRest.RestResponse>
|
|
118
|
+
* specified resource group.
|
|
119
|
+
* @param name The name of the new query API key.
|
|
120
|
+
* @param options The options parameters.
|
|
119
121
|
*/
|
|
120
|
-
|
|
122
|
+
create(
|
|
123
|
+
resourceGroupName: string,
|
|
124
|
+
searchServiceName: string,
|
|
125
|
+
name: string,
|
|
126
|
+
options?: QueryKeysCreateOptionalParams
|
|
127
|
+
): Promise<QueryKeysCreateResponse> {
|
|
128
|
+
return this.client.sendOperationRequest(
|
|
129
|
+
{ resourceGroupName, searchServiceName, name, options },
|
|
130
|
+
createOperationSpec
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
|
|
121
134
|
/**
|
|
135
|
+
* Returns the list of query API keys for the given Azure Cognitive Search service.
|
|
122
136
|
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
123
|
-
*
|
|
137
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
124
138
|
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
125
|
-
*
|
|
126
|
-
* @param
|
|
127
|
-
* @param callback The callback
|
|
139
|
+
* specified resource group.
|
|
140
|
+
* @param options The options parameters.
|
|
128
141
|
*/
|
|
129
|
-
|
|
142
|
+
private _listBySearchService(
|
|
143
|
+
resourceGroupName: string,
|
|
144
|
+
searchServiceName: string,
|
|
145
|
+
options?: QueryKeysListBySearchServiceOptionalParams
|
|
146
|
+
): Promise<QueryKeysListBySearchServiceResponse> {
|
|
147
|
+
return this.client.sendOperationRequest(
|
|
148
|
+
{ resourceGroupName, searchServiceName, options },
|
|
149
|
+
listBySearchServiceOperationSpec
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
130
153
|
/**
|
|
154
|
+
* Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process for
|
|
155
|
+
* regenerating a query key is to delete and then recreate it.
|
|
131
156
|
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
132
|
-
*
|
|
157
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
133
158
|
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
134
|
-
*
|
|
159
|
+
* specified resource group.
|
|
135
160
|
* @param key The query key to be deleted. Query keys are identified by value, not by name.
|
|
136
|
-
* @param options The
|
|
137
|
-
* @param callback The callback
|
|
161
|
+
* @param options The options parameters.
|
|
138
162
|
*/
|
|
139
|
-
|
|
140
|
-
|
|
163
|
+
delete(
|
|
164
|
+
resourceGroupName: string,
|
|
165
|
+
searchServiceName: string,
|
|
166
|
+
key: string,
|
|
167
|
+
options?: QueryKeysDeleteOptionalParams
|
|
168
|
+
): Promise<void> {
|
|
141
169
|
return this.client.sendOperationRequest(
|
|
142
|
-
{
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
key,
|
|
146
|
-
options
|
|
147
|
-
},
|
|
148
|
-
deleteMethodOperationSpec,
|
|
149
|
-
callback);
|
|
170
|
+
{ resourceGroupName, searchServiceName, key, options },
|
|
171
|
+
deleteOperationSpec
|
|
172
|
+
);
|
|
150
173
|
}
|
|
151
174
|
|
|
152
175
|
/**
|
|
153
|
-
*
|
|
154
|
-
* @param
|
|
155
|
-
*
|
|
156
|
-
* @
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
161
|
-
* @param callback The callback
|
|
162
|
-
*/
|
|
163
|
-
listBySearchServiceNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.ListQueryKeysResult>): void;
|
|
164
|
-
/**
|
|
165
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
166
|
-
* @param options The optional parameters
|
|
167
|
-
* @param callback The callback
|
|
176
|
+
* ListBySearchServiceNext
|
|
177
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
178
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
179
|
+
* @param searchServiceName The name of the Azure Cognitive Search service associated with the
|
|
180
|
+
* specified resource group.
|
|
181
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySearchService method.
|
|
182
|
+
* @param options The options parameters.
|
|
168
183
|
*/
|
|
169
|
-
|
|
170
|
-
|
|
184
|
+
private _listBySearchServiceNext(
|
|
185
|
+
resourceGroupName: string,
|
|
186
|
+
searchServiceName: string,
|
|
187
|
+
nextLink: string,
|
|
188
|
+
options?: QueryKeysListBySearchServiceNextOptionalParams
|
|
189
|
+
): Promise<QueryKeysListBySearchServiceNextResponse> {
|
|
171
190
|
return this.client.sendOperationRequest(
|
|
172
|
-
{
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
},
|
|
176
|
-
listBySearchServiceNextOperationSpec,
|
|
177
|
-
callback) as Promise<Models.QueryKeysListBySearchServiceNextResponse>;
|
|
191
|
+
{ resourceGroupName, searchServiceName, nextLink, options },
|
|
192
|
+
listBySearchServiceNextOperationSpec
|
|
193
|
+
);
|
|
178
194
|
}
|
|
179
195
|
}
|
|
180
|
-
|
|
181
196
|
// Operation Specifications
|
|
182
|
-
const serializer =
|
|
183
|
-
|
|
197
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
198
|
+
|
|
199
|
+
const createOperationSpec: coreClient.OperationSpec = {
|
|
200
|
+
path:
|
|
201
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}",
|
|
184
202
|
httpMethod: "POST",
|
|
185
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}",
|
|
186
|
-
urlParameters: [
|
|
187
|
-
Parameters.resourceGroupName,
|
|
188
|
-
Parameters.searchServiceName,
|
|
189
|
-
Parameters.name,
|
|
190
|
-
Parameters.subscriptionId
|
|
191
|
-
],
|
|
192
|
-
queryParameters: [
|
|
193
|
-
Parameters.apiVersion
|
|
194
|
-
],
|
|
195
|
-
headerParameters: [
|
|
196
|
-
Parameters.acceptLanguage,
|
|
197
|
-
Parameters.clientRequestId
|
|
198
|
-
],
|
|
199
203
|
responses: {
|
|
200
204
|
200: {
|
|
201
205
|
bodyMapper: Mappers.QueryKey
|
|
@@ -204,24 +208,21 @@ const createOperationSpec: msRest.OperationSpec = {
|
|
|
204
208
|
bodyMapper: Mappers.CloudError
|
|
205
209
|
}
|
|
206
210
|
},
|
|
207
|
-
|
|
208
|
-
};
|
|
209
|
-
|
|
210
|
-
const listBySearchServiceOperationSpec: msRest.OperationSpec = {
|
|
211
|
-
httpMethod: "POST",
|
|
212
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys",
|
|
211
|
+
queryParameters: [Parameters.apiVersion],
|
|
213
212
|
urlParameters: [
|
|
213
|
+
Parameters.$host,
|
|
214
214
|
Parameters.resourceGroupName,
|
|
215
215
|
Parameters.searchServiceName,
|
|
216
|
-
Parameters.subscriptionId
|
|
217
|
-
|
|
218
|
-
queryParameters: [
|
|
219
|
-
Parameters.apiVersion
|
|
220
|
-
],
|
|
221
|
-
headerParameters: [
|
|
222
|
-
Parameters.acceptLanguage,
|
|
223
|
-
Parameters.clientRequestId
|
|
216
|
+
Parameters.subscriptionId,
|
|
217
|
+
Parameters.name
|
|
224
218
|
],
|
|
219
|
+
headerParameters: [Parameters.accept, Parameters.clientRequestId],
|
|
220
|
+
serializer
|
|
221
|
+
};
|
|
222
|
+
const listBySearchServiceOperationSpec: coreClient.OperationSpec = {
|
|
223
|
+
path:
|
|
224
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys",
|
|
225
|
+
httpMethod: "POST",
|
|
225
226
|
responses: {
|
|
226
227
|
200: {
|
|
227
228
|
bodyMapper: Mappers.ListQueryKeysResult
|
|
@@ -230,25 +231,20 @@ const listBySearchServiceOperationSpec: msRest.OperationSpec = {
|
|
|
230
231
|
bodyMapper: Mappers.CloudError
|
|
231
232
|
}
|
|
232
233
|
},
|
|
233
|
-
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
const deleteMethodOperationSpec: msRest.OperationSpec = {
|
|
237
|
-
httpMethod: "DELETE",
|
|
238
|
-
path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}",
|
|
234
|
+
queryParameters: [Parameters.apiVersion],
|
|
239
235
|
urlParameters: [
|
|
236
|
+
Parameters.$host,
|
|
240
237
|
Parameters.resourceGroupName,
|
|
241
238
|
Parameters.searchServiceName,
|
|
242
|
-
Parameters.key,
|
|
243
239
|
Parameters.subscriptionId
|
|
244
240
|
],
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
241
|
+
headerParameters: [Parameters.accept, Parameters.clientRequestId],
|
|
242
|
+
serializer
|
|
243
|
+
};
|
|
244
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
245
|
+
path:
|
|
246
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}",
|
|
247
|
+
httpMethod: "DELETE",
|
|
252
248
|
responses: {
|
|
253
249
|
200: {},
|
|
254
250
|
204: {},
|
|
@@ -257,23 +253,20 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
|
|
|
257
253
|
bodyMapper: Mappers.CloudError
|
|
258
254
|
}
|
|
259
255
|
},
|
|
256
|
+
queryParameters: [Parameters.apiVersion],
|
|
257
|
+
urlParameters: [
|
|
258
|
+
Parameters.$host,
|
|
259
|
+
Parameters.resourceGroupName,
|
|
260
|
+
Parameters.searchServiceName,
|
|
261
|
+
Parameters.subscriptionId,
|
|
262
|
+
Parameters.key
|
|
263
|
+
],
|
|
264
|
+
headerParameters: [Parameters.accept, Parameters.clientRequestId],
|
|
260
265
|
serializer
|
|
261
266
|
};
|
|
262
|
-
|
|
263
|
-
const listBySearchServiceNextOperationSpec: msRest.OperationSpec = {
|
|
264
|
-
httpMethod: "POST",
|
|
265
|
-
baseUrl: "https://management.azure.com",
|
|
267
|
+
const listBySearchServiceNextOperationSpec: coreClient.OperationSpec = {
|
|
266
268
|
path: "{nextLink}",
|
|
267
|
-
|
|
268
|
-
Parameters.nextPageLink
|
|
269
|
-
],
|
|
270
|
-
queryParameters: [
|
|
271
|
-
Parameters.apiVersion
|
|
272
|
-
],
|
|
273
|
-
headerParameters: [
|
|
274
|
-
Parameters.acceptLanguage,
|
|
275
|
-
Parameters.clientRequestId
|
|
276
|
-
],
|
|
269
|
+
httpMethod: "GET",
|
|
277
270
|
responses: {
|
|
278
271
|
200: {
|
|
279
272
|
bodyMapper: Mappers.ListQueryKeysResult
|
|
@@ -282,5 +275,14 @@ const listBySearchServiceNextOperationSpec: msRest.OperationSpec = {
|
|
|
282
275
|
bodyMapper: Mappers.CloudError
|
|
283
276
|
}
|
|
284
277
|
},
|
|
278
|
+
queryParameters: [Parameters.apiVersion],
|
|
279
|
+
urlParameters: [
|
|
280
|
+
Parameters.$host,
|
|
281
|
+
Parameters.resourceGroupName,
|
|
282
|
+
Parameters.searchServiceName,
|
|
283
|
+
Parameters.subscriptionId,
|
|
284
|
+
Parameters.nextLink
|
|
285
|
+
],
|
|
286
|
+
headerParameters: [Parameters.accept, Parameters.clientRequestId],
|
|
285
287
|
serializer
|
|
286
288
|
};
|