@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
@@ -1,167 +0,0 @@
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.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
9
- */
10
-
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/adminKeysMappers";
14
- import * as Parameters from "../models/parameters";
15
- import { SearchManagementClientContext } from "../searchManagementClientContext";
16
-
17
- /** Class representing a AdminKeys. */
18
- export class AdminKeys {
19
- private readonly client: SearchManagementClientContext;
20
-
21
- /**
22
- * Create a AdminKeys.
23
- * @param {SearchManagementClientContext} client Reference to the service client.
24
- */
25
- constructor(client: SearchManagementClientContext) {
26
- this.client = client;
27
- }
28
-
29
- /**
30
- * Gets the primary and secondary admin API keys for the specified Azure Search 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 Search service associated with the specified
34
- * resource group.
35
- * @param [options] The optional parameters
36
- * @returns Promise<Models.AdminKeysGetResponse>
37
- */
38
- get(resourceGroupName: string, searchServiceName: string, options?: Models.AdminKeysGetOptionalParams): Promise<Models.AdminKeysGetResponse>;
39
- /**
40
- * @param resourceGroupName The name of the resource group within the current subscription. You can
41
- * obtain this value from the Azure Resource Manager API or the portal.
42
- * @param searchServiceName The name of the Azure Search service associated with the specified
43
- * resource group.
44
- * @param callback The callback
45
- */
46
- get(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback<Models.AdminKeyResult>): void;
47
- /**
48
- * @param resourceGroupName The name of the resource group within the current subscription. You can
49
- * obtain this value from the Azure Resource Manager API or the portal.
50
- * @param searchServiceName The name of the Azure Search service associated with the specified
51
- * resource group.
52
- * @param options The optional parameters
53
- * @param callback The callback
54
- */
55
- get(resourceGroupName: string, searchServiceName: string, options: Models.AdminKeysGetOptionalParams, callback: msRest.ServiceCallback<Models.AdminKeyResult>): void;
56
- get(resourceGroupName: string, searchServiceName: string, options?: Models.AdminKeysGetOptionalParams | msRest.ServiceCallback<Models.AdminKeyResult>, callback?: msRest.ServiceCallback<Models.AdminKeyResult>): Promise<Models.AdminKeysGetResponse> {
57
- return this.client.sendOperationRequest(
58
- {
59
- resourceGroupName,
60
- searchServiceName,
61
- options
62
- },
63
- getOperationSpec,
64
- callback) as Promise<Models.AdminKeysGetResponse>;
65
- }
66
-
67
- /**
68
- * Regenerates either the primary or secondary admin API key. You can only regenerate one key at a
69
- * time.
70
- * @param resourceGroupName The name of the resource group within the current subscription. You can
71
- * obtain this value from the Azure Resource Manager API or the portal.
72
- * @param searchServiceName The name of the Azure Search service associated with the specified
73
- * resource group.
74
- * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and
75
- * 'secondary'. Possible values include: 'primary', 'secondary'
76
- * @param [options] The optional parameters
77
- * @returns Promise<Models.AdminKeysRegenerateResponse>
78
- */
79
- regenerate(resourceGroupName: string, searchServiceName: string, keyKind: Models.AdminKeyKind, options?: Models.AdminKeysRegenerateOptionalParams): Promise<Models.AdminKeysRegenerateResponse>;
80
- /**
81
- * @param resourceGroupName The name of the resource group within the current subscription. You can
82
- * obtain this value from the Azure Resource Manager API or the portal.
83
- * @param searchServiceName The name of the Azure Search service associated with the specified
84
- * resource group.
85
- * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and
86
- * 'secondary'. Possible values include: 'primary', 'secondary'
87
- * @param callback The callback
88
- */
89
- regenerate(resourceGroupName: string, searchServiceName: string, keyKind: Models.AdminKeyKind, callback: msRest.ServiceCallback<Models.AdminKeyResult>): void;
90
- /**
91
- * @param resourceGroupName The name of the resource group within the current subscription. You can
92
- * obtain this value from the Azure Resource Manager API or the portal.
93
- * @param searchServiceName The name of the Azure Search service associated with the specified
94
- * resource group.
95
- * @param keyKind Specifies which key to regenerate. Valid values include 'primary' and
96
- * 'secondary'. Possible values include: 'primary', 'secondary'
97
- * @param options The optional parameters
98
- * @param callback The callback
99
- */
100
- regenerate(resourceGroupName: string, searchServiceName: string, keyKind: Models.AdminKeyKind, options: Models.AdminKeysRegenerateOptionalParams, callback: msRest.ServiceCallback<Models.AdminKeyResult>): void;
101
- regenerate(resourceGroupName: string, searchServiceName: string, keyKind: Models.AdminKeyKind, options?: Models.AdminKeysRegenerateOptionalParams | msRest.ServiceCallback<Models.AdminKeyResult>, callback?: msRest.ServiceCallback<Models.AdminKeyResult>): Promise<Models.AdminKeysRegenerateResponse> {
102
- return this.client.sendOperationRequest(
103
- {
104
- resourceGroupName,
105
- searchServiceName,
106
- keyKind,
107
- options
108
- },
109
- regenerateOperationSpec,
110
- callback) as Promise<Models.AdminKeysRegenerateResponse>;
111
- }
112
- }
113
-
114
- // Operation Specifications
115
- const serializer = new msRest.Serializer(Mappers);
116
- const getOperationSpec: msRest.OperationSpec = {
117
- httpMethod: "POST",
118
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listAdminKeys",
119
- urlParameters: [
120
- Parameters.resourceGroupName,
121
- Parameters.searchServiceName,
122
- Parameters.subscriptionId
123
- ],
124
- queryParameters: [
125
- Parameters.apiVersion
126
- ],
127
- headerParameters: [
128
- Parameters.acceptLanguage,
129
- Parameters.clientRequestId
130
- ],
131
- responses: {
132
- 200: {
133
- bodyMapper: Mappers.AdminKeyResult
134
- },
135
- default: {
136
- bodyMapper: Mappers.CloudError
137
- }
138
- },
139
- serializer
140
- };
141
-
142
- const regenerateOperationSpec: msRest.OperationSpec = {
143
- httpMethod: "POST",
144
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/regenerateAdminKey/{keyKind}",
145
- urlParameters: [
146
- Parameters.resourceGroupName,
147
- Parameters.searchServiceName,
148
- Parameters.keyKind,
149
- Parameters.subscriptionId
150
- ],
151
- queryParameters: [
152
- Parameters.apiVersion
153
- ],
154
- headerParameters: [
155
- Parameters.acceptLanguage,
156
- Parameters.clientRequestId
157
- ],
158
- responses: {
159
- 200: {
160
- bodyMapper: Mappers.AdminKeyResult
161
- },
162
- default: {
163
- bodyMapper: Mappers.CloudError
164
- }
165
- },
166
- serializer
167
- };
@@ -1,74 +0,0 @@
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.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
9
- */
10
-
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/operationsMappers";
14
- import * as Parameters from "../models/parameters";
15
- import { SearchManagementClientContext } from "../searchManagementClientContext";
16
-
17
- /** Class representing a Operations. */
18
- export class Operations {
19
- private readonly client: SearchManagementClientContext;
20
-
21
- /**
22
- * Create a Operations.
23
- * @param {SearchManagementClientContext} client Reference to the service client.
24
- */
25
- constructor(client: SearchManagementClientContext) {
26
- this.client = client;
27
- }
28
-
29
- /**
30
- * Lists all of the available REST API operations of the Microsoft.Search provider.
31
- * @param [options] The optional parameters
32
- * @returns Promise<Models.OperationsListResponse>
33
- */
34
- list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
35
- /**
36
- * @param callback The callback
37
- */
38
- list(callback: msRest.ServiceCallback<Models.OperationListResult>): void;
39
- /**
40
- * @param options The optional parameters
41
- * @param callback The callback
42
- */
43
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
44
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListResponse> {
45
- return this.client.sendOperationRequest(
46
- {
47
- options
48
- },
49
- listOperationSpec,
50
- callback) as Promise<Models.OperationsListResponse>;
51
- }
52
- }
53
-
54
- // Operation Specifications
55
- const serializer = new msRest.Serializer(Mappers);
56
- const listOperationSpec: msRest.OperationSpec = {
57
- httpMethod: "GET",
58
- path: "providers/Microsoft.Search/operations",
59
- queryParameters: [
60
- Parameters.apiVersion
61
- ],
62
- headerParameters: [
63
- Parameters.acceptLanguage
64
- ],
65
- responses: {
66
- 200: {
67
- bodyMapper: Mappers.OperationListResult
68
- },
69
- default: {
70
- bodyMapper: Mappers.CloudError
71
- }
72
- },
73
- serializer
74
- };
@@ -1,234 +0,0 @@
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.
5
- *
6
- * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
9
- */
10
-
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as Models from "../models";
13
- import * as Mappers from "../models/queryKeysMappers";
14
- import * as Parameters from "../models/parameters";
15
- import { SearchManagementClientContext } from "../searchManagementClientContext";
16
-
17
- /** Class representing a QueryKeys. */
18
- export class QueryKeys {
19
- private readonly client: SearchManagementClientContext;
20
-
21
- /**
22
- * Create a QueryKeys.
23
- * @param {SearchManagementClientContext} client Reference to the service client.
24
- */
25
- constructor(client: SearchManagementClientContext) {
26
- this.client = client;
27
- }
28
-
29
- /**
30
- * Generates a new query key for the specified Search service. You can create up to 50 query keys
31
- * per service.
32
- * @param resourceGroupName The name of the resource group within the current subscription. You can
33
- * obtain this value from the Azure Resource Manager API or the portal.
34
- * @param searchServiceName The name of the Azure Search service associated with the specified
35
- * resource group.
36
- * @param name The name of the new query API key.
37
- * @param [options] The optional parameters
38
- * @returns Promise<Models.QueryKeysCreateResponse>
39
- */
40
- create(resourceGroupName: string, searchServiceName: string, name: string, options?: Models.QueryKeysCreateOptionalParams): Promise<Models.QueryKeysCreateResponse>;
41
- /**
42
- * @param resourceGroupName The name of the resource group within the current subscription. You can
43
- * obtain this value from the Azure Resource Manager API or the portal.
44
- * @param searchServiceName The name of the Azure Search service associated with the specified
45
- * resource group.
46
- * @param name The name of the new query API key.
47
- * @param callback The callback
48
- */
49
- create(resourceGroupName: string, searchServiceName: string, name: string, callback: msRest.ServiceCallback<Models.QueryKey>): void;
50
- /**
51
- * @param resourceGroupName The name of the resource group within the current subscription. You can
52
- * obtain this value from the Azure Resource Manager API or the portal.
53
- * @param searchServiceName The name of the Azure Search service associated with the specified
54
- * resource group.
55
- * @param name The name of the new query API key.
56
- * @param options The optional parameters
57
- * @param callback The callback
58
- */
59
- create(resourceGroupName: string, searchServiceName: string, name: string, options: Models.QueryKeysCreateOptionalParams, callback: msRest.ServiceCallback<Models.QueryKey>): void;
60
- create(resourceGroupName: string, searchServiceName: string, name: string, options?: Models.QueryKeysCreateOptionalParams | msRest.ServiceCallback<Models.QueryKey>, callback?: msRest.ServiceCallback<Models.QueryKey>): Promise<Models.QueryKeysCreateResponse> {
61
- return this.client.sendOperationRequest(
62
- {
63
- resourceGroupName,
64
- searchServiceName,
65
- name,
66
- options
67
- },
68
- createOperationSpec,
69
- callback) as Promise<Models.QueryKeysCreateResponse>;
70
- }
71
-
72
- /**
73
- * Returns the list of query API keys for the given Azure Search service.
74
- * @param resourceGroupName The name of the resource group within the current subscription. You can
75
- * obtain this value from the Azure Resource Manager API or the portal.
76
- * @param searchServiceName The name of the Azure Search service associated with the specified
77
- * resource group.
78
- * @param [options] The optional parameters
79
- * @returns Promise<Models.QueryKeysListBySearchServiceResponse>
80
- */
81
- listBySearchService(resourceGroupName: string, searchServiceName: string, options?: Models.QueryKeysListBySearchServiceOptionalParams): Promise<Models.QueryKeysListBySearchServiceResponse>;
82
- /**
83
- * @param resourceGroupName The name of the resource group within the current subscription. You can
84
- * obtain this value from the Azure Resource Manager API or the portal.
85
- * @param searchServiceName The name of the Azure Search service associated with the specified
86
- * resource group.
87
- * @param callback The callback
88
- */
89
- listBySearchService(resourceGroupName: string, searchServiceName: string, callback: msRest.ServiceCallback<Models.ListQueryKeysResult>): void;
90
- /**
91
- * @param resourceGroupName The name of the resource group within the current subscription. You can
92
- * obtain this value from the Azure Resource Manager API or the portal.
93
- * @param searchServiceName The name of the Azure Search service associated with the specified
94
- * resource group.
95
- * @param options The optional parameters
96
- * @param callback The callback
97
- */
98
- listBySearchService(resourceGroupName: string, searchServiceName: string, options: Models.QueryKeysListBySearchServiceOptionalParams, callback: msRest.ServiceCallback<Models.ListQueryKeysResult>): void;
99
- listBySearchService(resourceGroupName: string, searchServiceName: string, options?: Models.QueryKeysListBySearchServiceOptionalParams | msRest.ServiceCallback<Models.ListQueryKeysResult>, callback?: msRest.ServiceCallback<Models.ListQueryKeysResult>): Promise<Models.QueryKeysListBySearchServiceResponse> {
100
- return this.client.sendOperationRequest(
101
- {
102
- resourceGroupName,
103
- searchServiceName,
104
- options
105
- },
106
- listBySearchServiceOperationSpec,
107
- callback) as Promise<Models.QueryKeysListBySearchServiceResponse>;
108
- }
109
-
110
- /**
111
- * Deletes the specified query key. Unlike admin keys, query keys are not regenerated. The process
112
- * for regenerating a query key is to delete and then recreate it.
113
- * @param resourceGroupName The name of the resource group within the current subscription. You can
114
- * obtain this value from the Azure Resource Manager API or the portal.
115
- * @param searchServiceName The name of the Azure Search service associated with the specified
116
- * resource group.
117
- * @param key The query key to be deleted. Query keys are identified by value, not by name.
118
- * @param [options] The optional parameters
119
- * @returns Promise<msRest.RestResponse>
120
- */
121
- deleteMethod(resourceGroupName: string, searchServiceName: string, key: string, options?: Models.QueryKeysDeleteMethodOptionalParams): Promise<msRest.RestResponse>;
122
- /**
123
- * @param resourceGroupName The name of the resource group within the current subscription. You can
124
- * obtain this value from the Azure Resource Manager API or the portal.
125
- * @param searchServiceName The name of the Azure Search service associated with the specified
126
- * resource group.
127
- * @param key The query key to be deleted. Query keys are identified by value, not by name.
128
- * @param callback The callback
129
- */
130
- deleteMethod(resourceGroupName: string, searchServiceName: string, key: string, callback: msRest.ServiceCallback<void>): void;
131
- /**
132
- * @param resourceGroupName The name of the resource group within the current subscription. You can
133
- * obtain this value from the Azure Resource Manager API or the portal.
134
- * @param searchServiceName The name of the Azure Search service associated with the specified
135
- * resource group.
136
- * @param key The query key to be deleted. Query keys are identified by value, not by name.
137
- * @param options The optional parameters
138
- * @param callback The callback
139
- */
140
- deleteMethod(resourceGroupName: string, searchServiceName: string, key: string, options: Models.QueryKeysDeleteMethodOptionalParams, callback: msRest.ServiceCallback<void>): void;
141
- deleteMethod(resourceGroupName: string, searchServiceName: string, key: string, options?: Models.QueryKeysDeleteMethodOptionalParams | msRest.ServiceCallback<void>, callback?: msRest.ServiceCallback<void>): Promise<msRest.RestResponse> {
142
- return this.client.sendOperationRequest(
143
- {
144
- resourceGroupName,
145
- searchServiceName,
146
- key,
147
- options
148
- },
149
- deleteMethodOperationSpec,
150
- callback);
151
- }
152
- }
153
-
154
- // Operation Specifications
155
- const serializer = new msRest.Serializer(Mappers);
156
- const createOperationSpec: msRest.OperationSpec = {
157
- httpMethod: "POST",
158
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/createQueryKey/{name}",
159
- urlParameters: [
160
- Parameters.resourceGroupName,
161
- Parameters.searchServiceName,
162
- Parameters.name,
163
- Parameters.subscriptionId
164
- ],
165
- queryParameters: [
166
- Parameters.apiVersion
167
- ],
168
- headerParameters: [
169
- Parameters.acceptLanguage,
170
- Parameters.clientRequestId
171
- ],
172
- responses: {
173
- 200: {
174
- bodyMapper: Mappers.QueryKey
175
- },
176
- default: {
177
- bodyMapper: Mappers.CloudError
178
- }
179
- },
180
- serializer
181
- };
182
-
183
- const listBySearchServiceOperationSpec: msRest.OperationSpec = {
184
- httpMethod: "GET",
185
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/listQueryKeys",
186
- urlParameters: [
187
- Parameters.resourceGroupName,
188
- Parameters.searchServiceName,
189
- Parameters.subscriptionId
190
- ],
191
- queryParameters: [
192
- Parameters.apiVersion
193
- ],
194
- headerParameters: [
195
- Parameters.acceptLanguage,
196
- Parameters.clientRequestId
197
- ],
198
- responses: {
199
- 200: {
200
- bodyMapper: Mappers.ListQueryKeysResult
201
- },
202
- default: {
203
- bodyMapper: Mappers.CloudError
204
- }
205
- },
206
- serializer
207
- };
208
-
209
- const deleteMethodOperationSpec: msRest.OperationSpec = {
210
- httpMethod: "DELETE",
211
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/deleteQueryKey/{key}",
212
- urlParameters: [
213
- Parameters.resourceGroupName,
214
- Parameters.searchServiceName,
215
- Parameters.key,
216
- Parameters.subscriptionId
217
- ],
218
- queryParameters: [
219
- Parameters.apiVersion
220
- ],
221
- headerParameters: [
222
- Parameters.acceptLanguage,
223
- Parameters.clientRequestId
224
- ],
225
- responses: {
226
- 200: {},
227
- 204: {},
228
- 404: {},
229
- default: {
230
- bodyMapper: Mappers.CloudError
231
- }
232
- },
233
- serializer
234
- };