@azure/arm-operationalinsights 9.0.1-alpha.20250718.1 → 9.0.1-alpha.20250730.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/dist/browser/lroImpl.js +11 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +255 -120
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operationalInsightsManagementClient.js +34 -5
- package/dist/browser/operationalInsightsManagementClient.js.map +1 -1
- package/dist/browser/operations/availableServiceTiers.js +1 -0
- package/dist/browser/operations/availableServiceTiers.js.map +1 -1
- package/dist/browser/operations/clusters.js +78 -97
- package/dist/browser/operations/clusters.js.map +1 -1
- package/dist/browser/operations/dataExports.js +10 -27
- package/dist/browser/operations/dataExports.js.map +1 -1
- package/dist/browser/operations/dataSources.js +23 -40
- package/dist/browser/operations/dataSources.js.map +1 -1
- package/dist/browser/operations/deletedWorkspaces.js +19 -53
- package/dist/browser/operations/deletedWorkspaces.js.map +1 -1
- package/dist/browser/operations/gateways.js +1 -0
- package/dist/browser/operations/gateways.js.map +1 -1
- package/dist/browser/operations/intelligencePacks.js +1 -0
- package/dist/browser/operations/intelligencePacks.js.map +1 -1
- package/dist/browser/operations/linkedServices.js +32 -39
- package/dist/browser/operations/linkedServices.js.map +1 -1
- package/dist/browser/operations/linkedStorageAccounts.js +10 -27
- package/dist/browser/operations/linkedStorageAccounts.js.map +1 -1
- package/dist/browser/operations/managementGroups.js +10 -27
- package/dist/browser/operations/managementGroups.js.map +1 -1
- package/dist/browser/operations/operationStatuses.js +1 -0
- package/dist/browser/operations/operationStatuses.js.map +1 -1
- package/dist/browser/operations/operations.js +23 -40
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/queries.js +45 -79
- package/dist/browser/operations/queries.js.map +1 -1
- package/dist/browser/operations/queryPacks.js +45 -79
- package/dist/browser/operations/queryPacks.js.map +1 -1
- package/dist/browser/operations/savedSearches.js +1 -0
- package/dist/browser/operations/savedSearches.js.map +1 -1
- package/dist/browser/operations/schemaOperations.js +1 -0
- package/dist/browser/operations/schemaOperations.js.map +1 -1
- package/dist/browser/operations/sharedKeysOperations.js +1 -0
- package/dist/browser/operations/sharedKeysOperations.js.map +1 -1
- package/dist/browser/operations/storageInsightConfigs.js +23 -40
- package/dist/browser/operations/storageInsightConfigs.js.map +1 -1
- package/dist/browser/operations/tables.js +43 -45
- package/dist/browser/operations/tables.js.map +1 -1
- package/dist/browser/operations/usages.js +10 -27
- package/dist/browser/operations/usages.js.map +1 -1
- package/dist/browser/operations/workspacePurge.js +1 -0
- package/dist/browser/operations/workspacePurge.js.map +1 -1
- package/dist/browser/operations/workspaces.js +41 -65
- package/dist/browser/operations/workspaces.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/commonjs/lroImpl.js +11 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +255 -120
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operationalInsightsManagementClient.js +34 -5
- package/dist/commonjs/operationalInsightsManagementClient.js.map +1 -1
- package/dist/commonjs/operations/availableServiceTiers.js +1 -0
- package/dist/commonjs/operations/availableServiceTiers.js.map +1 -1
- package/dist/commonjs/operations/clusters.js +78 -96
- package/dist/commonjs/operations/clusters.js.map +1 -1
- package/dist/commonjs/operations/dataExports.js +10 -26
- package/dist/commonjs/operations/dataExports.js.map +1 -1
- package/dist/commonjs/operations/dataSources.js +23 -39
- package/dist/commonjs/operations/dataSources.js.map +1 -1
- package/dist/commonjs/operations/deletedWorkspaces.js +19 -52
- package/dist/commonjs/operations/deletedWorkspaces.js.map +1 -1
- package/dist/commonjs/operations/gateways.js +1 -0
- package/dist/commonjs/operations/gateways.js.map +1 -1
- package/dist/commonjs/operations/intelligencePacks.js +1 -0
- package/dist/commonjs/operations/intelligencePacks.js.map +1 -1
- package/dist/commonjs/operations/linkedServices.js +32 -38
- package/dist/commonjs/operations/linkedServices.js.map +1 -1
- package/dist/commonjs/operations/linkedStorageAccounts.js +10 -26
- package/dist/commonjs/operations/linkedStorageAccounts.js.map +1 -1
- package/dist/commonjs/operations/managementGroups.js +10 -26
- package/dist/commonjs/operations/managementGroups.js.map +1 -1
- package/dist/commonjs/operations/operationStatuses.js +1 -0
- package/dist/commonjs/operations/operationStatuses.js.map +1 -1
- package/dist/commonjs/operations/operations.js +23 -39
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/queries.js +45 -78
- package/dist/commonjs/operations/queries.js.map +1 -1
- package/dist/commonjs/operations/queryPacks.js +45 -78
- package/dist/commonjs/operations/queryPacks.js.map +1 -1
- package/dist/commonjs/operations/savedSearches.js +1 -0
- package/dist/commonjs/operations/savedSearches.js.map +1 -1
- package/dist/commonjs/operations/schemaOperations.js +1 -0
- package/dist/commonjs/operations/schemaOperations.js.map +1 -1
- package/dist/commonjs/operations/sharedKeysOperations.js +1 -0
- package/dist/commonjs/operations/sharedKeysOperations.js.map +1 -1
- package/dist/commonjs/operations/storageInsightConfigs.js +23 -39
- package/dist/commonjs/operations/storageInsightConfigs.js.map +1 -1
- package/dist/commonjs/operations/tables.js +43 -44
- package/dist/commonjs/operations/tables.js.map +1 -1
- package/dist/commonjs/operations/usages.js +10 -26
- package/dist/commonjs/operations/usages.js.map +1 -1
- package/dist/commonjs/operations/workspacePurge.js +1 -0
- package/dist/commonjs/operations/workspacePurge.js.map +1 -1
- package/dist/commonjs/operations/workspaces.js +41 -64
- package/dist/commonjs/operations/workspaces.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/lroImpl.js +11 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +255 -120
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operationalInsightsManagementClient.js +34 -5
- package/dist/esm/operationalInsightsManagementClient.js.map +1 -1
- package/dist/esm/operations/availableServiceTiers.js +1 -0
- package/dist/esm/operations/availableServiceTiers.js.map +1 -1
- package/dist/esm/operations/clusters.js +78 -97
- package/dist/esm/operations/clusters.js.map +1 -1
- package/dist/esm/operations/dataExports.js +10 -27
- package/dist/esm/operations/dataExports.js.map +1 -1
- package/dist/esm/operations/dataSources.js +23 -40
- package/dist/esm/operations/dataSources.js.map +1 -1
- package/dist/esm/operations/deletedWorkspaces.js +19 -53
- package/dist/esm/operations/deletedWorkspaces.js.map +1 -1
- package/dist/esm/operations/gateways.js +1 -0
- package/dist/esm/operations/gateways.js.map +1 -1
- package/dist/esm/operations/intelligencePacks.js +1 -0
- package/dist/esm/operations/intelligencePacks.js.map +1 -1
- package/dist/esm/operations/linkedServices.js +32 -39
- package/dist/esm/operations/linkedServices.js.map +1 -1
- package/dist/esm/operations/linkedStorageAccounts.js +10 -27
- package/dist/esm/operations/linkedStorageAccounts.js.map +1 -1
- package/dist/esm/operations/managementGroups.js +10 -27
- package/dist/esm/operations/managementGroups.js.map +1 -1
- package/dist/esm/operations/operationStatuses.js +1 -0
- package/dist/esm/operations/operationStatuses.js.map +1 -1
- package/dist/esm/operations/operations.js +23 -40
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/queries.js +45 -79
- package/dist/esm/operations/queries.js.map +1 -1
- package/dist/esm/operations/queryPacks.js +45 -79
- package/dist/esm/operations/queryPacks.js.map +1 -1
- package/dist/esm/operations/savedSearches.js +1 -0
- package/dist/esm/operations/savedSearches.js.map +1 -1
- package/dist/esm/operations/schemaOperations.js +1 -0
- package/dist/esm/operations/schemaOperations.js.map +1 -1
- package/dist/esm/operations/sharedKeysOperations.js +1 -0
- package/dist/esm/operations/sharedKeysOperations.js.map +1 -1
- package/dist/esm/operations/storageInsightConfigs.js +23 -40
- package/dist/esm/operations/storageInsightConfigs.js.map +1 -1
- package/dist/esm/operations/tables.js +43 -45
- package/dist/esm/operations/tables.js.map +1 -1
- package/dist/esm/operations/usages.js +10 -27
- package/dist/esm/operations/usages.js.map +1 -1
- package/dist/esm/operations/workspacePurge.js +1 -0
- package/dist/esm/operations/workspacePurge.js.map +1 -1
- package/dist/esm/operations/workspaces.js +41 -65
- package/dist/esm/operations/workspaces.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/react-native/lroImpl.js +11 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +255 -120
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operationalInsightsManagementClient.js +34 -5
- package/dist/react-native/operationalInsightsManagementClient.js.map +1 -1
- package/dist/react-native/operations/availableServiceTiers.js +1 -0
- package/dist/react-native/operations/availableServiceTiers.js.map +1 -1
- package/dist/react-native/operations/clusters.js +78 -97
- package/dist/react-native/operations/clusters.js.map +1 -1
- package/dist/react-native/operations/dataExports.js +10 -27
- package/dist/react-native/operations/dataExports.js.map +1 -1
- package/dist/react-native/operations/dataSources.js +23 -40
- package/dist/react-native/operations/dataSources.js.map +1 -1
- package/dist/react-native/operations/deletedWorkspaces.js +19 -53
- package/dist/react-native/operations/deletedWorkspaces.js.map +1 -1
- package/dist/react-native/operations/gateways.js +1 -0
- package/dist/react-native/operations/gateways.js.map +1 -1
- package/dist/react-native/operations/intelligencePacks.js +1 -0
- package/dist/react-native/operations/intelligencePacks.js.map +1 -1
- package/dist/react-native/operations/linkedServices.js +32 -39
- package/dist/react-native/operations/linkedServices.js.map +1 -1
- package/dist/react-native/operations/linkedStorageAccounts.js +10 -27
- package/dist/react-native/operations/linkedStorageAccounts.js.map +1 -1
- package/dist/react-native/operations/managementGroups.js +10 -27
- package/dist/react-native/operations/managementGroups.js.map +1 -1
- package/dist/react-native/operations/operationStatuses.js +1 -0
- package/dist/react-native/operations/operationStatuses.js.map +1 -1
- package/dist/react-native/operations/operations.js +23 -40
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/queries.js +45 -79
- package/dist/react-native/operations/queries.js.map +1 -1
- package/dist/react-native/operations/queryPacks.js +45 -79
- package/dist/react-native/operations/queryPacks.js.map +1 -1
- package/dist/react-native/operations/savedSearches.js +1 -0
- package/dist/react-native/operations/savedSearches.js.map +1 -1
- package/dist/react-native/operations/schemaOperations.js +1 -0
- package/dist/react-native/operations/schemaOperations.js.map +1 -1
- package/dist/react-native/operations/sharedKeysOperations.js +1 -0
- package/dist/react-native/operations/sharedKeysOperations.js.map +1 -1
- package/dist/react-native/operations/storageInsightConfigs.js +23 -40
- package/dist/react-native/operations/storageInsightConfigs.js.map +1 -1
- package/dist/react-native/operations/tables.js +43 -45
- package/dist/react-native/operations/tables.js.map +1 -1
- package/dist/react-native/operations/usages.js +10 -27
- package/dist/react-native/operations/usages.js.map +1 -1
- package/dist/react-native/operations/workspacePurge.js +1 -0
- package/dist/react-native/operations/workspacePurge.js.map +1 -1
- package/dist/react-native/operations/workspaces.js +41 -65
- package/dist/react-native/operations/workspaces.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-operationalinsights-node.api.md +1758 -1758
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
@@ -14,6 +13,7 @@ import { LroImpl } from "../lroImpl.js";
|
|
|
14
13
|
/// <reference lib="esnext.asynciterable" />
|
|
15
14
|
/** Class containing LinkedServices operations. */
|
|
16
15
|
export class LinkedServicesImpl {
|
|
16
|
+
client;
|
|
17
17
|
/**
|
|
18
18
|
* Initialize a new instance of the class LinkedServices class.
|
|
19
19
|
* @param client Reference to the service client
|
|
@@ -37,39 +37,22 @@ export class LinkedServicesImpl {
|
|
|
37
37
|
return this;
|
|
38
38
|
},
|
|
39
39
|
byPage: (settings) => {
|
|
40
|
-
if (settings
|
|
40
|
+
if (settings?.maxPageSize) {
|
|
41
41
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
42
42
|
}
|
|
43
43
|
return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
yield yield __await(result.value || []);
|
|
52
|
-
});
|
|
47
|
+
async *listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
|
|
48
|
+
let result;
|
|
49
|
+
result = await this._listByWorkspace(resourceGroupName, workspaceName, options);
|
|
50
|
+
yield result.value || [];
|
|
53
51
|
}
|
|
54
|
-
listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
for (var _d = true, _e = __asyncValues(this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
59
|
-
_c = _f.value;
|
|
60
|
-
_d = false;
|
|
61
|
-
const page = _c;
|
|
62
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
66
|
-
finally {
|
|
67
|
-
try {
|
|
68
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
69
|
-
}
|
|
70
|
-
finally { if (e_1) throw e_1.error; }
|
|
71
|
-
}
|
|
72
|
-
});
|
|
52
|
+
async *listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
|
|
53
|
+
for await (const page of this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)) {
|
|
54
|
+
yield* page;
|
|
55
|
+
}
|
|
73
56
|
}
|
|
74
57
|
/**
|
|
75
58
|
* Create or update a linked service.
|
|
@@ -84,14 +67,19 @@ export class LinkedServicesImpl {
|
|
|
84
67
|
return this.client.sendOperationRequest(args, spec);
|
|
85
68
|
};
|
|
86
69
|
const sendOperation = async (args, spec) => {
|
|
87
|
-
var _a;
|
|
88
70
|
let currentRawResponse = undefined;
|
|
89
|
-
const providedCallback =
|
|
71
|
+
const providedCallback = args.options?.onResponse;
|
|
90
72
|
const callback = (rawResponse, flatResponse) => {
|
|
91
73
|
currentRawResponse = rawResponse;
|
|
92
|
-
providedCallback
|
|
74
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
75
|
+
};
|
|
76
|
+
const updatedArgs = {
|
|
77
|
+
...args,
|
|
78
|
+
options: {
|
|
79
|
+
...args.options,
|
|
80
|
+
onResponse: callback
|
|
81
|
+
}
|
|
93
82
|
};
|
|
94
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
95
83
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
96
84
|
return {
|
|
97
85
|
flatResponse,
|
|
@@ -110,8 +98,8 @@ export class LinkedServicesImpl {
|
|
|
110
98
|
options
|
|
111
99
|
}, createOrUpdateOperationSpec);
|
|
112
100
|
const poller = new LroEngine(lro, {
|
|
113
|
-
resumeFrom: options
|
|
114
|
-
intervalInMs: options
|
|
101
|
+
resumeFrom: options?.resumeFrom,
|
|
102
|
+
intervalInMs: options?.updateIntervalInMs
|
|
115
103
|
});
|
|
116
104
|
await poller.poll();
|
|
117
105
|
return poller;
|
|
@@ -140,14 +128,19 @@ export class LinkedServicesImpl {
|
|
|
140
128
|
return this.client.sendOperationRequest(args, spec);
|
|
141
129
|
};
|
|
142
130
|
const sendOperation = async (args, spec) => {
|
|
143
|
-
var _a;
|
|
144
131
|
let currentRawResponse = undefined;
|
|
145
|
-
const providedCallback =
|
|
132
|
+
const providedCallback = args.options?.onResponse;
|
|
146
133
|
const callback = (rawResponse, flatResponse) => {
|
|
147
134
|
currentRawResponse = rawResponse;
|
|
148
|
-
providedCallback
|
|
135
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
136
|
+
};
|
|
137
|
+
const updatedArgs = {
|
|
138
|
+
...args,
|
|
139
|
+
options: {
|
|
140
|
+
...args.options,
|
|
141
|
+
onResponse: callback
|
|
142
|
+
}
|
|
149
143
|
};
|
|
150
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
151
144
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
152
145
|
return {
|
|
153
146
|
flatResponse,
|
|
@@ -160,8 +153,8 @@ export class LinkedServicesImpl {
|
|
|
160
153
|
};
|
|
161
154
|
const lro = new LroImpl(sendOperation, { resourceGroupName, workspaceName, linkedServiceName, options }, deleteOperationSpec);
|
|
162
155
|
const poller = new LroEngine(lro, {
|
|
163
|
-
resumeFrom: options
|
|
164
|
-
intervalInMs: options
|
|
156
|
+
resumeFrom: options?.resumeFrom,
|
|
157
|
+
intervalInMs: options?.updateIntervalInMs
|
|
165
158
|
});
|
|
166
159
|
await poller.poll();
|
|
167
160
|
return poller;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkedServices.js","sourceRoot":"","sources":["../../../src/operations/linkedServices.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,M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AC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { LinkedServices } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n LinkedService,\n LinkedServicesListByWorkspaceOptionalParams,\n LinkedServicesListByWorkspaceResponse,\n LinkedServicesCreateOrUpdateOptionalParams,\n LinkedServicesCreateOrUpdateResponse,\n LinkedServicesDeleteOptionalParams,\n LinkedServicesDeleteResponse,\n LinkedServicesGetOptionalParams,\n LinkedServicesGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LinkedServices operations. */\nexport class LinkedServicesImpl implements LinkedServices {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class LinkedServices class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the linked services instances in a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<LinkedService> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<LinkedService[]> {\n let result: LinkedServicesListByWorkspaceResponse;\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): AsyncIterableIterator<LinkedService> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Create or update a linked service.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linkedServices resource\n * @param parameters The parameters required to create or update a linked service.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n parameters: LinkedService,\n options?: LinkedServicesCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinkedServicesCreateOrUpdateResponse>,\n LinkedServicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinkedServicesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or update a linked service.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linkedServices resource\n * @param parameters The parameters required to create or update a linked service.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n parameters: LinkedService,\n options?: LinkedServicesCreateOrUpdateOptionalParams\n ): Promise<LinkedServicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesDeleteOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinkedServicesDeleteResponse>,\n LinkedServicesDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinkedServicesDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, workspaceName, linkedServiceName, options },\n deleteOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesDeleteOptionalParams\n ): Promise<LinkedServicesDeleteResponse> {\n const poller = await this.beginDelete(\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesGetOptionalParams\n ): Promise<LinkedServicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, linkedServiceName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets the linked services instances in a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): Promise<LinkedServicesListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n },\n 201: {\n bodyMapper: Mappers.LinkedService\n },\n 202: {\n bodyMapper: Mappers.LinkedService\n },\n 204: {\n bodyMapper: Mappers.LinkedService\n }\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n },\n 201: {\n bodyMapper: Mappers.LinkedService\n },\n 202: {\n bodyMapper: Mappers.LinkedService\n },\n 204: {\n bodyMapper: Mappers.LinkedService\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedServiceListResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"linkedServices.js","sourceRoot":"","sources":["../../../src/operations/linkedServices.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAkC,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAaxC,4CAA4C;AAC5C,kDAAkD;AAClD,MAAM,OAAO,kBAAkB;IACZ,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;Q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;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,0KAA0K;IAC5K,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,aAAa;SAClC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,iBAAiB;KAC7B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EACF,sJAAsJ;IACxJ,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,uBAAuB;SAC5C;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { LinkedServices } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport { PollerLike, PollOperationState, LroEngine } from \"@azure/core-lro\";\nimport { LroImpl } from \"../lroImpl.js\";\nimport {\n LinkedService,\n LinkedServicesListByWorkspaceOptionalParams,\n LinkedServicesListByWorkspaceResponse,\n LinkedServicesCreateOrUpdateOptionalParams,\n LinkedServicesCreateOrUpdateResponse,\n LinkedServicesDeleteOptionalParams,\n LinkedServicesDeleteResponse,\n LinkedServicesGetOptionalParams,\n LinkedServicesGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LinkedServices operations. */\nexport class LinkedServicesImpl implements LinkedServices {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class LinkedServices class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets the linked services instances in a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<LinkedService> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<LinkedService[]> {\n let result: LinkedServicesListByWorkspaceResponse;\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): AsyncIterableIterator<LinkedService> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Create or update a linked service.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linkedServices resource\n * @param parameters The parameters required to create or update a linked service.\n * @param options The options parameters.\n */\n async beginCreateOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n parameters: LinkedService,\n options?: LinkedServicesCreateOrUpdateOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinkedServicesCreateOrUpdateResponse>,\n LinkedServicesCreateOrUpdateResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinkedServicesCreateOrUpdateResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n {\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n parameters,\n options\n },\n createOrUpdateOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Create or update a linked service.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linkedServices resource\n * @param parameters The parameters required to create or update a linked service.\n * @param options The options parameters.\n */\n async beginCreateOrUpdateAndWait(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n parameters: LinkedService,\n options?: LinkedServicesCreateOrUpdateOptionalParams\n ): Promise<LinkedServicesCreateOrUpdateResponse> {\n const poller = await this.beginCreateOrUpdate(\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n parameters,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Deletes a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n async beginDelete(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesDeleteOptionalParams\n ): Promise<\n PollerLike<\n PollOperationState<LinkedServicesDeleteResponse>,\n LinkedServicesDeleteResponse\n >\n > {\n const directSendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ): Promise<LinkedServicesDeleteResponse> => {\n return this.client.sendOperationRequest(args, spec);\n };\n const sendOperation = async (\n args: coreClient.OperationArguments,\n spec: coreClient.OperationSpec\n ) => {\n let currentRawResponse:\n | coreClient.FullOperationResponse\n | undefined = undefined;\n const providedCallback = args.options?.onResponse;\n const callback: coreClient.RawResponseCallback = (\n rawResponse: coreClient.FullOperationResponse,\n flatResponse: unknown\n ) => {\n currentRawResponse = rawResponse;\n providedCallback?.(rawResponse, flatResponse);\n };\n const updatedArgs = {\n ...args,\n options: {\n ...args.options,\n onResponse: callback\n }\n };\n const flatResponse = await directSendOperation(updatedArgs, spec);\n return {\n flatResponse,\n rawResponse: {\n statusCode: currentRawResponse!.status,\n body: currentRawResponse!.parsedBody,\n headers: currentRawResponse!.headers.toJSON()\n }\n };\n };\n\n const lro = new LroImpl(\n sendOperation,\n { resourceGroupName, workspaceName, linkedServiceName, options },\n deleteOperationSpec\n );\n const poller = new LroEngine(lro, {\n resumeFrom: options?.resumeFrom,\n intervalInMs: options?.updateIntervalInMs\n });\n await poller.poll();\n return poller;\n }\n\n /**\n * Deletes a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n async beginDeleteAndWait(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesDeleteOptionalParams\n ): Promise<LinkedServicesDeleteResponse> {\n const poller = await this.beginDelete(\n resourceGroupName,\n workspaceName,\n linkedServiceName,\n options\n );\n return poller.pollUntilDone();\n }\n\n /**\n * Gets a linked service instance.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param linkedServiceName Name of the linked service.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n linkedServiceName: string,\n options?: LinkedServicesGetOptionalParams\n ): Promise<LinkedServicesGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, linkedServiceName, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets the linked services instances in a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedServicesListByWorkspaceOptionalParams\n ): Promise<LinkedServicesListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n },\n 201: {\n bodyMapper: Mappers.LinkedService\n },\n 202: {\n bodyMapper: Mappers.LinkedService\n },\n 204: {\n bodyMapper: Mappers.LinkedService\n }\n },\n requestBody: Parameters.parameters2,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"DELETE\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n },\n 201: {\n bodyMapper: Mappers.LinkedService\n },\n 202: {\n bodyMapper: Mappers.LinkedService\n },\n 204: {\n bodyMapper: Mappers.LinkedService\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedService\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.linkedServiceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedServiceListResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
12
11
|
/// <reference lib="esnext.asynciterable" />
|
|
13
12
|
/** Class containing LinkedStorageAccounts operations. */
|
|
14
13
|
export class LinkedStorageAccountsImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class LinkedStorageAccounts class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -36,39 +36,22 @@ export class LinkedStorageAccountsImpl {
|
|
|
36
36
|
return this;
|
|
37
37
|
},
|
|
38
38
|
byPage: (settings) => {
|
|
39
|
-
if (settings
|
|
39
|
+
if (settings?.maxPageSize) {
|
|
40
40
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
41
41
|
}
|
|
42
42
|
return this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options, settings);
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
|
-
listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
yield yield __await(result.value || []);
|
|
51
|
-
});
|
|
46
|
+
async *listByWorkspacePagingPage(resourceGroupName, workspaceName, options, _settings) {
|
|
47
|
+
let result;
|
|
48
|
+
result = await this._listByWorkspace(resourceGroupName, workspaceName, options);
|
|
49
|
+
yield result.value || [];
|
|
52
50
|
}
|
|
53
|
-
listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
for (var _d = true, _e = __asyncValues(this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
58
|
-
_c = _f.value;
|
|
59
|
-
_d = false;
|
|
60
|
-
const page = _c;
|
|
61
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
65
|
-
finally {
|
|
66
|
-
try {
|
|
67
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
68
|
-
}
|
|
69
|
-
finally { if (e_1) throw e_1.error; }
|
|
70
|
-
}
|
|
71
|
-
});
|
|
51
|
+
async *listByWorkspacePagingAll(resourceGroupName, workspaceName, options) {
|
|
52
|
+
for await (const page of this.listByWorkspacePagingPage(resourceGroupName, workspaceName, options)) {
|
|
53
|
+
yield* page;
|
|
54
|
+
}
|
|
72
55
|
}
|
|
73
56
|
/**
|
|
74
57
|
* Create or Update a link relation between current workspace and a group of storage accounts of a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkedStorageAccounts.js","sourceRoot":"","sources":["../../../src/operations/linkedStorageAccounts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAIH,OAAO,KAAK,UAAU,MAAM,oBAA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AAC,aAAa;QACxB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EACF,6JAA6J;IAC/J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+BAA+B;SACpD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { LinkedStorageAccounts } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n LinkedStorageAccountsResource,\n LinkedStorageAccountsListByWorkspaceOptionalParams,\n LinkedStorageAccountsListByWorkspaceResponse,\n DataSourceType,\n LinkedStorageAccountsCreateOrUpdateOptionalParams,\n LinkedStorageAccountsCreateOrUpdateResponse,\n LinkedStorageAccountsDeleteOptionalParams,\n LinkedStorageAccountsGetOptionalParams,\n LinkedStorageAccountsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LinkedStorageAccounts operations. */\nexport class LinkedStorageAccountsImpl implements LinkedStorageAccounts {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class LinkedStorageAccounts class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all linked storage accounts associated with the specified workspace, storage accounts will be\n * sorted by their data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<LinkedStorageAccountsResource> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<LinkedStorageAccountsResource[]> {\n let result: LinkedStorageAccountsListByWorkspaceResponse;\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): AsyncIterableIterator<LinkedStorageAccountsResource> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Create or Update a link relation between current workspace and a group of storage accounts of a\n * specific data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param parameters The parameters required to create or update linked storage accounts.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n parameters: LinkedStorageAccountsResource,\n options?: LinkedStorageAccountsCreateOrUpdateOptionalParams\n ): Promise<LinkedStorageAccountsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Deletes all linked storage accounts of a specific data source type associated with the specified\n * workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n options?: LinkedStorageAccountsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Gets all linked storage account of a specific data source type associated with the specified\n * workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n options?: LinkedStorageAccountsGetOptionalParams\n ): Promise<LinkedStorageAccountsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets all linked storage accounts associated with the specified workspace, storage accounts will be\n * sorted by their data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): Promise<LinkedStorageAccountsListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsResource\n }\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"DELETE\",\n responses: { 200: {} },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsResource\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsListResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
1
|
+
{"version":3,"file":"linkedStorageAccounts.js","sourceRoot":"","sources":["../../../src/operations/linkedStorageAccounts.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AActD,4CAA4C;AAC5C,yDAAyD;AACzD,MAAM,OAAO,yBAAyB;IACnB,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;;OAMG;IACI,eAAe,CACpB,iBAAyB,EACzB,aAAqB,EACrB,OAA4D;QAE5D,MAAM,IAAI,GAAG,IAAI,CAAC,wBAAwB,CACxC,iBAAiB,EACjB,aAAa,EACb,OAAO,CACR,CAAC;QACF,OAAO;YACL,IAAI;gBACF,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC;YACrB,CAAC;YACD,CAAC,MAAM,CAAC,aAAa,CAAC;gBACpB,OAAO,IAAI,CAAC;YACd,CAAC;YACD,MAAM,EAAE,CAAC,QAAuB,EAAE,EAAE;gBAClC,IAAI,QAAQ,EAAE,WAAW,EAAE,CAAC;oBAC1B,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;gBACrE,CAAC;gBACD,OAAO,IAAI,CAAC,yBAAyB,CACnC,iBAAiB,EACjB,aAAa,EACb,OAAO,EACP,QAAQ,CACT,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;IAE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ChL,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,6BAA6B;SAClD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;QACxB,UAAU,CAAC,cAAc;KAC1B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC;AACF,MAAM,4BAA4B,GAA6B;IAC7D,IAAI,EACF,6JAA6J;IAC/J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,+BAA+B;SACpD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { LinkedStorageAccounts } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n LinkedStorageAccountsResource,\n LinkedStorageAccountsListByWorkspaceOptionalParams,\n LinkedStorageAccountsListByWorkspaceResponse,\n DataSourceType,\n LinkedStorageAccountsCreateOrUpdateOptionalParams,\n LinkedStorageAccountsCreateOrUpdateResponse,\n LinkedStorageAccountsDeleteOptionalParams,\n LinkedStorageAccountsGetOptionalParams,\n LinkedStorageAccountsGetResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing LinkedStorageAccounts operations. */\nexport class LinkedStorageAccountsImpl implements LinkedStorageAccounts {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class LinkedStorageAccounts class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets all linked storage accounts associated with the specified workspace, storage accounts will be\n * sorted by their data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): PagedAsyncIterableIterator<LinkedStorageAccountsResource> {\n const iter = this.listByWorkspacePagingAll(\n resourceGroupName,\n workspaceName,\n options\n );\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listByWorkspacePagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<LinkedStorageAccountsResource[]> {\n let result: LinkedStorageAccountsListByWorkspaceResponse;\n result = await this._listByWorkspace(\n resourceGroupName,\n workspaceName,\n options\n );\n yield result.value || [];\n }\n\n private async *listByWorkspacePagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): AsyncIterableIterator<LinkedStorageAccountsResource> {\n for await (const page of this.listByWorkspacePagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Create or Update a link relation between current workspace and a group of storage accounts of a\n * specific data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param parameters The parameters required to create or update linked storage accounts.\n * @param options The options parameters.\n */\n createOrUpdate(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n parameters: LinkedStorageAccountsResource,\n options?: LinkedStorageAccountsCreateOrUpdateOptionalParams\n ): Promise<LinkedStorageAccountsCreateOrUpdateResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, parameters, options },\n createOrUpdateOperationSpec\n );\n }\n\n /**\n * Deletes all linked storage accounts of a specific data source type associated with the specified\n * workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param options The options parameters.\n */\n delete(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n options?: LinkedStorageAccountsDeleteOptionalParams\n ): Promise<void> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, options },\n deleteOperationSpec\n );\n }\n\n /**\n * Gets all linked storage account of a specific data source type associated with the specified\n * workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param dataSourceType Linked storage accounts type.\n * @param options The options parameters.\n */\n get(\n resourceGroupName: string,\n workspaceName: string,\n dataSourceType: DataSourceType,\n options?: LinkedStorageAccountsGetOptionalParams\n ): Promise<LinkedStorageAccountsGetResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, dataSourceType, options },\n getOperationSpec\n );\n }\n\n /**\n * Gets all linked storage accounts associated with the specified workspace, storage accounts will be\n * sorted by their data source type.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _listByWorkspace(\n resourceGroupName: string,\n workspaceName: string,\n options?: LinkedStorageAccountsListByWorkspaceOptionalParams\n ): Promise<LinkedStorageAccountsListByWorkspaceResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listByWorkspaceOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst createOrUpdateOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"PUT\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsResource\n }\n },\n requestBody: Parameters.parameters3,\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n headerParameters: [Parameters.accept, Parameters.contentType],\n mediaType: \"json\",\n serializer\n};\nconst deleteOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"DELETE\",\n responses: { 200: {} },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n serializer\n};\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsResource\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName,\n Parameters.dataSourceType\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\nconst listByWorkspaceOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.LinkedStorageAccountsListResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import * as coreClient from "@azure/core-client";
|
|
10
9
|
import * as Mappers from "../models/mappers.js";
|
|
11
10
|
import * as Parameters from "../models/parameters.js";
|
|
12
11
|
/// <reference lib="esnext.asynciterable" />
|
|
13
12
|
/** Class containing ManagementGroups operations. */
|
|
14
13
|
export class ManagementGroupsImpl {
|
|
14
|
+
client;
|
|
15
15
|
/**
|
|
16
16
|
* Initialize a new instance of the class ManagementGroups class.
|
|
17
17
|
* @param client Reference to the service client
|
|
@@ -35,39 +35,22 @@ export class ManagementGroupsImpl {
|
|
|
35
35
|
return this;
|
|
36
36
|
},
|
|
37
37
|
byPage: (settings) => {
|
|
38
|
-
if (settings
|
|
38
|
+
if (settings?.maxPageSize) {
|
|
39
39
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
40
40
|
}
|
|
41
41
|
return this.listPagingPage(resourceGroupName, workspaceName, options, settings);
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
listPagingPage(resourceGroupName, workspaceName, options, _settings) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
yield yield __await(result.value || []);
|
|
50
|
-
});
|
|
45
|
+
async *listPagingPage(resourceGroupName, workspaceName, options, _settings) {
|
|
46
|
+
let result;
|
|
47
|
+
result = await this._list(resourceGroupName, workspaceName, options);
|
|
48
|
+
yield result.value || [];
|
|
51
49
|
}
|
|
52
|
-
listPagingAll(resourceGroupName, workspaceName, options) {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(resourceGroupName, workspaceName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
57
|
-
_c = _f.value;
|
|
58
|
-
_d = false;
|
|
59
|
-
const page = _c;
|
|
60
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
64
|
-
finally {
|
|
65
|
-
try {
|
|
66
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
67
|
-
}
|
|
68
|
-
finally { if (e_1) throw e_1.error; }
|
|
69
|
-
}
|
|
70
|
-
});
|
|
50
|
+
async *listPagingAll(resourceGroupName, workspaceName, options) {
|
|
51
|
+
for await (const page of this.listPagingPage(resourceGroupName, workspaceName, options)) {
|
|
52
|
+
yield* page;
|
|
53
|
+
}
|
|
71
54
|
}
|
|
72
55
|
/**
|
|
73
56
|
* Gets a list of management groups connected to a workspace.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"managementGroups.js","sourceRoot":"","sources":["../../../src/operations/managementGroups.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG
|
|
1
|
+
{"version":3,"file":"managementGroups.js","sourceRoot":"","sources":["../../../src/operations/managementGroups.ts"],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,aAAqB,EACrB,OAA4C;QAE5C,IAAI,KAAK,EAAE,MAAM,IAAI,IAAI,IAAI,CAAC,cAAc,CAC1C,iBAAiB,EACjB,aAAa,EACb,OAAO,CACR,EAAE,CAAC;YACF,KAAK,CAAC,CAAC,IAAI,CAAC;QACd,CAAC;IACH,CAAC;IAED;;;;;OAKG;IACK,KAAK,CACX,iBAAyB,EACzB,aAAqB,EACrB,OAA4C;QAE5C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,iBAAiB,EAAE,aAAa,EAAE,OAAO,EAAE,EAC7C,iBAAiB,CAClB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,iBAAiB,GAA6B;IAClD,IAAI,EACF,wJAAwJ;IAC1J,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,mCAAmC;SACxD;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,iBAAiB;QAC5B,UAAU,CAAC,aAAa;KACzB;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { PagedAsyncIterableIterator, PageSettings } from \"@azure/core-paging\";\nimport { ManagementGroups } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n ManagementGroup,\n ManagementGroupsListOptionalParams,\n ManagementGroupsListResponse\n} from \"../models/index.js\";\n\n/// <reference lib=\"esnext.asynciterable\" />\n/** Class containing ManagementGroups operations. */\nexport class ManagementGroupsImpl implements ManagementGroups {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class ManagementGroups class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Gets a list of management groups connected to a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n public list(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams\n ): PagedAsyncIterableIterator<ManagementGroup> {\n const iter = this.listPagingAll(resourceGroupName, workspaceName, options);\n return {\n next() {\n return iter.next();\n },\n [Symbol.asyncIterator]() {\n return this;\n },\n byPage: (settings?: PageSettings) => {\n if (settings?.maxPageSize) {\n throw new Error(\"maxPageSize is not supported by this operation.\");\n }\n return this.listPagingPage(\n resourceGroupName,\n workspaceName,\n options,\n settings\n );\n }\n };\n }\n\n private async *listPagingPage(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams,\n _settings?: PageSettings\n ): AsyncIterableIterator<ManagementGroup[]> {\n let result: ManagementGroupsListResponse;\n result = await this._list(resourceGroupName, workspaceName, options);\n yield result.value || [];\n }\n\n private async *listPagingAll(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams\n ): AsyncIterableIterator<ManagementGroup> {\n for await (const page of this.listPagingPage(\n resourceGroupName,\n workspaceName,\n options\n )) {\n yield* page;\n }\n }\n\n /**\n * Gets a list of management groups connected to a workspace.\n * @param resourceGroupName The name of the resource group. The name is case insensitive.\n * @param workspaceName The name of the workspace.\n * @param options The options parameters.\n */\n private _list(\n resourceGroupName: string,\n workspaceName: string,\n options?: ManagementGroupsListOptionalParams\n ): Promise<ManagementGroupsListResponse> {\n return this.client.sendOperationRequest(\n { resourceGroupName, workspaceName, options },\n listOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst listOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.WorkspaceListManagementGroupsResult\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.resourceGroupName,\n Parameters.workspaceName\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -10,6 +10,7 @@ import * as Mappers from "../models/mappers.js";
|
|
|
10
10
|
import * as Parameters from "../models/parameters.js";
|
|
11
11
|
/** Class containing OperationStatuses operations. */
|
|
12
12
|
export class OperationStatusesImpl {
|
|
13
|
+
client;
|
|
13
14
|
/**
|
|
14
15
|
* Initialize a new instance of the class OperationStatuses class.
|
|
15
16
|
* @param client Reference to the service client
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operationStatuses.js","sourceRoot":"","sources":["../../../src/operations/operationStatuses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,qDAAqD;AACrD,MAAM,OAAO,qBAAqB;
|
|
1
|
+
{"version":3,"file":"operationStatuses.js","sourceRoot":"","sources":["../../../src/operations/operationStatuses.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,sBAAsB,CAAC;AAChD,OAAO,KAAK,UAAU,MAAM,yBAAyB,CAAC;AAOtD,qDAAqD;AACrD,MAAM,OAAO,qBAAqB;IACf,MAAM,CAAsC;IAE7D;;;OAGG;IACH,YAAY,MAA2C;QACrD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;;OAKG;IACH,GAAG,CACD,QAAgB,EAChB,gBAAwB,EACxB,OAA4C;QAE5C,OAAO,IAAI,CAAC,MAAM,CAAC,oBAAoB,CACrC,EAAE,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,EACvC,gBAAgB,CACjB,CAAC;IACJ,CAAC;CACF;AACD,2BAA2B;AAC3B,MAAM,UAAU,GAAG,UAAU,CAAC,gBAAgB,CAAC,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;AAE3E,MAAM,gBAAgB,GAA6B;IACjD,IAAI,EACF,mIAAmI;IACrI,UAAU,EAAE,KAAK;IACjB,SAAS,EAAE;QACT,GAAG,EAAE;YACH,UAAU,EAAE,OAAO,CAAC,eAAe;SACpC;KACF;IACD,eAAe,EAAE,CAAC,UAAU,CAAC,WAAW,CAAC;IACzC,aAAa,EAAE;QACb,UAAU,CAAC,KAAK;QAChB,UAAU,CAAC,cAAc;QACzB,UAAU,CAAC,QAAQ;QACnB,UAAU,CAAC,gBAAgB;KAC5B;IACD,gBAAgB,EAAE,CAAC,UAAU,CAAC,MAAM,CAAC;IACrC,UAAU;CACX,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { OperationStatuses } from \"../operationsInterfaces/index.js\";\nimport * as coreClient from \"@azure/core-client\";\nimport * as Mappers from \"../models/mappers.js\";\nimport * as Parameters from \"../models/parameters.js\";\nimport { OperationalInsightsManagementClient } from \"../operationalInsightsManagementClient.js\";\nimport {\n OperationStatusesGetOptionalParams,\n OperationStatusesGetResponse\n} from \"../models/index.js\";\n\n/** Class containing OperationStatuses operations. */\nexport class OperationStatusesImpl implements OperationStatuses {\n private readonly client: OperationalInsightsManagementClient;\n\n /**\n * Initialize a new instance of the class OperationStatuses class.\n * @param client Reference to the service client\n */\n constructor(client: OperationalInsightsManagementClient) {\n this.client = client;\n }\n\n /**\n * Get the status of a long running azure asynchronous operation.\n * @param location The region name of operation.\n * @param asyncOperationId The operation Id.\n * @param options The options parameters.\n */\n get(\n location: string,\n asyncOperationId: string,\n options?: OperationStatusesGetOptionalParams\n ): Promise<OperationStatusesGetResponse> {\n return this.client.sendOperationRequest(\n { location, asyncOperationId, options },\n getOperationSpec\n );\n }\n}\n// Operation Specifications\nconst serializer = coreClient.createSerializer(Mappers, /* isXml */ false);\n\nconst getOperationSpec: coreClient.OperationSpec = {\n path:\n \"/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}\",\n httpMethod: \"GET\",\n responses: {\n 200: {\n bodyMapper: Mappers.OperationStatus\n }\n },\n queryParameters: [Parameters.apiVersion1],\n urlParameters: [\n Parameters.$host,\n Parameters.subscriptionId,\n Parameters.location,\n Parameters.asyncOperationId\n ],\n headerParameters: [Parameters.accept],\n serializer\n};\n"]}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -13,6 +12,7 @@ import * as Parameters from "../models/parameters.js";
|
|
|
13
12
|
/// <reference lib="esnext.asynciterable" />
|
|
14
13
|
/** Class containing Operations operations. */
|
|
15
14
|
export class OperationsImpl {
|
|
15
|
+
client;
|
|
16
16
|
/**
|
|
17
17
|
* Initialize a new instance of the class Operations class.
|
|
18
18
|
* @param client Reference to the service client
|
|
@@ -34,52 +34,35 @@ export class OperationsImpl {
|
|
|
34
34
|
return this;
|
|
35
35
|
},
|
|
36
36
|
byPage: (settings) => {
|
|
37
|
-
if (settings
|
|
37
|
+
if (settings?.maxPageSize) {
|
|
38
38
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
39
39
|
}
|
|
40
40
|
return this.listPagingPage(options, settings);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
listPagingPage(options, settings) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
});
|
|
44
|
+
async *listPagingPage(options, settings) {
|
|
45
|
+
let result;
|
|
46
|
+
let continuationToken = settings?.continuationToken;
|
|
47
|
+
if (!continuationToken) {
|
|
48
|
+
result = await this._list(options);
|
|
49
|
+
let page = result.value || [];
|
|
50
|
+
continuationToken = result.nextLink;
|
|
51
|
+
setContinuationToken(page, continuationToken);
|
|
52
|
+
yield page;
|
|
53
|
+
}
|
|
54
|
+
while (continuationToken) {
|
|
55
|
+
result = await this._listNext(continuationToken, options);
|
|
56
|
+
continuationToken = result.nextLink;
|
|
57
|
+
let page = result.value || [];
|
|
58
|
+
setContinuationToken(page, continuationToken);
|
|
59
|
+
yield page;
|
|
60
|
+
}
|
|
63
61
|
}
|
|
64
|
-
listPagingAll(options) {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
for (var _d = true, _e = __asyncValues(this.listPagingPage(options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
69
|
-
_c = _f.value;
|
|
70
|
-
_d = false;
|
|
71
|
-
const page = _c;
|
|
72
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
76
|
-
finally {
|
|
77
|
-
try {
|
|
78
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
79
|
-
}
|
|
80
|
-
finally { if (e_1) throw e_1.error; }
|
|
81
|
-
}
|
|
82
|
-
});
|
|
62
|
+
async *listPagingAll(options) {
|
|
63
|
+
for await (const page of this.listPagingPage(options)) {
|
|
64
|
+
yield* page;
|
|
65
|
+
}
|
|
83
66
|
}
|
|
84
67
|
/**
|
|
85
68
|
* Lists all of the available OperationalInsights Rest API operations.
|