@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,430 @@
|
|
|
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 { LinkedServices } 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
|
+
LinkedService,
|
|
19
|
+
LinkedServicesListByWorkspaceOptionalParams,
|
|
20
|
+
LinkedServicesCreateOrUpdateOptionalParams,
|
|
21
|
+
LinkedServicesCreateOrUpdateResponse,
|
|
22
|
+
LinkedServicesDeleteOptionalParams,
|
|
23
|
+
LinkedServicesDeleteResponse,
|
|
24
|
+
LinkedServicesGetOptionalParams,
|
|
25
|
+
LinkedServicesGetResponse,
|
|
26
|
+
LinkedServicesListByWorkspaceResponse
|
|
27
|
+
} from "../models";
|
|
28
|
+
|
|
29
|
+
/// <reference lib="esnext.asynciterable" />
|
|
30
|
+
/** Class containing LinkedServices operations. */
|
|
31
|
+
export class LinkedServicesImpl implements LinkedServices {
|
|
32
|
+
private readonly client: OperationalInsightsManagementClientContext;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Initialize a new instance of the class LinkedServices class.
|
|
36
|
+
* @param client Reference to the service client
|
|
37
|
+
*/
|
|
38
|
+
constructor(client: OperationalInsightsManagementClientContext) {
|
|
39
|
+
this.client = client;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Gets the linked services instances in a workspace.
|
|
44
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
45
|
+
* @param workspaceName The name of the workspace.
|
|
46
|
+
* @param options The options parameters.
|
|
47
|
+
*/
|
|
48
|
+
public listByWorkspace(
|
|
49
|
+
resourceGroupName: string,
|
|
50
|
+
workspaceName: string,
|
|
51
|
+
options?: LinkedServicesListByWorkspaceOptionalParams
|
|
52
|
+
): PagedAsyncIterableIterator<LinkedService> {
|
|
53
|
+
const iter = this.listByWorkspacePagingAll(
|
|
54
|
+
resourceGroupName,
|
|
55
|
+
workspaceName,
|
|
56
|
+
options
|
|
57
|
+
);
|
|
58
|
+
return {
|
|
59
|
+
next() {
|
|
60
|
+
return iter.next();
|
|
61
|
+
},
|
|
62
|
+
[Symbol.asyncIterator]() {
|
|
63
|
+
return this;
|
|
64
|
+
},
|
|
65
|
+
byPage: () => {
|
|
66
|
+
return this.listByWorkspacePagingPage(
|
|
67
|
+
resourceGroupName,
|
|
68
|
+
workspaceName,
|
|
69
|
+
options
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
private async *listByWorkspacePagingPage(
|
|
76
|
+
resourceGroupName: string,
|
|
77
|
+
workspaceName: string,
|
|
78
|
+
options?: LinkedServicesListByWorkspaceOptionalParams
|
|
79
|
+
): AsyncIterableIterator<LinkedService[]> {
|
|
80
|
+
let result = await this._listByWorkspace(
|
|
81
|
+
resourceGroupName,
|
|
82
|
+
workspaceName,
|
|
83
|
+
options
|
|
84
|
+
);
|
|
85
|
+
yield result.value || [];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
private async *listByWorkspacePagingAll(
|
|
89
|
+
resourceGroupName: string,
|
|
90
|
+
workspaceName: string,
|
|
91
|
+
options?: LinkedServicesListByWorkspaceOptionalParams
|
|
92
|
+
): AsyncIterableIterator<LinkedService> {
|
|
93
|
+
for await (const page of this.listByWorkspacePagingPage(
|
|
94
|
+
resourceGroupName,
|
|
95
|
+
workspaceName,
|
|
96
|
+
options
|
|
97
|
+
)) {
|
|
98
|
+
yield* page;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Create or update a linked service.
|
|
104
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
105
|
+
* @param workspaceName The name of the workspace.
|
|
106
|
+
* @param linkedServiceName Name of the linkedServices resource
|
|
107
|
+
* @param parameters The parameters required to create or update a linked service.
|
|
108
|
+
* @param options The options parameters.
|
|
109
|
+
*/
|
|
110
|
+
async beginCreateOrUpdate(
|
|
111
|
+
resourceGroupName: string,
|
|
112
|
+
workspaceName: string,
|
|
113
|
+
linkedServiceName: string,
|
|
114
|
+
parameters: LinkedService,
|
|
115
|
+
options?: LinkedServicesCreateOrUpdateOptionalParams
|
|
116
|
+
): Promise<
|
|
117
|
+
PollerLike<
|
|
118
|
+
PollOperationState<LinkedServicesCreateOrUpdateResponse>,
|
|
119
|
+
LinkedServicesCreateOrUpdateResponse
|
|
120
|
+
>
|
|
121
|
+
> {
|
|
122
|
+
const directSendOperation = async (
|
|
123
|
+
args: coreClient.OperationArguments,
|
|
124
|
+
spec: coreClient.OperationSpec
|
|
125
|
+
): Promise<LinkedServicesCreateOrUpdateResponse> => {
|
|
126
|
+
return this.client.sendOperationRequest(args, spec);
|
|
127
|
+
};
|
|
128
|
+
const sendOperation = async (
|
|
129
|
+
args: coreClient.OperationArguments,
|
|
130
|
+
spec: coreClient.OperationSpec
|
|
131
|
+
) => {
|
|
132
|
+
let currentRawResponse:
|
|
133
|
+
| coreClient.FullOperationResponse
|
|
134
|
+
| undefined = undefined;
|
|
135
|
+
const providedCallback = args.options?.onResponse;
|
|
136
|
+
const callback: coreClient.RawResponseCallback = (
|
|
137
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
138
|
+
flatResponse: unknown
|
|
139
|
+
) => {
|
|
140
|
+
currentRawResponse = rawResponse;
|
|
141
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
142
|
+
};
|
|
143
|
+
const updatedArgs = {
|
|
144
|
+
...args,
|
|
145
|
+
options: {
|
|
146
|
+
...args.options,
|
|
147
|
+
onResponse: callback
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
151
|
+
return {
|
|
152
|
+
flatResponse,
|
|
153
|
+
rawResponse: {
|
|
154
|
+
statusCode: currentRawResponse!.status,
|
|
155
|
+
body: currentRawResponse!.parsedBody,
|
|
156
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
const lro = new LroImpl(
|
|
162
|
+
sendOperation,
|
|
163
|
+
{
|
|
164
|
+
resourceGroupName,
|
|
165
|
+
workspaceName,
|
|
166
|
+
linkedServiceName,
|
|
167
|
+
parameters,
|
|
168
|
+
options
|
|
169
|
+
},
|
|
170
|
+
createOrUpdateOperationSpec
|
|
171
|
+
);
|
|
172
|
+
return new LroEngine(lro, {
|
|
173
|
+
resumeFrom: options?.resumeFrom,
|
|
174
|
+
intervalInMs: options?.updateIntervalInMs
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Create or update a linked service.
|
|
180
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
181
|
+
* @param workspaceName The name of the workspace.
|
|
182
|
+
* @param linkedServiceName Name of the linkedServices resource
|
|
183
|
+
* @param parameters The parameters required to create or update a linked service.
|
|
184
|
+
* @param options The options parameters.
|
|
185
|
+
*/
|
|
186
|
+
async beginCreateOrUpdateAndWait(
|
|
187
|
+
resourceGroupName: string,
|
|
188
|
+
workspaceName: string,
|
|
189
|
+
linkedServiceName: string,
|
|
190
|
+
parameters: LinkedService,
|
|
191
|
+
options?: LinkedServicesCreateOrUpdateOptionalParams
|
|
192
|
+
): Promise<LinkedServicesCreateOrUpdateResponse> {
|
|
193
|
+
const poller = await this.beginCreateOrUpdate(
|
|
194
|
+
resourceGroupName,
|
|
195
|
+
workspaceName,
|
|
196
|
+
linkedServiceName,
|
|
197
|
+
parameters,
|
|
198
|
+
options
|
|
199
|
+
);
|
|
200
|
+
return poller.pollUntilDone();
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Deletes a linked service instance.
|
|
205
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
206
|
+
* @param workspaceName The name of the workspace.
|
|
207
|
+
* @param linkedServiceName Name of the linked service.
|
|
208
|
+
* @param options The options parameters.
|
|
209
|
+
*/
|
|
210
|
+
async beginDelete(
|
|
211
|
+
resourceGroupName: string,
|
|
212
|
+
workspaceName: string,
|
|
213
|
+
linkedServiceName: string,
|
|
214
|
+
options?: LinkedServicesDeleteOptionalParams
|
|
215
|
+
): Promise<
|
|
216
|
+
PollerLike<
|
|
217
|
+
PollOperationState<LinkedServicesDeleteResponse>,
|
|
218
|
+
LinkedServicesDeleteResponse
|
|
219
|
+
>
|
|
220
|
+
> {
|
|
221
|
+
const directSendOperation = async (
|
|
222
|
+
args: coreClient.OperationArguments,
|
|
223
|
+
spec: coreClient.OperationSpec
|
|
224
|
+
): Promise<LinkedServicesDeleteResponse> => {
|
|
225
|
+
return this.client.sendOperationRequest(args, spec);
|
|
226
|
+
};
|
|
227
|
+
const sendOperation = async (
|
|
228
|
+
args: coreClient.OperationArguments,
|
|
229
|
+
spec: coreClient.OperationSpec
|
|
230
|
+
) => {
|
|
231
|
+
let currentRawResponse:
|
|
232
|
+
| coreClient.FullOperationResponse
|
|
233
|
+
| undefined = undefined;
|
|
234
|
+
const providedCallback = args.options?.onResponse;
|
|
235
|
+
const callback: coreClient.RawResponseCallback = (
|
|
236
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
237
|
+
flatResponse: unknown
|
|
238
|
+
) => {
|
|
239
|
+
currentRawResponse = rawResponse;
|
|
240
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
241
|
+
};
|
|
242
|
+
const updatedArgs = {
|
|
243
|
+
...args,
|
|
244
|
+
options: {
|
|
245
|
+
...args.options,
|
|
246
|
+
onResponse: callback
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
250
|
+
return {
|
|
251
|
+
flatResponse,
|
|
252
|
+
rawResponse: {
|
|
253
|
+
statusCode: currentRawResponse!.status,
|
|
254
|
+
body: currentRawResponse!.parsedBody,
|
|
255
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
const lro = new LroImpl(
|
|
261
|
+
sendOperation,
|
|
262
|
+
{ resourceGroupName, workspaceName, linkedServiceName, options },
|
|
263
|
+
deleteOperationSpec
|
|
264
|
+
);
|
|
265
|
+
return new LroEngine(lro, {
|
|
266
|
+
resumeFrom: options?.resumeFrom,
|
|
267
|
+
intervalInMs: options?.updateIntervalInMs
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* Deletes a linked service instance.
|
|
273
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
274
|
+
* @param workspaceName The name of the workspace.
|
|
275
|
+
* @param linkedServiceName Name of the linked service.
|
|
276
|
+
* @param options The options parameters.
|
|
277
|
+
*/
|
|
278
|
+
async beginDeleteAndWait(
|
|
279
|
+
resourceGroupName: string,
|
|
280
|
+
workspaceName: string,
|
|
281
|
+
linkedServiceName: string,
|
|
282
|
+
options?: LinkedServicesDeleteOptionalParams
|
|
283
|
+
): Promise<LinkedServicesDeleteResponse> {
|
|
284
|
+
const poller = await this.beginDelete(
|
|
285
|
+
resourceGroupName,
|
|
286
|
+
workspaceName,
|
|
287
|
+
linkedServiceName,
|
|
288
|
+
options
|
|
289
|
+
);
|
|
290
|
+
return poller.pollUntilDone();
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
* Gets a linked service instance.
|
|
295
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
296
|
+
* @param workspaceName The name of the workspace.
|
|
297
|
+
* @param linkedServiceName Name of the linked service.
|
|
298
|
+
* @param options The options parameters.
|
|
299
|
+
*/
|
|
300
|
+
get(
|
|
301
|
+
resourceGroupName: string,
|
|
302
|
+
workspaceName: string,
|
|
303
|
+
linkedServiceName: string,
|
|
304
|
+
options?: LinkedServicesGetOptionalParams
|
|
305
|
+
): Promise<LinkedServicesGetResponse> {
|
|
306
|
+
return this.client.sendOperationRequest(
|
|
307
|
+
{ resourceGroupName, workspaceName, linkedServiceName, options },
|
|
308
|
+
getOperationSpec
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* Gets the linked services instances in a workspace.
|
|
314
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
315
|
+
* @param workspaceName The name of the workspace.
|
|
316
|
+
* @param options The options parameters.
|
|
317
|
+
*/
|
|
318
|
+
private _listByWorkspace(
|
|
319
|
+
resourceGroupName: string,
|
|
320
|
+
workspaceName: string,
|
|
321
|
+
options?: LinkedServicesListByWorkspaceOptionalParams
|
|
322
|
+
): Promise<LinkedServicesListByWorkspaceResponse> {
|
|
323
|
+
return this.client.sendOperationRequest(
|
|
324
|
+
{ resourceGroupName, workspaceName, options },
|
|
325
|
+
listByWorkspaceOperationSpec
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
// Operation Specifications
|
|
330
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
331
|
+
|
|
332
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
333
|
+
path:
|
|
334
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}",
|
|
335
|
+
httpMethod: "PUT",
|
|
336
|
+
responses: {
|
|
337
|
+
200: {
|
|
338
|
+
bodyMapper: Mappers.LinkedService
|
|
339
|
+
},
|
|
340
|
+
201: {
|
|
341
|
+
bodyMapper: Mappers.LinkedService
|
|
342
|
+
},
|
|
343
|
+
202: {
|
|
344
|
+
bodyMapper: Mappers.LinkedService
|
|
345
|
+
},
|
|
346
|
+
204: {
|
|
347
|
+
bodyMapper: Mappers.LinkedService
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
requestBody: Parameters.parameters2,
|
|
351
|
+
queryParameters: [Parameters.apiVersion],
|
|
352
|
+
urlParameters: [
|
|
353
|
+
Parameters.$host,
|
|
354
|
+
Parameters.subscriptionId,
|
|
355
|
+
Parameters.resourceGroupName,
|
|
356
|
+
Parameters.workspaceName,
|
|
357
|
+
Parameters.linkedServiceName
|
|
358
|
+
],
|
|
359
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
360
|
+
mediaType: "json",
|
|
361
|
+
serializer
|
|
362
|
+
};
|
|
363
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
364
|
+
path:
|
|
365
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}",
|
|
366
|
+
httpMethod: "DELETE",
|
|
367
|
+
responses: {
|
|
368
|
+
200: {
|
|
369
|
+
bodyMapper: Mappers.LinkedService
|
|
370
|
+
},
|
|
371
|
+
201: {
|
|
372
|
+
bodyMapper: Mappers.LinkedService
|
|
373
|
+
},
|
|
374
|
+
202: {
|
|
375
|
+
bodyMapper: Mappers.LinkedService
|
|
376
|
+
},
|
|
377
|
+
204: {
|
|
378
|
+
bodyMapper: Mappers.LinkedService
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
queryParameters: [Parameters.apiVersion],
|
|
382
|
+
urlParameters: [
|
|
383
|
+
Parameters.$host,
|
|
384
|
+
Parameters.subscriptionId,
|
|
385
|
+
Parameters.resourceGroupName,
|
|
386
|
+
Parameters.workspaceName,
|
|
387
|
+
Parameters.linkedServiceName
|
|
388
|
+
],
|
|
389
|
+
headerParameters: [Parameters.accept],
|
|
390
|
+
serializer
|
|
391
|
+
};
|
|
392
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
393
|
+
path:
|
|
394
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}",
|
|
395
|
+
httpMethod: "GET",
|
|
396
|
+
responses: {
|
|
397
|
+
200: {
|
|
398
|
+
bodyMapper: Mappers.LinkedService
|
|
399
|
+
}
|
|
400
|
+
},
|
|
401
|
+
queryParameters: [Parameters.apiVersion],
|
|
402
|
+
urlParameters: [
|
|
403
|
+
Parameters.$host,
|
|
404
|
+
Parameters.subscriptionId,
|
|
405
|
+
Parameters.resourceGroupName,
|
|
406
|
+
Parameters.workspaceName,
|
|
407
|
+
Parameters.linkedServiceName
|
|
408
|
+
],
|
|
409
|
+
headerParameters: [Parameters.accept],
|
|
410
|
+
serializer
|
|
411
|
+
};
|
|
412
|
+
const listByWorkspaceOperationSpec: coreClient.OperationSpec = {
|
|
413
|
+
path:
|
|
414
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices",
|
|
415
|
+
httpMethod: "GET",
|
|
416
|
+
responses: {
|
|
417
|
+
200: {
|
|
418
|
+
bodyMapper: Mappers.LinkedServiceListResult
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
queryParameters: [Parameters.apiVersion],
|
|
422
|
+
urlParameters: [
|
|
423
|
+
Parameters.$host,
|
|
424
|
+
Parameters.subscriptionId,
|
|
425
|
+
Parameters.resourceGroupName,
|
|
426
|
+
Parameters.workspaceName
|
|
427
|
+
],
|
|
428
|
+
headerParameters: [Parameters.accept],
|
|
429
|
+
serializer
|
|
430
|
+
};
|
|
@@ -0,0 +1,259 @@
|
|
|
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 { LinkedStorageAccounts } 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 {
|
|
16
|
+
LinkedStorageAccountsResource,
|
|
17
|
+
LinkedStorageAccountsListByWorkspaceOptionalParams,
|
|
18
|
+
DataSourceType,
|
|
19
|
+
LinkedStorageAccountsCreateOrUpdateOptionalParams,
|
|
20
|
+
LinkedStorageAccountsCreateOrUpdateResponse,
|
|
21
|
+
LinkedStorageAccountsDeleteOptionalParams,
|
|
22
|
+
LinkedStorageAccountsGetOptionalParams,
|
|
23
|
+
LinkedStorageAccountsGetResponse,
|
|
24
|
+
LinkedStorageAccountsListByWorkspaceResponse
|
|
25
|
+
} from "../models";
|
|
26
|
+
|
|
27
|
+
/// <reference lib="esnext.asynciterable" />
|
|
28
|
+
/** Class containing LinkedStorageAccounts operations. */
|
|
29
|
+
export class LinkedStorageAccountsImpl implements LinkedStorageAccounts {
|
|
30
|
+
private readonly client: OperationalInsightsManagementClientContext;
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Initialize a new instance of the class LinkedStorageAccounts class.
|
|
34
|
+
* @param client Reference to the service client
|
|
35
|
+
*/
|
|
36
|
+
constructor(client: OperationalInsightsManagementClientContext) {
|
|
37
|
+
this.client = client;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Gets all linked storage accounts associated with the specified workspace, storage accounts will be
|
|
42
|
+
* sorted by their data source type.
|
|
43
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
44
|
+
* @param workspaceName The name of the workspace.
|
|
45
|
+
* @param options The options parameters.
|
|
46
|
+
*/
|
|
47
|
+
public listByWorkspace(
|
|
48
|
+
resourceGroupName: string,
|
|
49
|
+
workspaceName: string,
|
|
50
|
+
options?: LinkedStorageAccountsListByWorkspaceOptionalParams
|
|
51
|
+
): PagedAsyncIterableIterator<LinkedStorageAccountsResource> {
|
|
52
|
+
const iter = this.listByWorkspacePagingAll(
|
|
53
|
+
resourceGroupName,
|
|
54
|
+
workspaceName,
|
|
55
|
+
options
|
|
56
|
+
);
|
|
57
|
+
return {
|
|
58
|
+
next() {
|
|
59
|
+
return iter.next();
|
|
60
|
+
},
|
|
61
|
+
[Symbol.asyncIterator]() {
|
|
62
|
+
return this;
|
|
63
|
+
},
|
|
64
|
+
byPage: () => {
|
|
65
|
+
return this.listByWorkspacePagingPage(
|
|
66
|
+
resourceGroupName,
|
|
67
|
+
workspaceName,
|
|
68
|
+
options
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
private async *listByWorkspacePagingPage(
|
|
75
|
+
resourceGroupName: string,
|
|
76
|
+
workspaceName: string,
|
|
77
|
+
options?: LinkedStorageAccountsListByWorkspaceOptionalParams
|
|
78
|
+
): AsyncIterableIterator<LinkedStorageAccountsResource[]> {
|
|
79
|
+
let result = await this._listByWorkspace(
|
|
80
|
+
resourceGroupName,
|
|
81
|
+
workspaceName,
|
|
82
|
+
options
|
|
83
|
+
);
|
|
84
|
+
yield result.value || [];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
private async *listByWorkspacePagingAll(
|
|
88
|
+
resourceGroupName: string,
|
|
89
|
+
workspaceName: string,
|
|
90
|
+
options?: LinkedStorageAccountsListByWorkspaceOptionalParams
|
|
91
|
+
): AsyncIterableIterator<LinkedStorageAccountsResource> {
|
|
92
|
+
for await (const page of this.listByWorkspacePagingPage(
|
|
93
|
+
resourceGroupName,
|
|
94
|
+
workspaceName,
|
|
95
|
+
options
|
|
96
|
+
)) {
|
|
97
|
+
yield* page;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Create or Update a link relation between current workspace and a group of storage accounts of a
|
|
103
|
+
* specific data source type.
|
|
104
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
105
|
+
* @param workspaceName The name of the workspace.
|
|
106
|
+
* @param dataSourceType Linked storage accounts type.
|
|
107
|
+
* @param parameters The parameters required to create or update linked storage accounts.
|
|
108
|
+
* @param options The options parameters.
|
|
109
|
+
*/
|
|
110
|
+
createOrUpdate(
|
|
111
|
+
resourceGroupName: string,
|
|
112
|
+
workspaceName: string,
|
|
113
|
+
dataSourceType: DataSourceType,
|
|
114
|
+
parameters: LinkedStorageAccountsResource,
|
|
115
|
+
options?: LinkedStorageAccountsCreateOrUpdateOptionalParams
|
|
116
|
+
): Promise<LinkedStorageAccountsCreateOrUpdateResponse> {
|
|
117
|
+
return this.client.sendOperationRequest(
|
|
118
|
+
{ resourceGroupName, workspaceName, dataSourceType, parameters, options },
|
|
119
|
+
createOrUpdateOperationSpec
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Deletes all linked storage accounts of a specific data source type associated with the specified
|
|
125
|
+
* workspace.
|
|
126
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
127
|
+
* @param workspaceName The name of the workspace.
|
|
128
|
+
* @param dataSourceType Linked storage accounts type.
|
|
129
|
+
* @param options The options parameters.
|
|
130
|
+
*/
|
|
131
|
+
delete(
|
|
132
|
+
resourceGroupName: string,
|
|
133
|
+
workspaceName: string,
|
|
134
|
+
dataSourceType: DataSourceType,
|
|
135
|
+
options?: LinkedStorageAccountsDeleteOptionalParams
|
|
136
|
+
): Promise<void> {
|
|
137
|
+
return this.client.sendOperationRequest(
|
|
138
|
+
{ resourceGroupName, workspaceName, dataSourceType, options },
|
|
139
|
+
deleteOperationSpec
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Gets all linked storage account of a specific data source type associated with the specified
|
|
145
|
+
* workspace.
|
|
146
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
147
|
+
* @param workspaceName The name of the workspace.
|
|
148
|
+
* @param dataSourceType Linked storage accounts type.
|
|
149
|
+
* @param options The options parameters.
|
|
150
|
+
*/
|
|
151
|
+
get(
|
|
152
|
+
resourceGroupName: string,
|
|
153
|
+
workspaceName: string,
|
|
154
|
+
dataSourceType: DataSourceType,
|
|
155
|
+
options?: LinkedStorageAccountsGetOptionalParams
|
|
156
|
+
): Promise<LinkedStorageAccountsGetResponse> {
|
|
157
|
+
return this.client.sendOperationRequest(
|
|
158
|
+
{ resourceGroupName, workspaceName, dataSourceType, options },
|
|
159
|
+
getOperationSpec
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Gets all linked storage accounts associated with the specified workspace, storage accounts will be
|
|
165
|
+
* sorted by their data source type.
|
|
166
|
+
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
167
|
+
* @param workspaceName The name of the workspace.
|
|
168
|
+
* @param options The options parameters.
|
|
169
|
+
*/
|
|
170
|
+
private _listByWorkspace(
|
|
171
|
+
resourceGroupName: string,
|
|
172
|
+
workspaceName: string,
|
|
173
|
+
options?: LinkedStorageAccountsListByWorkspaceOptionalParams
|
|
174
|
+
): Promise<LinkedStorageAccountsListByWorkspaceResponse> {
|
|
175
|
+
return this.client.sendOperationRequest(
|
|
176
|
+
{ resourceGroupName, workspaceName, options },
|
|
177
|
+
listByWorkspaceOperationSpec
|
|
178
|
+
);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
// Operation Specifications
|
|
182
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
183
|
+
|
|
184
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
185
|
+
path:
|
|
186
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}",
|
|
187
|
+
httpMethod: "PUT",
|
|
188
|
+
responses: {
|
|
189
|
+
200: {
|
|
190
|
+
bodyMapper: Mappers.LinkedStorageAccountsResource
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
requestBody: Parameters.parameters3,
|
|
194
|
+
queryParameters: [Parameters.apiVersion],
|
|
195
|
+
urlParameters: [
|
|
196
|
+
Parameters.$host,
|
|
197
|
+
Parameters.subscriptionId,
|
|
198
|
+
Parameters.resourceGroupName,
|
|
199
|
+
Parameters.workspaceName,
|
|
200
|
+
Parameters.dataSourceType
|
|
201
|
+
],
|
|
202
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
203
|
+
mediaType: "json",
|
|
204
|
+
serializer
|
|
205
|
+
};
|
|
206
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
207
|
+
path:
|
|
208
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}",
|
|
209
|
+
httpMethod: "DELETE",
|
|
210
|
+
responses: { 200: {} },
|
|
211
|
+
queryParameters: [Parameters.apiVersion],
|
|
212
|
+
urlParameters: [
|
|
213
|
+
Parameters.$host,
|
|
214
|
+
Parameters.subscriptionId,
|
|
215
|
+
Parameters.resourceGroupName,
|
|
216
|
+
Parameters.workspaceName,
|
|
217
|
+
Parameters.dataSourceType
|
|
218
|
+
],
|
|
219
|
+
serializer
|
|
220
|
+
};
|
|
221
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
222
|
+
path:
|
|
223
|
+
"/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}",
|
|
224
|
+
httpMethod: "GET",
|
|
225
|
+
responses: {
|
|
226
|
+
200: {
|
|
227
|
+
bodyMapper: Mappers.LinkedStorageAccountsResource
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
queryParameters: [Parameters.apiVersion],
|
|
231
|
+
urlParameters: [
|
|
232
|
+
Parameters.$host,
|
|
233
|
+
Parameters.subscriptionId,
|
|
234
|
+
Parameters.resourceGroupName,
|
|
235
|
+
Parameters.workspaceName,
|
|
236
|
+
Parameters.dataSourceType
|
|
237
|
+
],
|
|
238
|
+
headerParameters: [Parameters.accept],
|
|
239
|
+
serializer
|
|
240
|
+
};
|
|
241
|
+
const listByWorkspaceOperationSpec: coreClient.OperationSpec = {
|
|
242
|
+
path:
|
|
243
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts",
|
|
244
|
+
httpMethod: "GET",
|
|
245
|
+
responses: {
|
|
246
|
+
200: {
|
|
247
|
+
bodyMapper: Mappers.LinkedStorageAccountsListResult
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
queryParameters: [Parameters.apiVersion],
|
|
251
|
+
urlParameters: [
|
|
252
|
+
Parameters.$host,
|
|
253
|
+
Parameters.subscriptionId,
|
|
254
|
+
Parameters.resourceGroupName,
|
|
255
|
+
Parameters.workspaceName
|
|
256
|
+
],
|
|
257
|
+
headerParameters: [Parameters.accept],
|
|
258
|
+
serializer
|
|
259
|
+
};
|