@azure/arm-search 3.2.0 → 3.3.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 +53 -0
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/dist/index.js +1805 -777
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/adminKeysGetSample.js +3 -3
- package/dist-esm/samples-dev/adminKeysRegenerateSample.js +1 -1
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsGetSample.js +39 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsListByServiceSample.d.ts +2 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsListByServiceSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsListByServiceSample.js +54 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsListByServiceSample.js.map +1 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.d.ts +2 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.js +39 -0
- package/dist-esm/samples-dev/networkSecurityPerimeterConfigurationsReconcileSample.js.map +1 -0
- package/dist-esm/samples-dev/operationsListSample.js +3 -3
- package/dist-esm/samples-dev/operationsListSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsDeleteSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsGetSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsListByServiceSample.js +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsListByServiceSample.js.map +1 -1
- package/dist-esm/samples-dev/privateEndpointConnectionsUpdateSample.js +8 -8
- package/dist-esm/samples-dev/privateEndpointConnectionsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesListSupportedSample.js +1 -1
- package/dist-esm/samples-dev/privateLinkResourcesListSupportedSample.js.map +1 -1
- package/dist-esm/samples-dev/queryKeysCreateSample.js +2 -2
- package/dist-esm/samples-dev/queryKeysCreateSample.js.map +1 -1
- package/dist-esm/samples-dev/queryKeysDeleteSample.js +1 -1
- package/dist-esm/samples-dev/queryKeysListBySearchServiceSample.js +3 -3
- package/dist-esm/samples-dev/queryKeysListBySearchServiceSample.js.map +1 -1
- package/dist-esm/samples-dev/servicesCheckNameAvailabilitySample.js +1 -1
- package/dist-esm/samples-dev/servicesCreateOrUpdateSample.js +81 -19
- package/dist-esm/samples-dev/servicesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/servicesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/servicesGetSample.js +1 -1
- package/dist-esm/samples-dev/servicesListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/servicesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/servicesListBySubscriptionSample.js +1 -1
- package/dist-esm/samples-dev/servicesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/servicesUpdateSample.js +68 -18
- package/dist-esm/samples-dev/servicesUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/sharedPrivateLinkResourcesCreateOrUpdateSample.js +4 -4
- package/dist-esm/samples-dev/sharedPrivateLinkResourcesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/sharedPrivateLinkResourcesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/sharedPrivateLinkResourcesGetSample.js +1 -1
- package/dist-esm/samples-dev/sharedPrivateLinkResourcesListByServiceSample.js +1 -1
- package/dist-esm/samples-dev/sharedPrivateLinkResourcesListByServiceSample.js.map +1 -1
- package/dist-esm/samples-dev/usageBySubscriptionSkuSample.js +1 -1
- package/dist-esm/samples-dev/usagesListBySubscriptionSample.js +3 -3
- package/dist-esm/samples-dev/usagesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/src/lroImpl.js +1 -1
- package/dist-esm/src/models/index.d.ts +508 -113
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +90 -12
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +19 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +1028 -411
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.d.ts +2 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -1
- package/dist-esm/src/models/parameters.js +85 -57
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/adminKeys.d.ts +5 -5
- package/dist-esm/src/operations/adminKeys.js +15 -15
- package/dist-esm/src/operations/adminKeys.js.map +1 -1
- package/dist-esm/src/operations/index.d.ts +1 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -1
- package/dist-esm/src/operations/index.js +1 -0
- package/dist-esm/src/operations/index.js.map +1 -1
- package/dist-esm/src/operations/networkSecurityPerimeterConfigurations.d.ts +79 -0
- package/dist-esm/src/operations/networkSecurityPerimeterConfigurations.d.ts.map +1 -0
- package/dist-esm/src/operations/networkSecurityPerimeterConfigurations.js +289 -0
- package/dist-esm/src/operations/networkSecurityPerimeterConfigurations.js.map +1 -0
- package/dist-esm/src/operations/operations.js +5 -5
- package/dist-esm/src/operations/operations.js.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.d.ts +19 -19
- package/dist-esm/src/operations/privateEndpointConnections.d.ts.map +1 -1
- package/dist-esm/src/operations/privateEndpointConnections.js +49 -49
- package/dist-esm/src/operations/privateEndpointConnections.js.map +1 -1
- package/dist-esm/src/operations/privateLinkResources.d.ts +4 -4
- package/dist-esm/src/operations/privateLinkResources.js +10 -10
- package/dist-esm/src/operations/privateLinkResources.js.map +1 -1
- package/dist-esm/src/operations/queryKeys.d.ts +12 -12
- package/dist-esm/src/operations/queryKeys.js +32 -32
- package/dist-esm/src/operations/queryKeys.js.map +1 -1
- package/dist-esm/src/operations/services.d.ts +17 -17
- package/dist-esm/src/operations/services.d.ts.map +1 -1
- package/dist-esm/src/operations/services.js +75 -75
- package/dist-esm/src/operations/services.js.map +1 -1
- package/dist-esm/src/operations/sharedPrivateLinkResources.d.ts +21 -21
- package/dist-esm/src/operations/sharedPrivateLinkResources.d.ts.map +1 -1
- package/dist-esm/src/operations/sharedPrivateLinkResources.js +62 -62
- package/dist-esm/src/operations/sharedPrivateLinkResources.js.map +1 -1
- package/dist-esm/src/operations/usages.d.ts +2 -2
- package/dist-esm/src/operations/usages.js +13 -13
- package/dist-esm/src/operations/usages.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/adminKeys.d.ts +5 -5
- package/dist-esm/src/operationsInterfaces/index.d.ts +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
- package/dist-esm/src/operationsInterfaces/index.js +1 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/networkSecurityPerimeterConfigurations.d.ts +50 -0
- package/dist-esm/src/operationsInterfaces/networkSecurityPerimeterConfigurations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/networkSecurityPerimeterConfigurations.js +9 -0
- package/dist-esm/src/operationsInterfaces/networkSecurityPerimeterConfigurations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/privateEndpointConnections.d.ts +15 -15
- package/dist-esm/src/operationsInterfaces/privateLinkResources.d.ts +2 -2
- package/dist-esm/src/operationsInterfaces/queryKeys.d.ts +7 -7
- package/dist-esm/src/operationsInterfaces/services.d.ts +17 -17
- package/dist-esm/src/operationsInterfaces/sharedPrivateLinkResources.d.ts +17 -17
- package/dist-esm/src/operationsInterfaces/usages.d.ts +1 -1
- package/dist-esm/src/pagingHelper.js.map +1 -1
- package/dist-esm/src/searchManagementClient.d.ts +3 -2
- package/dist-esm/src/searchManagementClient.d.ts.map +1 -1
- package/dist-esm/src/searchManagementClient.js +17 -15
- package/dist-esm/src/searchManagementClient.js.map +1 -1
- package/dist-esm/test/search_examples.js.map +1 -1
- package/package.json +12 -11
- package/review/arm-search.api.md +270 -6
- package/src/lroImpl.ts +3 -3
- package/src/models/index.ts +573 -140
- package/src/models/mappers.ts +1217 -561
- package/src/models/parameters.ts +90 -58
- package/src/operations/adminKeys.ts +22 -24
- package/src/operations/index.ts +1 -0
- package/src/operations/networkSecurityPerimeterConfigurations.ts +400 -0
- package/src/operations/operations.ts +10 -10
- package/src/operations/privateEndpointConnections.ts +74 -77
- package/src/operations/privateLinkResources.ts +21 -22
- package/src/operations/queryKeys.ts +52 -55
- package/src/operations/services.ts +118 -126
- package/src/operations/sharedPrivateLinkResources.ts +103 -108
- package/src/operations/usages.ts +24 -25
- package/src/operationsInterfaces/adminKeys.ts +8 -8
- package/src/operationsInterfaces/index.ts +1 -0
- package/src/operationsInterfaces/networkSecurityPerimeterConfigurations.ts +90 -0
- package/src/operationsInterfaces/operations.ts +1 -1
- package/src/operationsInterfaces/privateEndpointConnections.ts +20 -20
- package/src/operationsInterfaces/privateLinkResources.ts +4 -4
- package/src/operationsInterfaces/queryKeys.ts +11 -11
- package/src/operationsInterfaces/services.ts +26 -26
- package/src/operationsInterfaces/sharedPrivateLinkResources.ts +24 -24
- package/src/operationsInterfaces/usages.ts +3 -3
- package/src/pagingHelper.ts +1 -1
- package/src/searchManagementClient.ts +33 -28
- package/types/arm-search.d.ts +650 -171
- package/types/tsdoc-metadata.json +1 -1
|
@@ -0,0 +1,400 @@
|
|
|
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, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
11
|
+
import { NetworkSecurityPerimeterConfigurations } from "../operationsInterfaces";
|
|
12
|
+
import * as coreClient from "@azure/core-client";
|
|
13
|
+
import * as Mappers from "../models/mappers";
|
|
14
|
+
import * as Parameters from "../models/parameters";
|
|
15
|
+
import { SearchManagementClient } from "../searchManagementClient";
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller,
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
22
|
+
import {
|
|
23
|
+
NetworkSecurityPerimeterConfiguration,
|
|
24
|
+
NetworkSecurityPerimeterConfigurationsListByServiceNextOptionalParams,
|
|
25
|
+
NetworkSecurityPerimeterConfigurationsListByServiceOptionalParams,
|
|
26
|
+
NetworkSecurityPerimeterConfigurationsListByServiceResponse,
|
|
27
|
+
NetworkSecurityPerimeterConfigurationsGetOptionalParams,
|
|
28
|
+
NetworkSecurityPerimeterConfigurationsGetResponse,
|
|
29
|
+
NetworkSecurityPerimeterConfigurationsReconcileOptionalParams,
|
|
30
|
+
NetworkSecurityPerimeterConfigurationsReconcileResponse,
|
|
31
|
+
NetworkSecurityPerimeterConfigurationsListByServiceNextResponse,
|
|
32
|
+
} from "../models";
|
|
33
|
+
|
|
34
|
+
/// <reference lib="esnext.asynciterable" />
|
|
35
|
+
/** Class containing NetworkSecurityPerimeterConfigurations operations. */
|
|
36
|
+
export class NetworkSecurityPerimeterConfigurationsImpl
|
|
37
|
+
implements NetworkSecurityPerimeterConfigurations
|
|
38
|
+
{
|
|
39
|
+
private readonly client: SearchManagementClient;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initialize a new instance of the class NetworkSecurityPerimeterConfigurations class.
|
|
43
|
+
* @param client Reference to the service client
|
|
44
|
+
*/
|
|
45
|
+
constructor(client: SearchManagementClient) {
|
|
46
|
+
this.client = client;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Gets a list of network security perimeter configurations for a search service.
|
|
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 AI Search service associated with the specified
|
|
54
|
+
* resource group.
|
|
55
|
+
* @param options The options parameters.
|
|
56
|
+
*/
|
|
57
|
+
public listByService(
|
|
58
|
+
resourceGroupName: string,
|
|
59
|
+
searchServiceName: string,
|
|
60
|
+
options?: NetworkSecurityPerimeterConfigurationsListByServiceOptionalParams,
|
|
61
|
+
): PagedAsyncIterableIterator<NetworkSecurityPerimeterConfiguration> {
|
|
62
|
+
const iter = this.listByServicePagingAll(
|
|
63
|
+
resourceGroupName,
|
|
64
|
+
searchServiceName,
|
|
65
|
+
options,
|
|
66
|
+
);
|
|
67
|
+
return {
|
|
68
|
+
next() {
|
|
69
|
+
return iter.next();
|
|
70
|
+
},
|
|
71
|
+
[Symbol.asyncIterator]() {
|
|
72
|
+
return this;
|
|
73
|
+
},
|
|
74
|
+
byPage: (settings?: PageSettings) => {
|
|
75
|
+
if (settings?.maxPageSize) {
|
|
76
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
77
|
+
}
|
|
78
|
+
return this.listByServicePagingPage(
|
|
79
|
+
resourceGroupName,
|
|
80
|
+
searchServiceName,
|
|
81
|
+
options,
|
|
82
|
+
settings,
|
|
83
|
+
);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private async *listByServicePagingPage(
|
|
89
|
+
resourceGroupName: string,
|
|
90
|
+
searchServiceName: string,
|
|
91
|
+
options?: NetworkSecurityPerimeterConfigurationsListByServiceOptionalParams,
|
|
92
|
+
settings?: PageSettings,
|
|
93
|
+
): AsyncIterableIterator<NetworkSecurityPerimeterConfiguration[]> {
|
|
94
|
+
let result: NetworkSecurityPerimeterConfigurationsListByServiceResponse;
|
|
95
|
+
let continuationToken = settings?.continuationToken;
|
|
96
|
+
if (!continuationToken) {
|
|
97
|
+
result = await this._listByService(
|
|
98
|
+
resourceGroupName,
|
|
99
|
+
searchServiceName,
|
|
100
|
+
options,
|
|
101
|
+
);
|
|
102
|
+
let page = result.value || [];
|
|
103
|
+
continuationToken = result.nextLink;
|
|
104
|
+
setContinuationToken(page, continuationToken);
|
|
105
|
+
yield page;
|
|
106
|
+
}
|
|
107
|
+
while (continuationToken) {
|
|
108
|
+
result = await this._listByServiceNext(
|
|
109
|
+
resourceGroupName,
|
|
110
|
+
searchServiceName,
|
|
111
|
+
continuationToken,
|
|
112
|
+
options,
|
|
113
|
+
);
|
|
114
|
+
continuationToken = result.nextLink;
|
|
115
|
+
let page = result.value || [];
|
|
116
|
+
setContinuationToken(page, continuationToken);
|
|
117
|
+
yield page;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
private async *listByServicePagingAll(
|
|
122
|
+
resourceGroupName: string,
|
|
123
|
+
searchServiceName: string,
|
|
124
|
+
options?: NetworkSecurityPerimeterConfigurationsListByServiceOptionalParams,
|
|
125
|
+
): AsyncIterableIterator<NetworkSecurityPerimeterConfiguration> {
|
|
126
|
+
for await (const page of this.listByServicePagingPage(
|
|
127
|
+
resourceGroupName,
|
|
128
|
+
searchServiceName,
|
|
129
|
+
options,
|
|
130
|
+
)) {
|
|
131
|
+
yield* page;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Gets a list of network security perimeter configurations for a search service.
|
|
137
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
138
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
139
|
+
* @param searchServiceName The name of the Azure AI Search service associated with the specified
|
|
140
|
+
* resource group.
|
|
141
|
+
* @param options The options parameters.
|
|
142
|
+
*/
|
|
143
|
+
private _listByService(
|
|
144
|
+
resourceGroupName: string,
|
|
145
|
+
searchServiceName: string,
|
|
146
|
+
options?: NetworkSecurityPerimeterConfigurationsListByServiceOptionalParams,
|
|
147
|
+
): Promise<NetworkSecurityPerimeterConfigurationsListByServiceResponse> {
|
|
148
|
+
return this.client.sendOperationRequest(
|
|
149
|
+
{ resourceGroupName, searchServiceName, options },
|
|
150
|
+
listByServiceOperationSpec,
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Gets a network security perimeter configuration.
|
|
156
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
157
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
158
|
+
* @param searchServiceName The name of the Azure AI Search service associated with the specified
|
|
159
|
+
* resource group.
|
|
160
|
+
* @param nspConfigName The network security configuration name.
|
|
161
|
+
* @param options The options parameters.
|
|
162
|
+
*/
|
|
163
|
+
get(
|
|
164
|
+
resourceGroupName: string,
|
|
165
|
+
searchServiceName: string,
|
|
166
|
+
nspConfigName: string,
|
|
167
|
+
options?: NetworkSecurityPerimeterConfigurationsGetOptionalParams,
|
|
168
|
+
): Promise<NetworkSecurityPerimeterConfigurationsGetResponse> {
|
|
169
|
+
return this.client.sendOperationRequest(
|
|
170
|
+
{ resourceGroupName, searchServiceName, nspConfigName, options },
|
|
171
|
+
getOperationSpec,
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Reconcile network security perimeter configuration for the Azure AI Search resource provider. This
|
|
177
|
+
* triggers a manual resync with network security perimeter configurations by ensuring the search
|
|
178
|
+
* service carries the latest configuration.
|
|
179
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
180
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
181
|
+
* @param searchServiceName The name of the Azure AI Search service associated with the specified
|
|
182
|
+
* resource group.
|
|
183
|
+
* @param nspConfigName The network security configuration name.
|
|
184
|
+
* @param options The options parameters.
|
|
185
|
+
*/
|
|
186
|
+
async beginReconcile(
|
|
187
|
+
resourceGroupName: string,
|
|
188
|
+
searchServiceName: string,
|
|
189
|
+
nspConfigName: string,
|
|
190
|
+
options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams,
|
|
191
|
+
): Promise<
|
|
192
|
+
SimplePollerLike<
|
|
193
|
+
OperationState<NetworkSecurityPerimeterConfigurationsReconcileResponse>,
|
|
194
|
+
NetworkSecurityPerimeterConfigurationsReconcileResponse
|
|
195
|
+
>
|
|
196
|
+
> {
|
|
197
|
+
const directSendOperation = async (
|
|
198
|
+
args: coreClient.OperationArguments,
|
|
199
|
+
spec: coreClient.OperationSpec,
|
|
200
|
+
): Promise<NetworkSecurityPerimeterConfigurationsReconcileResponse> => {
|
|
201
|
+
return this.client.sendOperationRequest(args, spec);
|
|
202
|
+
};
|
|
203
|
+
const sendOperationFn = async (
|
|
204
|
+
args: coreClient.OperationArguments,
|
|
205
|
+
spec: coreClient.OperationSpec,
|
|
206
|
+
) => {
|
|
207
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
208
|
+
undefined;
|
|
209
|
+
const providedCallback = args.options?.onResponse;
|
|
210
|
+
const callback: coreClient.RawResponseCallback = (
|
|
211
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
212
|
+
flatResponse: unknown,
|
|
213
|
+
) => {
|
|
214
|
+
currentRawResponse = rawResponse;
|
|
215
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
216
|
+
};
|
|
217
|
+
const updatedArgs = {
|
|
218
|
+
...args,
|
|
219
|
+
options: {
|
|
220
|
+
...args.options,
|
|
221
|
+
onResponse: callback,
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
225
|
+
return {
|
|
226
|
+
flatResponse,
|
|
227
|
+
rawResponse: {
|
|
228
|
+
statusCode: currentRawResponse!.status,
|
|
229
|
+
body: currentRawResponse!.parsedBody,
|
|
230
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const lro = createLroSpec({
|
|
236
|
+
sendOperationFn,
|
|
237
|
+
args: { resourceGroupName, searchServiceName, nspConfigName, options },
|
|
238
|
+
spec: reconcileOperationSpec,
|
|
239
|
+
});
|
|
240
|
+
const poller = await createHttpPoller<
|
|
241
|
+
NetworkSecurityPerimeterConfigurationsReconcileResponse,
|
|
242
|
+
OperationState<NetworkSecurityPerimeterConfigurationsReconcileResponse>
|
|
243
|
+
>(lro, {
|
|
244
|
+
restoreFrom: options?.resumeFrom,
|
|
245
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
246
|
+
resourceLocationConfig: "location",
|
|
247
|
+
});
|
|
248
|
+
await poller.poll();
|
|
249
|
+
return poller;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Reconcile network security perimeter configuration for the Azure AI Search resource provider. This
|
|
254
|
+
* triggers a manual resync with network security perimeter configurations by ensuring the search
|
|
255
|
+
* service carries the latest configuration.
|
|
256
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
257
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
258
|
+
* @param searchServiceName The name of the Azure AI Search service associated with the specified
|
|
259
|
+
* resource group.
|
|
260
|
+
* @param nspConfigName The network security configuration name.
|
|
261
|
+
* @param options The options parameters.
|
|
262
|
+
*/
|
|
263
|
+
async beginReconcileAndWait(
|
|
264
|
+
resourceGroupName: string,
|
|
265
|
+
searchServiceName: string,
|
|
266
|
+
nspConfigName: string,
|
|
267
|
+
options?: NetworkSecurityPerimeterConfigurationsReconcileOptionalParams,
|
|
268
|
+
): Promise<NetworkSecurityPerimeterConfigurationsReconcileResponse> {
|
|
269
|
+
const poller = await this.beginReconcile(
|
|
270
|
+
resourceGroupName,
|
|
271
|
+
searchServiceName,
|
|
272
|
+
nspConfigName,
|
|
273
|
+
options,
|
|
274
|
+
);
|
|
275
|
+
return poller.pollUntilDone();
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* ListByServiceNext
|
|
280
|
+
* @param resourceGroupName The name of the resource group within the current subscription. You can
|
|
281
|
+
* obtain this value from the Azure Resource Manager API or the portal.
|
|
282
|
+
* @param searchServiceName The name of the Azure AI Search service associated with the specified
|
|
283
|
+
* resource group.
|
|
284
|
+
* @param nextLink The nextLink from the previous successful call to the ListByService method.
|
|
285
|
+
* @param options The options parameters.
|
|
286
|
+
*/
|
|
287
|
+
private _listByServiceNext(
|
|
288
|
+
resourceGroupName: string,
|
|
289
|
+
searchServiceName: string,
|
|
290
|
+
nextLink: string,
|
|
291
|
+
options?: NetworkSecurityPerimeterConfigurationsListByServiceNextOptionalParams,
|
|
292
|
+
): Promise<NetworkSecurityPerimeterConfigurationsListByServiceNextResponse> {
|
|
293
|
+
return this.client.sendOperationRequest(
|
|
294
|
+
{ resourceGroupName, searchServiceName, nextLink, options },
|
|
295
|
+
listByServiceNextOperationSpec,
|
|
296
|
+
);
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
// Operation Specifications
|
|
300
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
301
|
+
|
|
302
|
+
const listByServiceOperationSpec: coreClient.OperationSpec = {
|
|
303
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations",
|
|
304
|
+
httpMethod: "GET",
|
|
305
|
+
responses: {
|
|
306
|
+
200: {
|
|
307
|
+
bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult,
|
|
308
|
+
},
|
|
309
|
+
default: {
|
|
310
|
+
bodyMapper: Mappers.CloudError,
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
queryParameters: [Parameters.apiVersion],
|
|
314
|
+
urlParameters: [
|
|
315
|
+
Parameters.$host,
|
|
316
|
+
Parameters.resourceGroupName,
|
|
317
|
+
Parameters.searchServiceName,
|
|
318
|
+
Parameters.subscriptionId,
|
|
319
|
+
],
|
|
320
|
+
headerParameters: [Parameters.accept],
|
|
321
|
+
serializer,
|
|
322
|
+
};
|
|
323
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
324
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}",
|
|
325
|
+
httpMethod: "GET",
|
|
326
|
+
responses: {
|
|
327
|
+
200: {
|
|
328
|
+
bodyMapper: Mappers.NetworkSecurityPerimeterConfiguration,
|
|
329
|
+
},
|
|
330
|
+
default: {
|
|
331
|
+
bodyMapper: Mappers.CloudError,
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
queryParameters: [Parameters.apiVersion],
|
|
335
|
+
urlParameters: [
|
|
336
|
+
Parameters.$host,
|
|
337
|
+
Parameters.resourceGroupName,
|
|
338
|
+
Parameters.searchServiceName,
|
|
339
|
+
Parameters.subscriptionId,
|
|
340
|
+
Parameters.nspConfigName,
|
|
341
|
+
],
|
|
342
|
+
headerParameters: [Parameters.accept],
|
|
343
|
+
serializer,
|
|
344
|
+
};
|
|
345
|
+
const reconcileOperationSpec: coreClient.OperationSpec = {
|
|
346
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Search/searchServices/{searchServiceName}/networkSecurityPerimeterConfigurations/{nspConfigName}/reconcile",
|
|
347
|
+
httpMethod: "POST",
|
|
348
|
+
responses: {
|
|
349
|
+
200: {
|
|
350
|
+
headersMapper:
|
|
351
|
+
Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders,
|
|
352
|
+
},
|
|
353
|
+
201: {
|
|
354
|
+
headersMapper:
|
|
355
|
+
Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders,
|
|
356
|
+
},
|
|
357
|
+
202: {
|
|
358
|
+
headersMapper:
|
|
359
|
+
Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders,
|
|
360
|
+
},
|
|
361
|
+
204: {
|
|
362
|
+
headersMapper:
|
|
363
|
+
Mappers.NetworkSecurityPerimeterConfigurationsReconcileHeaders,
|
|
364
|
+
},
|
|
365
|
+
default: {
|
|
366
|
+
bodyMapper: Mappers.CloudError,
|
|
367
|
+
},
|
|
368
|
+
},
|
|
369
|
+
queryParameters: [Parameters.apiVersion],
|
|
370
|
+
urlParameters: [
|
|
371
|
+
Parameters.$host,
|
|
372
|
+
Parameters.resourceGroupName,
|
|
373
|
+
Parameters.searchServiceName,
|
|
374
|
+
Parameters.subscriptionId,
|
|
375
|
+
Parameters.nspConfigName,
|
|
376
|
+
],
|
|
377
|
+
headerParameters: [Parameters.accept],
|
|
378
|
+
serializer,
|
|
379
|
+
};
|
|
380
|
+
const listByServiceNextOperationSpec: coreClient.OperationSpec = {
|
|
381
|
+
path: "{nextLink}",
|
|
382
|
+
httpMethod: "GET",
|
|
383
|
+
responses: {
|
|
384
|
+
200: {
|
|
385
|
+
bodyMapper: Mappers.NetworkSecurityPerimeterConfigurationListResult,
|
|
386
|
+
},
|
|
387
|
+
default: {
|
|
388
|
+
bodyMapper: Mappers.CloudError,
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
urlParameters: [
|
|
392
|
+
Parameters.$host,
|
|
393
|
+
Parameters.resourceGroupName,
|
|
394
|
+
Parameters.searchServiceName,
|
|
395
|
+
Parameters.subscriptionId,
|
|
396
|
+
Parameters.nextLink,
|
|
397
|
+
],
|
|
398
|
+
headerParameters: [Parameters.accept],
|
|
399
|
+
serializer,
|
|
400
|
+
};
|
|
@@ -15,7 +15,7 @@ import { SearchManagementClient } from "../searchManagementClient";
|
|
|
15
15
|
import {
|
|
16
16
|
Operation,
|
|
17
17
|
OperationsListOptionalParams,
|
|
18
|
-
OperationsListResponse
|
|
18
|
+
OperationsListResponse,
|
|
19
19
|
} from "../models";
|
|
20
20
|
|
|
21
21
|
/// <reference lib="esnext.asynciterable" />
|
|
@@ -36,7 +36,7 @@ export class OperationsImpl implements Operations {
|
|
|
36
36
|
* @param options The options parameters.
|
|
37
37
|
*/
|
|
38
38
|
public list(
|
|
39
|
-
options?: OperationsListOptionalParams
|
|
39
|
+
options?: OperationsListOptionalParams,
|
|
40
40
|
): PagedAsyncIterableIterator<Operation> {
|
|
41
41
|
const iter = this.listPagingAll(options);
|
|
42
42
|
return {
|
|
@@ -51,13 +51,13 @@ export class OperationsImpl implements Operations {
|
|
|
51
51
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
52
52
|
}
|
|
53
53
|
return this.listPagingPage(options, settings);
|
|
54
|
-
}
|
|
54
|
+
},
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
private async *listPagingPage(
|
|
59
59
|
options?: OperationsListOptionalParams,
|
|
60
|
-
_settings?: PageSettings
|
|
60
|
+
_settings?: PageSettings,
|
|
61
61
|
): AsyncIterableIterator<Operation[]> {
|
|
62
62
|
let result: OperationsListResponse;
|
|
63
63
|
result = await this._list(options);
|
|
@@ -65,7 +65,7 @@ export class OperationsImpl implements Operations {
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
private async *listPagingAll(
|
|
68
|
-
options?: OperationsListOptionalParams
|
|
68
|
+
options?: OperationsListOptionalParams,
|
|
69
69
|
): AsyncIterableIterator<Operation> {
|
|
70
70
|
for await (const page of this.listPagingPage(options)) {
|
|
71
71
|
yield* page;
|
|
@@ -77,7 +77,7 @@ export class OperationsImpl implements Operations {
|
|
|
77
77
|
* @param options The options parameters.
|
|
78
78
|
*/
|
|
79
79
|
private _list(
|
|
80
|
-
options?: OperationsListOptionalParams
|
|
80
|
+
options?: OperationsListOptionalParams,
|
|
81
81
|
): Promise<OperationsListResponse> {
|
|
82
82
|
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
83
83
|
}
|
|
@@ -90,14 +90,14 @@ const listOperationSpec: coreClient.OperationSpec = {
|
|
|
90
90
|
httpMethod: "GET",
|
|
91
91
|
responses: {
|
|
92
92
|
200: {
|
|
93
|
-
bodyMapper: Mappers.OperationListResult
|
|
93
|
+
bodyMapper: Mappers.OperationListResult,
|
|
94
94
|
},
|
|
95
95
|
default: {
|
|
96
|
-
bodyMapper: Mappers.CloudError
|
|
97
|
-
}
|
|
96
|
+
bodyMapper: Mappers.CloudError,
|
|
97
|
+
},
|
|
98
98
|
},
|
|
99
99
|
queryParameters: [Parameters.apiVersion],
|
|
100
100
|
urlParameters: [Parameters.$host],
|
|
101
101
|
headerParameters: [Parameters.accept],
|
|
102
|
-
serializer
|
|
102
|
+
serializer,
|
|
103
103
|
};
|