@azure/arm-operationalinsights 8.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/LICENSE +21 -0
- package/README.md +94 -0
- package/dist/index.js +5674 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/index.d.ts +6 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +13 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +1418 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +157 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +64 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +2023 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +40 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +351 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operationalInsightsManagementClient.d.ts +33 -0
- package/dist-esm/src/operationalInsightsManagementClient.d.ts.map +1 -0
- package/dist-esm/src/operationalInsightsManagementClient.js +40 -0
- package/dist-esm/src/operationalInsightsManagementClient.js.map +1 -0
- package/dist-esm/src/operationalInsightsManagementClientContext.d.ts +15 -0
- package/dist-esm/src/operationalInsightsManagementClientContext.d.ts.map +1 -0
- package/dist-esm/src/operationalInsightsManagementClientContext.js +48 -0
- package/dist-esm/src/operationalInsightsManagementClientContext.js.map +1 -0
- package/dist-esm/src/operations/availableServiceTiers.d.ts +20 -0
- package/dist-esm/src/operations/availableServiceTiers.d.ts.map +1 -0
- package/dist-esm/src/operations/availableServiceTiers.js +57 -0
- package/dist-esm/src/operations/availableServiceTiers.js.map +1 -0
- package/dist-esm/src/operations/clusters.d.ts +99 -0
- package/dist-esm/src/operations/clusters.d.ts.map +1 -0
- package/dist-esm/src/operations/clusters.js +450 -0
- package/dist-esm/src/operations/clusters.js.map +1 -0
- package/dist-esm/src/operations/dataExports.d.ts +55 -0
- package/dist-esm/src/operations/dataExports.d.ts.map +1 -0
- package/dist-esm/src/operations/dataExports.js +200 -0
- package/dist-esm/src/operations/dataExports.js.map +1 -0
- package/dist-esm/src/operations/dataSources.d.ts +66 -0
- package/dist-esm/src/operations/dataSources.d.ts.map +1 -0
- package/dist-esm/src/operations/dataSources.js +230 -0
- package/dist-esm/src/operations/dataSources.js.map +1 -0
- package/dist-esm/src/operations/deletedWorkspaces.d.ts +40 -0
- package/dist-esm/src/operations/deletedWorkspaces.d.ts.map +1 -0
- package/dist-esm/src/operations/deletedWorkspaces.js +161 -0
- package/dist-esm/src/operations/deletedWorkspaces.js.map +1 -0
- package/dist-esm/src/operations/gateways.d.ts +21 -0
- package/dist-esm/src/operations/gateways.d.ts.map +1 -0
- package/dist-esm/src/operations/gateways.js +47 -0
- package/dist-esm/src/operations/gateways.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +20 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +27 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/intelligencePacks.d.ts +37 -0
- package/dist-esm/src/operations/intelligencePacks.d.ts.map +1 -0
- package/dist-esm/src/operations/intelligencePacks.js +106 -0
- package/dist-esm/src/operations/intelligencePacks.js.map +1 -0
- package/dist-esm/src/operations/linkedServices.d.ts +73 -0
- package/dist-esm/src/operations/linkedServices.d.ts.map +1 -0
- package/dist-esm/src/operations/linkedServices.js +295 -0
- package/dist-esm/src/operations/linkedServices.js.map +1 -0
- package/dist-esm/src/operations/linkedStorageAccounts.d.ts +60 -0
- package/dist-esm/src/operations/linkedStorageAccounts.d.ts.map +1 -0
- package/dist-esm/src/operations/linkedStorageAccounts.js +186 -0
- package/dist-esm/src/operations/linkedStorageAccounts.js.map +1 -0
- package/dist-esm/src/operations/managementGroups.d.ts +30 -0
- package/dist-esm/src/operations/managementGroups.d.ts.map +1 -0
- package/dist-esm/src/operations/managementGroups.js +96 -0
- package/dist-esm/src/operations/managementGroups.js.map +1 -0
- package/dist-esm/src/operations/operationStatuses.d.ts +20 -0
- package/dist-esm/src/operations/operationStatuses.d.ts.map +1 -0
- package/dist-esm/src/operations/operationStatuses.js +50 -0
- package/dist-esm/src/operations/operationStatuses.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/savedSearches.d.ts +45 -0
- package/dist-esm/src/operations/savedSearches.d.ts.map +1 -0
- package/dist-esm/src/operations/savedSearches.js +135 -0
- package/dist-esm/src/operations/savedSearches.js.map +1 -0
- package/dist-esm/src/operations/schema.d.ts +20 -0
- package/dist-esm/src/operations/schema.d.ts.map +1 -0
- package/dist-esm/src/operations/schema.js +50 -0
- package/dist-esm/src/operations/schema.js.map +1 -0
- package/dist-esm/src/operations/sharedKeysOperations.d.ts +28 -0
- package/dist-esm/src/operations/sharedKeysOperations.d.ts.map +1 -0
- package/dist-esm/src/operations/sharedKeysOperations.js +78 -0
- package/dist-esm/src/operations/sharedKeysOperations.js.map +1 -0
- package/dist-esm/src/operations/storageInsightConfigs.d.ts +63 -0
- package/dist-esm/src/operations/storageInsightConfigs.d.ts.map +1 -0
- package/dist-esm/src/operations/storageInsightConfigs.js +225 -0
- package/dist-esm/src/operations/storageInsightConfigs.js.map +1 -0
- package/dist-esm/src/operations/usages.d.ts +30 -0
- package/dist-esm/src/operations/usages.d.ts.map +1 -0
- package/dist-esm/src/operations/usages.js +96 -0
- package/dist-esm/src/operations/usages.js.map +1 -0
- package/dist-esm/src/operations/workspacePurge.d.ts +36 -0
- package/dist-esm/src/operations/workspacePurge.d.ts.map +1 -0
- package/dist-esm/src/operations/workspacePurge.js +90 -0
- package/dist-esm/src/operations/workspacePurge.js.map +1 -0
- package/dist-esm/src/operations/workspaces.d.ts +90 -0
- package/dist-esm/src/operations/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operations/workspaces.js +384 -0
- package/dist-esm/src/operations/workspaces.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/availableServiceTiers.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/availableServiceTiers.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/availableServiceTiers.js +9 -0
- package/dist-esm/src/operationsInterfaces/availableServiceTiers.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/clusters.d.ts +63 -0
- package/dist-esm/src/operationsInterfaces/clusters.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/clusters.js +9 -0
- package/dist-esm/src/operationsInterfaces/clusters.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataExports.d.ts +38 -0
- package/dist-esm/src/operationsInterfaces/dataExports.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataExports.js +9 -0
- package/dist-esm/src/operationsInterfaces/dataExports.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataSources.d.ts +39 -0
- package/dist-esm/src/operationsInterfaces/dataSources.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/dataSources.js +9 -0
- package/dist-esm/src/operationsInterfaces/dataSources.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/deletedWorkspaces.d.ts +17 -0
- package/dist-esm/src/operationsInterfaces/deletedWorkspaces.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/deletedWorkspaces.js +9 -0
- package/dist-esm/src/operationsInterfaces/deletedWorkspaces.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/gateways.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/gateways.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/gateways.js +9 -0
- package/dist-esm/src/operationsInterfaces/gateways.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +20 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +27 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/intelligencePacks.d.ts +29 -0
- package/dist-esm/src/operationsInterfaces/intelligencePacks.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/intelligencePacks.js +9 -0
- package/dist-esm/src/operationsInterfaces/intelligencePacks.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkedServices.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/linkedServices.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkedServices.js +9 -0
- package/dist-esm/src/operationsInterfaces/linkedServices.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkedStorageAccounts.d.ts +42 -0
- package/dist-esm/src/operationsInterfaces/linkedStorageAccounts.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkedStorageAccounts.js +9 -0
- package/dist-esm/src/operationsInterfaces/linkedStorageAccounts.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/managementGroups.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/managementGroups.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/managementGroups.js +9 -0
- package/dist-esm/src/operationsInterfaces/managementGroups.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operationStatuses.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/operationStatuses.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operationStatuses.js +9 -0
- package/dist-esm/src/operationsInterfaces/operationStatuses.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/savedSearches.d.ts +37 -0
- package/dist-esm/src/operationsInterfaces/savedSearches.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/savedSearches.js +9 -0
- package/dist-esm/src/operationsInterfaces/savedSearches.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/schema.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/schema.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/schema.js +9 -0
- package/dist-esm/src/operationsInterfaces/schema.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/sharedKeysOperations.d.ts +20 -0
- package/dist-esm/src/operationsInterfaces/sharedKeysOperations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/sharedKeysOperations.js +9 -0
- package/dist-esm/src/operationsInterfaces/sharedKeysOperations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/storageInsightConfigs.d.ts +38 -0
- package/dist-esm/src/operationsInterfaces/storageInsightConfigs.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/storageInsightConfigs.js +9 -0
- package/dist-esm/src/operationsInterfaces/storageInsightConfigs.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/usages.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/usages.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/usages.js +9 -0
- package/dist-esm/src/operationsInterfaces/usages.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspacePurge.d.ts +28 -0
- package/dist-esm/src/operationsInterfaces/workspacePurge.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspacePurge.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspacePurge.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts +67 -0
- package/dist-esm/src/operationsInterfaces/workspaces.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js +9 -0
- package/dist-esm/src/operationsInterfaces/workspaces.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +92 -0
- package/review/arm-operationalinsights.api.md +1349 -0
- package/rollup.config.js +188 -0
- package/src/index.ts +13 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +1622 -0
- package/src/models/mappers.ts +2183 -0
- package/src/models/parameters.ts +406 -0
- package/src/operationalInsightsManagementClient.ts +108 -0
- package/src/operationalInsightsManagementClientContext.ts +68 -0
- package/src/operations/availableServiceTiers.ts +76 -0
- package/src/operations/clusters.ts +591 -0
- package/src/operations/dataExports.ts +272 -0
- package/src/operations/dataSources.ts +328 -0
- package/src/operations/deletedWorkspaces.ts +180 -0
- package/src/operations/gateways.ts +64 -0
- package/src/operations/index.ts +27 -0
- package/src/operations/intelligencePacks.ts +147 -0
- package/src/operations/linkedServices.ts +430 -0
- package/src/operations/linkedStorageAccounts.ts +259 -0
- package/src/operations/managementGroups.ts +120 -0
- package/src/operations/operationStatuses.ts +69 -0
- package/src/operations/operations.ts +137 -0
- package/src/operations/savedSearches.ts +191 -0
- package/src/operations/schema.ts +66 -0
- package/src/operations/sharedKeysOperations.ts +108 -0
- package/src/operations/storageInsightConfigs.ts +313 -0
- package/src/operations/usages.ts +120 -0
- package/src/operations/workspacePurge.ts +123 -0
- package/src/operations/workspaces.ts +502 -0
- package/src/operationsInterfaces/availableServiceTiers.ts +27 -0
- package/src/operationsInterfaces/clusters.ts +121 -0
- package/src/operationsInterfaces/dataExports.ts +75 -0
- package/src/operationsInterfaces/dataSources.ts +77 -0
- package/src/operationsInterfaces/deletedWorkspaces.ts +35 -0
- package/src/operationsInterfaces/gateways.ts +26 -0
- package/src/operationsInterfaces/index.ts +27 -0
- package/src/operationsInterfaces/intelligencePacks.ts +56 -0
- package/src/operationsInterfaces/linkedServices.ts +115 -0
- package/src/operationsInterfaces/linkedStorageAccounts.ts +80 -0
- package/src/operationsInterfaces/managementGroups.ts +26 -0
- package/src/operationsInterfaces/operationStatuses.ts +27 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/savedSearches.ts +74 -0
- package/src/operationsInterfaces/schema.ts +24 -0
- package/src/operationsInterfaces/sharedKeysOperations.ts +41 -0
- package/src/operationsInterfaces/storageInsightConfigs.ts +75 -0
- package/src/operationsInterfaces/usages.ts +26 -0
- package/src/operationsInterfaces/workspacePurge.ts +52 -0
- package/src/operationsInterfaces/workspaces.ts +125 -0
- package/tsconfig.json +19 -0
- package/types/arm-operationalinsights.d.ts +2190 -0
- package/types/tsdoc-metadata.json +11 -0
|
@@ -0,0 +1,591 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Clusters } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
Cluster,
|
|
19
|
+
ClustersListByResourceGroupNextOptionalParams,
|
|
20
|
+
ClustersListByResourceGroupOptionalParams,
|
|
21
|
+
ClustersListNextOptionalParams,
|
|
22
|
+
ClustersListOptionalParams,
|
|
23
|
+
ClustersListByResourceGroupResponse,
|
|
24
|
+
ClustersListResponse,
|
|
25
|
+
ClustersCreateOrUpdateOptionalParams,
|
|
26
|
+
ClustersCreateOrUpdateResponse,
|
|
27
|
+
ClustersDeleteOptionalParams,
|
|
28
|
+
ClustersGetOptionalParams,
|
|
29
|
+
ClustersGetResponse,
|
|
30
|
+
ClusterPatch,
|
|
31
|
+
ClustersUpdateOptionalParams,
|
|
32
|
+
ClustersUpdateResponse,
|
|
33
|
+
ClustersListByResourceGroupNextResponse,
|
|
34
|
+
ClustersListNextResponse
|
|
35
|
+
} from "../models";
|
|
36
|
+
|
|
37
|
+
/// <reference lib="esnext.asynciterable" />
|
|
38
|
+
/** Class containing Clusters operations. */
|
|
39
|
+
export class ClustersImpl implements Clusters {
|
|
40
|
+
private readonly client: OperationalInsightsManagementClientContext;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Initialize a new instance of the class Clusters class.
|
|
44
|
+
* @param client Reference to the service client
|
|
45
|
+
*/
|
|
46
|
+
constructor(client: OperationalInsightsManagementClientContext) {
|
|
47
|
+
this.client = client;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Gets Log Analytics clusters in a resource group.
|
|
52
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
53
|
+
* @param options The options parameters.
|
|
54
|
+
*/
|
|
55
|
+
public listByResourceGroup(
|
|
56
|
+
resourceGroupName: string,
|
|
57
|
+
options?: ClustersListByResourceGroupOptionalParams
|
|
58
|
+
): PagedAsyncIterableIterator<Cluster> {
|
|
59
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroupName, options);
|
|
60
|
+
return {
|
|
61
|
+
next() {
|
|
62
|
+
return iter.next();
|
|
63
|
+
},
|
|
64
|
+
[Symbol.asyncIterator]() {
|
|
65
|
+
return this;
|
|
66
|
+
},
|
|
67
|
+
byPage: () => {
|
|
68
|
+
return this.listByResourceGroupPagingPage(resourceGroupName, options);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private async *listByResourceGroupPagingPage(
|
|
74
|
+
resourceGroupName: string,
|
|
75
|
+
options?: ClustersListByResourceGroupOptionalParams
|
|
76
|
+
): AsyncIterableIterator<Cluster[]> {
|
|
77
|
+
let result = await this._listByResourceGroup(resourceGroupName, options);
|
|
78
|
+
yield result.value || [];
|
|
79
|
+
let continuationToken = result.nextLink;
|
|
80
|
+
while (continuationToken) {
|
|
81
|
+
result = await this._listByResourceGroupNext(
|
|
82
|
+
resourceGroupName,
|
|
83
|
+
continuationToken,
|
|
84
|
+
options
|
|
85
|
+
);
|
|
86
|
+
continuationToken = result.nextLink;
|
|
87
|
+
yield result.value || [];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private async *listByResourceGroupPagingAll(
|
|
92
|
+
resourceGroupName: string,
|
|
93
|
+
options?: ClustersListByResourceGroupOptionalParams
|
|
94
|
+
): AsyncIterableIterator<Cluster> {
|
|
95
|
+
for await (const page of this.listByResourceGroupPagingPage(
|
|
96
|
+
resourceGroupName,
|
|
97
|
+
options
|
|
98
|
+
)) {
|
|
99
|
+
yield* page;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Gets the Log Analytics clusters in a subscription.
|
|
105
|
+
* @param options The options parameters.
|
|
106
|
+
*/
|
|
107
|
+
public list(
|
|
108
|
+
options?: ClustersListOptionalParams
|
|
109
|
+
): PagedAsyncIterableIterator<Cluster> {
|
|
110
|
+
const iter = this.listPagingAll(options);
|
|
111
|
+
return {
|
|
112
|
+
next() {
|
|
113
|
+
return iter.next();
|
|
114
|
+
},
|
|
115
|
+
[Symbol.asyncIterator]() {
|
|
116
|
+
return this;
|
|
117
|
+
},
|
|
118
|
+
byPage: () => {
|
|
119
|
+
return this.listPagingPage(options);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
private async *listPagingPage(
|
|
125
|
+
options?: ClustersListOptionalParams
|
|
126
|
+
): AsyncIterableIterator<Cluster[]> {
|
|
127
|
+
let result = await this._list(options);
|
|
128
|
+
yield result.value || [];
|
|
129
|
+
let continuationToken = result.nextLink;
|
|
130
|
+
while (continuationToken) {
|
|
131
|
+
result = await this._listNext(continuationToken, options);
|
|
132
|
+
continuationToken = result.nextLink;
|
|
133
|
+
yield result.value || [];
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
private async *listPagingAll(
|
|
138
|
+
options?: ClustersListOptionalParams
|
|
139
|
+
): AsyncIterableIterator<Cluster> {
|
|
140
|
+
for await (const page of this.listPagingPage(options)) {
|
|
141
|
+
yield* page;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Gets Log Analytics clusters in a resource group.
|
|
147
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
148
|
+
* @param options The options parameters.
|
|
149
|
+
*/
|
|
150
|
+
private _listByResourceGroup(
|
|
151
|
+
resourceGroupName: string,
|
|
152
|
+
options?: ClustersListByResourceGroupOptionalParams
|
|
153
|
+
): Promise<ClustersListByResourceGroupResponse> {
|
|
154
|
+
return this.client.sendOperationRequest(
|
|
155
|
+
{ resourceGroupName, options },
|
|
156
|
+
listByResourceGroupOperationSpec
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Gets the Log Analytics clusters in a subscription.
|
|
162
|
+
* @param options The options parameters.
|
|
163
|
+
*/
|
|
164
|
+
private _list(
|
|
165
|
+
options?: ClustersListOptionalParams
|
|
166
|
+
): Promise<ClustersListResponse> {
|
|
167
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Create or update a Log Analytics cluster.
|
|
172
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
173
|
+
* @param clusterName The name of the Log Analytics cluster.
|
|
174
|
+
* @param parameters The parameters required to create or update a Log Analytics cluster.
|
|
175
|
+
* @param options The options parameters.
|
|
176
|
+
*/
|
|
177
|
+
async beginCreateOrUpdate(
|
|
178
|
+
resourceGroupName: string,
|
|
179
|
+
clusterName: string,
|
|
180
|
+
parameters: Cluster,
|
|
181
|
+
options?: ClustersCreateOrUpdateOptionalParams
|
|
182
|
+
): Promise<
|
|
183
|
+
PollerLike<
|
|
184
|
+
PollOperationState<ClustersCreateOrUpdateResponse>,
|
|
185
|
+
ClustersCreateOrUpdateResponse
|
|
186
|
+
>
|
|
187
|
+
> {
|
|
188
|
+
const directSendOperation = async (
|
|
189
|
+
args: coreClient.OperationArguments,
|
|
190
|
+
spec: coreClient.OperationSpec
|
|
191
|
+
): Promise<ClustersCreateOrUpdateResponse> => {
|
|
192
|
+
return this.client.sendOperationRequest(args, spec);
|
|
193
|
+
};
|
|
194
|
+
const sendOperation = async (
|
|
195
|
+
args: coreClient.OperationArguments,
|
|
196
|
+
spec: coreClient.OperationSpec
|
|
197
|
+
) => {
|
|
198
|
+
let currentRawResponse:
|
|
199
|
+
| coreClient.FullOperationResponse
|
|
200
|
+
| undefined = undefined;
|
|
201
|
+
const providedCallback = args.options?.onResponse;
|
|
202
|
+
const callback: coreClient.RawResponseCallback = (
|
|
203
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
204
|
+
flatResponse: unknown
|
|
205
|
+
) => {
|
|
206
|
+
currentRawResponse = rawResponse;
|
|
207
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
208
|
+
};
|
|
209
|
+
const updatedArgs = {
|
|
210
|
+
...args,
|
|
211
|
+
options: {
|
|
212
|
+
...args.options,
|
|
213
|
+
onResponse: callback
|
|
214
|
+
}
|
|
215
|
+
};
|
|
216
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
217
|
+
return {
|
|
218
|
+
flatResponse,
|
|
219
|
+
rawResponse: {
|
|
220
|
+
statusCode: currentRawResponse!.status,
|
|
221
|
+
body: currentRawResponse!.parsedBody,
|
|
222
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
const lro = new LroImpl(
|
|
228
|
+
sendOperation,
|
|
229
|
+
{ resourceGroupName, clusterName, parameters, options },
|
|
230
|
+
createOrUpdateOperationSpec
|
|
231
|
+
);
|
|
232
|
+
return new LroEngine(lro, {
|
|
233
|
+
resumeFrom: options?.resumeFrom,
|
|
234
|
+
intervalInMs: options?.updateIntervalInMs
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Create or update a Log Analytics cluster.
|
|
240
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
241
|
+
* @param clusterName The name of the Log Analytics cluster.
|
|
242
|
+
* @param parameters The parameters required to create or update a Log Analytics cluster.
|
|
243
|
+
* @param options The options parameters.
|
|
244
|
+
*/
|
|
245
|
+
async beginCreateOrUpdateAndWait(
|
|
246
|
+
resourceGroupName: string,
|
|
247
|
+
clusterName: string,
|
|
248
|
+
parameters: Cluster,
|
|
249
|
+
options?: ClustersCreateOrUpdateOptionalParams
|
|
250
|
+
): Promise<ClustersCreateOrUpdateResponse> {
|
|
251
|
+
const poller = await this.beginCreateOrUpdate(
|
|
252
|
+
resourceGroupName,
|
|
253
|
+
clusterName,
|
|
254
|
+
parameters,
|
|
255
|
+
options
|
|
256
|
+
);
|
|
257
|
+
return poller.pollUntilDone();
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Deletes a cluster instance.
|
|
262
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
263
|
+
* @param clusterName Name of the Log Analytics Cluster.
|
|
264
|
+
* @param options The options parameters.
|
|
265
|
+
*/
|
|
266
|
+
async beginDelete(
|
|
267
|
+
resourceGroupName: string,
|
|
268
|
+
clusterName: string,
|
|
269
|
+
options?: ClustersDeleteOptionalParams
|
|
270
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
271
|
+
const directSendOperation = async (
|
|
272
|
+
args: coreClient.OperationArguments,
|
|
273
|
+
spec: coreClient.OperationSpec
|
|
274
|
+
): Promise<void> => {
|
|
275
|
+
return this.client.sendOperationRequest(args, spec);
|
|
276
|
+
};
|
|
277
|
+
const sendOperation = async (
|
|
278
|
+
args: coreClient.OperationArguments,
|
|
279
|
+
spec: coreClient.OperationSpec
|
|
280
|
+
) => {
|
|
281
|
+
let currentRawResponse:
|
|
282
|
+
| coreClient.FullOperationResponse
|
|
283
|
+
| undefined = undefined;
|
|
284
|
+
const providedCallback = args.options?.onResponse;
|
|
285
|
+
const callback: coreClient.RawResponseCallback = (
|
|
286
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
287
|
+
flatResponse: unknown
|
|
288
|
+
) => {
|
|
289
|
+
currentRawResponse = rawResponse;
|
|
290
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
291
|
+
};
|
|
292
|
+
const updatedArgs = {
|
|
293
|
+
...args,
|
|
294
|
+
options: {
|
|
295
|
+
...args.options,
|
|
296
|
+
onResponse: callback
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
300
|
+
return {
|
|
301
|
+
flatResponse,
|
|
302
|
+
rawResponse: {
|
|
303
|
+
statusCode: currentRawResponse!.status,
|
|
304
|
+
body: currentRawResponse!.parsedBody,
|
|
305
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
const lro = new LroImpl(
|
|
311
|
+
sendOperation,
|
|
312
|
+
{ resourceGroupName, clusterName, options },
|
|
313
|
+
deleteOperationSpec
|
|
314
|
+
);
|
|
315
|
+
return new LroEngine(lro, {
|
|
316
|
+
resumeFrom: options?.resumeFrom,
|
|
317
|
+
intervalInMs: options?.updateIntervalInMs
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Deletes a cluster instance.
|
|
323
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
324
|
+
* @param clusterName Name of the Log Analytics Cluster.
|
|
325
|
+
* @param options The options parameters.
|
|
326
|
+
*/
|
|
327
|
+
async beginDeleteAndWait(
|
|
328
|
+
resourceGroupName: string,
|
|
329
|
+
clusterName: string,
|
|
330
|
+
options?: ClustersDeleteOptionalParams
|
|
331
|
+
): Promise<void> {
|
|
332
|
+
const poller = await this.beginDelete(
|
|
333
|
+
resourceGroupName,
|
|
334
|
+
clusterName,
|
|
335
|
+
options
|
|
336
|
+
);
|
|
337
|
+
return poller.pollUntilDone();
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Gets a Log Analytics cluster instance.
|
|
342
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
343
|
+
* @param clusterName Name of the Log Analytics Cluster.
|
|
344
|
+
* @param options The options parameters.
|
|
345
|
+
*/
|
|
346
|
+
get(
|
|
347
|
+
resourceGroupName: string,
|
|
348
|
+
clusterName: string,
|
|
349
|
+
options?: ClustersGetOptionalParams
|
|
350
|
+
): Promise<ClustersGetResponse> {
|
|
351
|
+
return this.client.sendOperationRequest(
|
|
352
|
+
{ resourceGroupName, clusterName, options },
|
|
353
|
+
getOperationSpec
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
/**
|
|
358
|
+
* Updates a Log Analytics cluster.
|
|
359
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
360
|
+
* @param clusterName Name of the Log Analytics Cluster.
|
|
361
|
+
* @param parameters The parameters required to patch a Log Analytics cluster.
|
|
362
|
+
* @param options The options parameters.
|
|
363
|
+
*/
|
|
364
|
+
update(
|
|
365
|
+
resourceGroupName: string,
|
|
366
|
+
clusterName: string,
|
|
367
|
+
parameters: ClusterPatch,
|
|
368
|
+
options?: ClustersUpdateOptionalParams
|
|
369
|
+
): Promise<ClustersUpdateResponse> {
|
|
370
|
+
return this.client.sendOperationRequest(
|
|
371
|
+
{ resourceGroupName, clusterName, parameters, options },
|
|
372
|
+
updateOperationSpec
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* ListByResourceGroupNext
|
|
378
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
379
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
380
|
+
* @param options The options parameters.
|
|
381
|
+
*/
|
|
382
|
+
private _listByResourceGroupNext(
|
|
383
|
+
resourceGroupName: string,
|
|
384
|
+
nextLink: string,
|
|
385
|
+
options?: ClustersListByResourceGroupNextOptionalParams
|
|
386
|
+
): Promise<ClustersListByResourceGroupNextResponse> {
|
|
387
|
+
return this.client.sendOperationRequest(
|
|
388
|
+
{ resourceGroupName, nextLink, options },
|
|
389
|
+
listByResourceGroupNextOperationSpec
|
|
390
|
+
);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* ListNext
|
|
395
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
396
|
+
* @param options The options parameters.
|
|
397
|
+
*/
|
|
398
|
+
private _listNext(
|
|
399
|
+
nextLink: string,
|
|
400
|
+
options?: ClustersListNextOptionalParams
|
|
401
|
+
): Promise<ClustersListNextResponse> {
|
|
402
|
+
return this.client.sendOperationRequest(
|
|
403
|
+
{ nextLink, options },
|
|
404
|
+
listNextOperationSpec
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
// Operation Specifications
|
|
409
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
410
|
+
|
|
411
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
412
|
+
path:
|
|
413
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters",
|
|
414
|
+
httpMethod: "GET",
|
|
415
|
+
responses: {
|
|
416
|
+
200: {
|
|
417
|
+
bodyMapper: Mappers.ClusterListResult
|
|
418
|
+
},
|
|
419
|
+
default: {
|
|
420
|
+
bodyMapper: Mappers.ErrorResponse
|
|
421
|
+
}
|
|
422
|
+
},
|
|
423
|
+
queryParameters: [Parameters.apiVersion2],
|
|
424
|
+
urlParameters: [
|
|
425
|
+
Parameters.$host,
|
|
426
|
+
Parameters.subscriptionId,
|
|
427
|
+
Parameters.resourceGroupName
|
|
428
|
+
],
|
|
429
|
+
headerParameters: [Parameters.accept],
|
|
430
|
+
serializer
|
|
431
|
+
};
|
|
432
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
433
|
+
path:
|
|
434
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters",
|
|
435
|
+
httpMethod: "GET",
|
|
436
|
+
responses: {
|
|
437
|
+
200: {
|
|
438
|
+
bodyMapper: Mappers.ClusterListResult
|
|
439
|
+
},
|
|
440
|
+
default: {
|
|
441
|
+
bodyMapper: Mappers.ErrorResponse
|
|
442
|
+
}
|
|
443
|
+
},
|
|
444
|
+
queryParameters: [Parameters.apiVersion2],
|
|
445
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
446
|
+
headerParameters: [Parameters.accept],
|
|
447
|
+
serializer
|
|
448
|
+
};
|
|
449
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
450
|
+
path:
|
|
451
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}",
|
|
452
|
+
httpMethod: "PUT",
|
|
453
|
+
responses: {
|
|
454
|
+
200: {
|
|
455
|
+
bodyMapper: Mappers.Cluster
|
|
456
|
+
},
|
|
457
|
+
201: {
|
|
458
|
+
bodyMapper: Mappers.Cluster
|
|
459
|
+
},
|
|
460
|
+
202: {
|
|
461
|
+
bodyMapper: Mappers.Cluster
|
|
462
|
+
},
|
|
463
|
+
204: {
|
|
464
|
+
bodyMapper: Mappers.Cluster
|
|
465
|
+
},
|
|
466
|
+
default: {
|
|
467
|
+
bodyMapper: Mappers.ErrorResponse
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
requestBody: Parameters.parameters6,
|
|
471
|
+
queryParameters: [Parameters.apiVersion2],
|
|
472
|
+
urlParameters: [
|
|
473
|
+
Parameters.$host,
|
|
474
|
+
Parameters.subscriptionId,
|
|
475
|
+
Parameters.resourceGroupName,
|
|
476
|
+
Parameters.clusterName
|
|
477
|
+
],
|
|
478
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
479
|
+
mediaType: "json",
|
|
480
|
+
serializer
|
|
481
|
+
};
|
|
482
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
483
|
+
path:
|
|
484
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}",
|
|
485
|
+
httpMethod: "DELETE",
|
|
486
|
+
responses: {
|
|
487
|
+
200: {},
|
|
488
|
+
201: {},
|
|
489
|
+
202: {},
|
|
490
|
+
204: {},
|
|
491
|
+
default: {
|
|
492
|
+
bodyMapper: Mappers.ErrorResponse
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
queryParameters: [Parameters.apiVersion2],
|
|
496
|
+
urlParameters: [
|
|
497
|
+
Parameters.$host,
|
|
498
|
+
Parameters.subscriptionId,
|
|
499
|
+
Parameters.resourceGroupName,
|
|
500
|
+
Parameters.clusterName1
|
|
501
|
+
],
|
|
502
|
+
headerParameters: [Parameters.accept],
|
|
503
|
+
serializer
|
|
504
|
+
};
|
|
505
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
506
|
+
path:
|
|
507
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}",
|
|
508
|
+
httpMethod: "GET",
|
|
509
|
+
responses: {
|
|
510
|
+
200: {
|
|
511
|
+
bodyMapper: Mappers.Cluster
|
|
512
|
+
},
|
|
513
|
+
default: {
|
|
514
|
+
bodyMapper: Mappers.ErrorResponse
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
queryParameters: [Parameters.apiVersion2],
|
|
518
|
+
urlParameters: [
|
|
519
|
+
Parameters.$host,
|
|
520
|
+
Parameters.subscriptionId,
|
|
521
|
+
Parameters.resourceGroupName,
|
|
522
|
+
Parameters.clusterName1
|
|
523
|
+
],
|
|
524
|
+
headerParameters: [Parameters.accept],
|
|
525
|
+
serializer
|
|
526
|
+
};
|
|
527
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
528
|
+
path:
|
|
529
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}",
|
|
530
|
+
httpMethod: "PATCH",
|
|
531
|
+
responses: {
|
|
532
|
+
200: {
|
|
533
|
+
bodyMapper: Mappers.Cluster
|
|
534
|
+
},
|
|
535
|
+
default: {
|
|
536
|
+
bodyMapper: Mappers.ErrorResponse
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
requestBody: Parameters.parameters7,
|
|
540
|
+
queryParameters: [Parameters.apiVersion2],
|
|
541
|
+
urlParameters: [
|
|
542
|
+
Parameters.$host,
|
|
543
|
+
Parameters.subscriptionId,
|
|
544
|
+
Parameters.resourceGroupName,
|
|
545
|
+
Parameters.clusterName1
|
|
546
|
+
],
|
|
547
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
548
|
+
mediaType: "json",
|
|
549
|
+
serializer
|
|
550
|
+
};
|
|
551
|
+
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
552
|
+
path: "{nextLink}",
|
|
553
|
+
httpMethod: "GET",
|
|
554
|
+
responses: {
|
|
555
|
+
200: {
|
|
556
|
+
bodyMapper: Mappers.ClusterListResult
|
|
557
|
+
},
|
|
558
|
+
default: {
|
|
559
|
+
bodyMapper: Mappers.ErrorResponse
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
queryParameters: [Parameters.apiVersion2],
|
|
563
|
+
urlParameters: [
|
|
564
|
+
Parameters.$host,
|
|
565
|
+
Parameters.subscriptionId,
|
|
566
|
+
Parameters.resourceGroupName,
|
|
567
|
+
Parameters.nextLink
|
|
568
|
+
],
|
|
569
|
+
headerParameters: [Parameters.accept],
|
|
570
|
+
serializer
|
|
571
|
+
};
|
|
572
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
573
|
+
path: "{nextLink}",
|
|
574
|
+
httpMethod: "GET",
|
|
575
|
+
responses: {
|
|
576
|
+
200: {
|
|
577
|
+
bodyMapper: Mappers.ClusterListResult
|
|
578
|
+
},
|
|
579
|
+
default: {
|
|
580
|
+
bodyMapper: Mappers.ErrorResponse
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
queryParameters: [Parameters.apiVersion2],
|
|
584
|
+
urlParameters: [
|
|
585
|
+
Parameters.$host,
|
|
586
|
+
Parameters.subscriptionId,
|
|
587
|
+
Parameters.nextLink
|
|
588
|
+
],
|
|
589
|
+
headerParameters: [Parameters.accept],
|
|
590
|
+
serializer
|
|
591
|
+
};
|