diff --git a/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt b/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt +++ b/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/operationalinsights/arm-operationalinsights/README.md b/sdk/operationalinsights/arm-operationalinsights/README.md index 798fcfba4dea..1bd65f51f8b9 100644 --- a/sdk/operationalinsights/arm-operationalinsights/README.md +++ b/sdk/operationalinsights/arm-operationalinsights/README.md @@ -9,23 +9,24 @@ This package contains an isomorphic SDK for OperationalInsightsManagementClient. ### How to Install -``` +```bash npm install @azure/arm-operationalinsights ``` ### How to use -#### nodejs - Authentication, client creation and get linkedServices as an example written in TypeScript. +#### nodejs - Authentication, client creation and listByWorkspace dataExports as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -36,8 +37,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { const client = new OperationalInsightsManagementClient(creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const workspaceName = "testworkspaceName"; - const linkedServiceName = "testlinkedServiceName"; - client.linkedServices.get(resourceGroupName, workspaceName, linkedServiceName).then((result) => { + client.dataExports.listByWorkspace(resourceGroupName, workspaceName).then((result) => { console.log("The result is:"); console.log(result); }); @@ -46,11 +46,11 @@ msRestNodeAuth.interactiveLogin().then((creds) => { }); ``` -#### browser - Authentication, client creation and get linkedServices as an example written in JavaScript. +#### browser - Authentication, client creation and listByWorkspace dataExports as an example written in JavaScript. ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -82,8 +82,7 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to const client = new Azure.ArmOperationalinsights.OperationalInsightsManagementClient(res.creds, subscriptionId); const resourceGroupName = "testresourceGroupName"; const workspaceName = "testworkspaceName"; - const linkedServiceName = "testlinkedServiceName"; - client.linkedServices.get(resourceGroupName, workspaceName, linkedServiceName).then((result) => { + client.dataExports.listByWorkspace(resourceGroupName, workspaceName).then((result) => { console.log("The result is:"); console.log(result); }).catch((err) => { @@ -101,5 +100,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Foperationalinsights%2Farm-operationalinsights%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/operationalinsights/arm-operationalinsights/README.png) diff --git a/sdk/operationalinsights/arm-operationalinsights/package.json b/sdk/operationalinsights/arm-operationalinsights/package.json index afde6a376e01..1c5af5f394c8 100644 --- a/sdk/operationalinsights/arm-operationalinsights/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/package.json @@ -4,9 +4,9 @@ "description": "OperationalInsightsManagementClient Library with typescript type definitions for node.js and browser.", "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/operationalInsightsManagementClient.js", "types": "./esm/operationalInsightsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/operationalinsights/arm-operationalinsights", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/operationalinsights/arm-operationalinsights", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/operationalinsights/arm-operationalinsights/rollup.config.js b/sdk/operationalinsights/arm-operationalinsights/rollup.config.js index d21129e749d0..8675ec4b06f7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/rollup.config.js +++ b/sdk/operationalinsights/arm-operationalinsights/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/operationalInsightsManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/operationalInsightsManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-operationalinsights.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/clustersMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/clustersMappers.ts new file mode 100644 index 000000000000..d9593bb56566 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/clustersMappers.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + Cluster, + ClusterErrorResponse, + ClusterListResult, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + ErrorAdditionalInfo, + ErrorResponse, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Tag, + TrackedResource, + Workspace, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/dataExportsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/dataExportsMappers.ts new file mode 100644 index 000000000000..fedb31403324 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/dataExportsMappers.ts @@ -0,0 +1,37 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataExportErrorResponse, + DataExportListResult, + DataSource, + ErrorAdditionalInfo, + ErrorResponse, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Tag, + TrackedResource, + Workspace, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts index aee58af1b707..bcc34dccc177 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts @@ -1,21 +1,35 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - DataSource, + AzureEntityResource, BaseResource, CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, DataSourceListResult, + Identity, + KeyVaultProperties, LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Tag, + TrackedResource, Workspace, - Sku, - Resource + WorkspacePatch, + WorkspaceSku } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/deletedWorkspacesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/deletedWorkspacesMappers.ts new file mode 100644 index 000000000000..e2d2a4c474b4 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/deletedWorkspacesMappers.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Tag, + TrackedResource, + Workspace, + WorkspaceListResult, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/gatewaysMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/gatewaysMappers.ts new file mode 100644 index 000000000000..67c5a45e0449 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/gatewaysMappers.ts @@ -0,0 +1,11 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts index f0b2fa91cae0..6c52f6fcf206 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,513 +11,1984 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * The top level data export resource container. + */ +export interface DataExport extends BaseResource { + /** + * The data export rule ID. + */ + dataExportId?: string; + /** + * When ‘true’, all workspace's tables are exported. + */ + allTables?: boolean; + /** + * An array of tables to export, for example: [“Heartbeat, SecurityEvent”]. + */ + tableNames?: string[]; + /** + * The destination resource ID. This can be copied from the Properties entry of the destination + * resource in Azure. + */ + resourceId: string; + /** + * The type of the destination resource. Possible values include: 'StorageAccount', 'EventHub' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataExportType?: Type; + /** + * Optional. Allows to define an Event Hub name. Not applicable when destination is Storage + * Account. + */ + eventHubName?: string; + /** + * Active when enabled. + */ + enable?: boolean; + /** + * The latest data export rule modification time. + */ + createdDate?: string; + /** + * Date and time when the export was last modified. + */ + lastModifiedDate?: string; +} /** - * @interface - * An interface representing OperationDisplay. - * Display metadata associated with the operation. - * + * The resource management error additional info. */ -export interface OperationDisplay { +export interface ErrorAdditionalInfo { /** - * @member {string} [provider] Service provider: Microsoft - * OperationsManagement. + * The additional info type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - provider?: string; + readonly type?: string; /** - * @member {string} [resource] Resource on which the operation is performed - * etc. + * The additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - resource?: string; + readonly info?: any; +} + +/** + * The resource management error response. + */ +export interface ErrorResponse { /** - * @member {string} [operation] Type of operation: get, read, delete, etc. + * The error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - operation?: string; + readonly code?: string; + /** + * The error message. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly message?: string; + /** + * The error target. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly target?: string; + /** + * The error details. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly details?: ErrorResponse[]; + /** + * The error additional info. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly additionalInfo?: ErrorAdditionalInfo[]; } /** - * @interface - * An interface representing Operation. - * Supported operation of OperationalInsights resource provider. - * + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. */ -export interface Operation { +export interface DataExportErrorResponse { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * The details of the error. */ - name?: string; + error?: ErrorResponse; +} + +/** + * An interface representing Resource. + */ +export interface Resource extends BaseResource { /** - * @member {OperationDisplay} [display] Display metadata associated with the - * operation. + * Fully qualified resource Id for the resource. Ex - + * /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - display?: OperationDisplay; + readonly id?: string; + /** + * The name of the resource + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * The type of the resource. Ex- Microsoft.Compute/virtualMachines or + * Microsoft.Storage/storageAccounts. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; } /** - * @interface - * An interface representing LinkedService. - * The top level Linked service resource container. - * - * @extends BaseResource + * The resource model definition for a ARM tracked top level resource */ -export interface LinkedService extends BaseResource { +export interface TrackedResource extends Resource { /** - * @member {string} resourceId The resource id of the resource that will be - * linked to the workspace. + * Resource tags. */ - resourceId: string; + tags?: { [propertyName: string]: string }; + /** + * The geo-location where the resource lives + */ + location: string; +} + +/** + * The resource model definition for a Azure Resource Manager resource with an etag. + */ +export interface AzureEntityResource extends Resource { + /** + * Resource Etag. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly etag?: string; +} + +/** + * The resource model definition for a ARM proxy resource. It will have everything other than + * required location and tags + */ +export interface ProxyResource extends Resource { } /** - * @interface - * An interface representing DataSource. * Datasources under OMS Workspace. - * - * @extends BaseResource */ -export interface DataSource extends BaseResource { +export interface DataSource extends ProxyResource { /** - * @member {any} properties The data source properties in raw json format, - * each kind of data source have it's own schema. + * The data source properties in raw json format, each kind of data source have it's own schema. */ properties: any; /** - * @member {string} [eTag] The ETag of the data source. + * The ETag of the data source. */ eTag?: string; /** - * @member {DataSourceKind} kind Possible values include: 'AzureActivityLog', - * 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - * 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - * 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - * 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + * Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', + * 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', + * 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', 'AzureAuditLog', + * 'AzureActivityLog', 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + * 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', + * 'LinuxChangeTrackingPath', 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + * 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', + * 'SecurityEventCollectionConfiguration', + * 'SecurityInsightsSecurityEventCollectionConfiguration', 'ImportComputerGroup', + * 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', 'SqlDataClassification' */ kind: DataSourceKind; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing DataSourceFilter. * DataSource filter. Right now, only filter by kind is supported. - * */ export interface DataSourceFilter { /** - * @member {DataSourceKind} [kind] Possible values include: - * 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - * 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - * 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - * 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + * Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', + * 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', + * 'LinuxPerformanceCollection', 'CustomLog', 'CustomLogCollection', 'AzureAuditLog', + * 'AzureActivityLog', 'GenericDataSource', 'ChangeTrackingCustomPath', 'ChangeTrackingPath', + * 'ChangeTrackingServices', 'ChangeTrackingDataTypeConfiguration', + * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', + * 'LinuxChangeTrackingPath', 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + * 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', + * 'SecurityEventCollectionConfiguration', + * 'SecurityInsightsSecurityEventCollectionConfiguration', 'ImportComputerGroup', + * 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', 'SqlDataClassification' */ kind?: DataSourceKind; } /** - * @interface - * An interface representing IntelligencePack. - * Intelligence Pack containing a string name and boolean indicating if it's - * enabled. - * + * Intelligence Pack containing a string name and boolean indicating if it's enabled. */ export interface IntelligencePack { /** - * @member {string} [name] The name of the intelligence pack. + * The name of the intelligence pack. */ name?: string; /** - * @member {boolean} [enabled] The enabled boolean for the intelligence pack. + * The enabled boolean for the intelligence pack. */ enabled?: boolean; /** - * @member {string} [displayName] The display name of the intelligence pack. + * The display name of the intelligence pack. */ displayName?: string; } /** - * @interface - * An interface representing SharedKeys. + * The top level Linked service resource container. + */ +export interface LinkedService extends ProxyResource { + /** + * The resource id of the resource that will be linked to the workspace. This should be used for + * linking resources which require read access + */ + resourceId?: string; + /** + * The resource id of the resource that will be linked to the workspace. This should be used for + * linking resources which require write access + */ + writeAccessResourceId?: string; + /** + * The provisioning state of the linked service. Possible values include: 'Succeeded', + * 'Deleting', 'ProvisioningAccount', 'Updating' + */ + provisioningState?: LinkedServiceEntityStatus; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** + * Linked storage accounts top level resource container. + */ +export interface LinkedStorageAccountsResource extends ProxyResource { + /** + * Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly dataSourceType?: DataSourceType; + /** + * Linked storage accounts resources ids. + */ + storageAccountIds?: string[]; +} + +/** + * A management group that is connected to a workspace + */ +export interface ManagementGroup { + /** + * The number of servers connected to the management group. + */ + serverCount?: number; + /** + * Gets or sets a value indicating whether the management group is a gateway. + */ + isGateway?: boolean; + /** + * The name of the management group. + */ + name?: string; + /** + * The unique ID of the management group. + */ + id?: string; + /** + * The datetime that the management group was created. + */ + created?: Date; + /** + * The last datetime that the management group received data. + */ + dataReceived?: Date; + /** + * The version of System Center that is managing the management group. + */ + version?: string; + /** + * The SKU of System Center that is managing the management group. + */ + sku?: string; +} + +/** + * Display metadata associated with the operation. + */ +export interface OperationDisplay { + /** + * Service provider: Microsoft OperationsManagement. + */ + provider?: string; + /** + * Resource on which the operation is performed etc. + */ + resource?: string; + /** + * Type of operation: get, read, delete, etc. + */ + operation?: string; + /** + * Description of operation + */ + description?: string; +} + +/** + * Supported operation of OperationalInsights resource provider. + */ +export interface Operation { + /** + * Operation name: {provider}/{resource}/{operation} + */ + name?: string; + /** + * Display metadata associated with the operation. + */ + display?: OperationDisplay; +} + +/** + * The status of operation. + */ +export interface OperationStatus { + /** + * The operation Id. + */ + id?: string; + /** + * The operation name. + */ + name?: string; + /** + * The start time of the operation. + */ + startTime?: string; + /** + * The end time of the operation. + */ + endTime?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The error detail of the operation if any. + */ + error?: ErrorResponse; +} + +/** * The shared keys for a workspace. - * */ export interface SharedKeys { /** - * @member {string} [primarySharedKey] The primary shared key of a workspace. + * The primary shared key of a workspace. */ primarySharedKey?: string; /** - * @member {string} [secondarySharedKey] The secondary shared key of a - * workspace. + * The secondary shared key of a workspace. */ secondarySharedKey?: string; } /** - * @interface - * An interface representing MetricName. * The name of a metric. - * */ export interface MetricName { /** - * @member {string} [value] The system name of the metric. + * The system name of the metric. */ value?: string; /** - * @member {string} [localizedValue] The localized name of the metric. + * The localized name of the metric. */ localizedValue?: string; } /** - * @interface - * An interface representing UsageMetric. * A metric describing the usage of a resource. - * */ export interface UsageMetric { /** - * @member {MetricName} [name] The name of the metric. + * The name of the metric. */ name?: MetricName; /** - * @member {string} [unit] The units used for the metric. + * The units used for the metric. */ unit?: string; /** - * @member {number} [currentValue] The current value of the metric. + * The current value of the metric. */ currentValue?: number; /** - * @member {number} [limit] The quota limit for the metric. + * The quota limit for the metric. */ limit?: number; /** - * @member {Date} [nextResetTime] The time that the metric's value will - * reset. + * The time that the metric's value will reset. */ nextResetTime?: Date; /** - * @member {string} [quotaPeriod] The quota period that determines the length - * of time between value resets. + * The quota period that determines the length of time between value resets. */ quotaPeriod?: string; } /** - * @interface - * An interface representing ManagementGroup. - * A management group that is connected to a workspace - * + * The SKU (tier) of a workspace. */ -export interface ManagementGroup { +export interface WorkspaceSku { /** - * @member {number} [serverCount] The number of servers connected to the - * management group. + * The name of the SKU. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', + * 'PerGB2018', 'Standalone', 'CapacityReservation' */ - serverCount?: number; + name: WorkspaceSkuNameEnum; +} + +/** + * The private link scope resource reference. + */ +export interface PrivateLinkScopedResource { /** - * @member {boolean} [isGateway] Gets or sets a value indicating whether the - * management group is a gateway. + * The full resource Id of the private link scope resource. */ - isGateway?: boolean; + resourceId?: string; /** - * @member {string} [name] The name of the management group. + * The private link scope unique Identifier. */ - name?: string; + scopeId?: string; +} + +/** + * The top level Workspace resource container. + */ +export interface Workspace extends TrackedResource { /** - * @member {string} [id] The unique ID of the management group. + * The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', + * 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating' */ - id?: string; + provisioningState?: WorkspaceEntityStatus; /** - * @member {Date} [created] The datetime that the management group was - * created. + * This is a read-only property. Represents the ID associated with the workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - created?: Date; + readonly customerId?: string; /** - * @member {Date} [dataReceived] The last datetime that the management group - * received data. + * The SKU of the workspace. */ - dataReceived?: Date; + sku?: WorkspaceSku; /** - * @member {string} [version] The version of System Center that is managing - * the management group. + * The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 + * days is the maximum allowed for all other Skus. */ - version?: string; + retentionInDays?: number; /** - * @member {string} [sku] The SKU of System Center that is managing the - * management group. + * The network access type for accessing Log Analytics ingestion. Possible values include: + * 'Enabled', 'Disabled'. Default value: 'Enabled'. */ - sku?: string; -} - -/** - * @interface - * An interface representing Sku. - * The SKU (tier) of a workspace. - * - */ -export interface Sku { + publicNetworkAccessForIngestion?: PublicNetworkAccessType; + /** + * The network access type for accessing Log Analytics query. Possible values include: 'Enabled', + * 'Disabled'. Default value: 'Enabled'. + */ + publicNetworkAccessForQuery?: PublicNetworkAccessType; /** - * @member {SkuNameEnum} name The name of the SKU. Possible values include: - * 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - * 'Standalone' + * List of linked private link scope resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - name: SkuNameEnum; + readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; + /** + * The ETag of the workspace. + */ + eTag?: string; } /** - * @interface - * An interface representing Workspace. * The top level Workspace resource container. - * - * @extends BaseResource */ -export interface Workspace extends BaseResource { +export interface WorkspacePatch extends AzureEntityResource { /** - * @member {EntityStatus} [provisioningState] The provisioning state of the - * workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', - * 'Canceled', 'Deleting', 'ProvisioningAccount' + * The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', + * 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating' */ - provisioningState?: EntityStatus; + provisioningState?: WorkspaceEntityStatus; /** - * @member {string} [source] The source of the workspace. Source defines - * where the workspace was created. 'Azure' implies it was created in Azure. - * 'External' implies it was created via the Operational Insights Portal. - * This value is set on the service side and read-only on the client side. + * This is a read-only property. Represents the ID associated with the workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - source?: string; + readonly customerId?: string; /** - * @member {string} [customerId] The ID associated with the workspace. - * Setting this value at creation time allows the workspace being created to - * be linked to an existing workspace. + * The SKU of the workspace. */ - customerId?: string; + sku?: WorkspaceSku; /** - * @member {string} [portalUrl] The URL of the Operational Insights portal - * for this workspace. This value is set on the service side and read-only - * on the client side. + * The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 + * days is the maximum allowed for all other Skus. */ - portalUrl?: string; + retentionInDays?: number; /** - * @member {Sku} [sku] The SKU of the workspace. + * The network access type for accessing Log Analytics ingestion. Possible values include: + * 'Enabled', 'Disabled'. Default value: 'Enabled'. */ - sku?: Sku; + publicNetworkAccessForIngestion?: PublicNetworkAccessType; /** - * @member {number} [retentionInDays] The workspace data retention in days. - * -1 means Unlimited retention for the Unlimited Sku. 730 days is the - * maximum allowed for all other Skus. + * The network access type for accessing Log Analytics query. Possible values include: 'Enabled', + * 'Disabled'. Default value: 'Enabled'. */ - retentionInDays?: number; + publicNetworkAccessForQuery?: PublicNetworkAccessType; /** - * @member {string} [eTag] The ETag of the workspace. + * List of linked private link scope resources. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - eTag?: string; + readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; + /** + * Resource tags. Optional. + */ + tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing Resource. - * The resource definition. - * - * @extends BaseResource + * The key vault properties. */ -export interface Resource extends BaseResource { +export interface KeyVaultProperties { /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The Key Vault uri which holds they key associated with the Log Analytics cluster. */ - readonly id?: string; + keyVaultUri?: string; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The name of the key associated with the Log Analytics cluster. */ - readonly name?: string; + keyName?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The version of the key associated with the Log Analytics cluster. */ - readonly type?: string; + keyVersion?: string; +} + +/** + * Error response indicates that the service is not able to process the incoming request. The + * reason is provided in the error message. + */ +export interface ClusterErrorResponse { + /** + * The details of the error. + */ + error?: ErrorResponse; +} + +/** + * The cluster sku definition. + */ +export interface ClusterSku { /** - * @member {string} [location] Resource location + * The capacity value */ - location?: string; + capacity?: number; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * The name of the SKU. Possible values include: 'CapacityReservation' */ - tags?: { [propertyName: string]: string }; + name?: ClusterSkuNameEnum; } /** - * @interface - * An interface representing ProxyResource. - * Common properties of proxy resource. - * + * The top level Log Analytics cluster resource container. */ -export interface ProxyResource { +export interface ClusterPatch extends BaseResource { /** - * @member {string} [id] Resource ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The associated key properties. */ - readonly id?: string; + keyVaultProperties?: KeyVaultProperties; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The sku properties. */ - readonly name?: string; + sku?: ClusterSku; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource tags. */ - readonly type?: string; + tags?: { [propertyName: string]: string }; +} + +/** + * Identity for the resource. + */ +export interface Identity { + /** + * The principal ID of resource identity. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly principalId?: string; + /** + * The tenant ID of resource. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly tenantId?: string; + /** + * The identity type. Possible values include: 'SystemAssigned', 'None' + */ + type: IdentityType; +} + +/** + * The top level Log Analytics cluster resource container. + */ +export interface Cluster extends TrackedResource { + /** + * The identity of the resource. + */ + identity?: Identity; + /** + * The sku properties. + */ + sku?: ClusterSku; + /** + * The link used to get the next page of recommendations. + */ + nextLink?: string; + /** + * The ID associated with the cluster. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly clusterId?: string; + /** + * The provisioning state of the cluster. Possible values include: 'Creating', 'Succeeded', + * 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount', 'Updating' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: ClusterEntityStatus; + /** + * The associated key properties. + */ + keyVaultProperties?: KeyVaultProperties; +} + +/** + * Describes a storage account connection. + */ +export interface StorageAccount { + /** + * The Azure Resource Manager ID of the storage account resource. + */ + id: string; + /** + * The storage account key. + */ + key: string; +} + +/** + * The status of the storage insight. + */ +export interface StorageInsightStatus { + /** + * The state of the storage insight connection to the workspace. Possible values include: 'OK', + * 'ERROR' + */ + state: StorageInsightState; + /** + * Description of the state of the storage insight. + */ + description?: string; +} + +/** + * The top level storage insight resource container. + */ +export interface StorageInsight extends ProxyResource { + /** + * The names of the blob containers that the workspace should read + */ + containers?: string[]; + /** + * The names of the Azure tables that the workspace should read + */ + tables?: string[]; + /** + * The storage account connection details + */ + storageAccount: StorageAccount; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * The status of the storage insight + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly status?: StorageInsightStatus; + /** + * The ETag of the storage insight. + */ + eTag?: string; + /** + * Resource tags. */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing DataSourcesListByWorkspaceOptionalParams. - * Optional Parameters. - * - * @extends RequestOptionsBase + * A tag of a saved search. + */ +export interface Tag { + /** + * The tag name. + */ + name: string; + /** + * The tag value. + */ + value: string; +} + +/** + * Value object for saved search results. + */ +export interface SavedSearch extends ProxyResource { + /** + * The ETag of the saved search. + */ + eTag?: string; + /** + * The category of the saved search. This helps the user to find a saved search faster. + */ + category: string; + /** + * Saved search display name. + */ + displayName: string; + /** + * The query expression for the saved search. Please see + * https://docs.microsoft.com/en-us/azure/log-analytics/log-analytics-search-reference for + * reference. + */ + query: string; + /** + * The version number of the query language. The current version is 2 and is the default. + */ + version?: number; + /** + * The tags attached to the saved search. + */ + tags?: Tag[]; +} + +/** + * The saved search list operation response. + */ +export interface SavedSearchesListResult { + /** + * The array of result values. + */ + value?: SavedSearch[]; +} + +/** + * Service Tier details. + */ +export interface AvailableServiceTier { + /** + * The name of the Service Tier. Possible values include: 'Free', 'Standard', 'Premium', + * 'PerNode', 'PerGB2018', 'Standalone', 'CapacityReservation' + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly serviceTier?: SkuNameEnum; + /** + * True if the Service Tier is enabled for the workspace. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly enabled?: boolean; + /** + * The minimum retention for the Service Tier, in days. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly minimumRetention?: number; + /** + * The maximum retention for the Service Tier, in days. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly maximumRetention?: number; + /** + * The default retention for the Service Tier, in days. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly defaultRetention?: number; + /** + * The capacity reservation level in GB per day. Returned for the Capacity Reservation Service + * Tier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly capacityReservationLevel?: number; + /** + * Time when the sku was last updated for the workspace. Returned for the Capacity Reservation + * Service Tier. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly lastSkuUpdate?: Date; +} + +/** + * The core summary of a search. + */ +export interface CoreSummary { + /** + * The status of a core summary. + */ + status?: string; + /** + * The number of documents of a core summary. + */ + numberOfDocuments: number; +} + +/** + * The sort parameters for search. + */ +export interface SearchSort { + /** + * The name of the field the search query is sorted on. + */ + name?: string; + /** + * The sort order of the search. Possible values include: 'asc', 'desc' + */ + order?: SearchSortEnum; +} + +/** + * Schema metadata for search. + */ +export interface SearchMetadataSchema { + /** + * The name of the metadata schema. + */ + name?: string; + /** + * The version of the metadata schema. + */ + version?: number; +} + +/** + * Metadata for search results. + */ +export interface SearchMetadata { + /** + * The request id of the search. + */ + searchId?: string; + /** + * The search result type. + */ + resultType?: string; + /** + * The total number of search results. + */ + total?: number; + /** + * The number of top search results. + */ + top?: number; + /** + * The id of the search results request. + */ + id?: string; + /** + * The core summaries. + */ + coreSummaries?: CoreSummary[]; + /** + * The status of the search results. + */ + status?: string; + /** + * The start time for the search. + */ + startTime?: Date; + /** + * The time of last update. + */ + lastUpdated?: Date; + /** + * The ETag of the search results. + */ + eTag?: string; + /** + * How the results are sorted. + */ + sort?: SearchSort[]; + /** + * The request time. + */ + requestTime?: number; + /** + * The aggregated value field. + */ + aggregatedValueField?: string; + /** + * The aggregated grouping fields. + */ + aggregatedGroupingFields?: string; + /** + * The sum of all aggregates returned in the result set. + */ + sum?: number; + /** + * The max of all aggregates returned in the result set. + */ + max?: number; + /** + * The schema. + */ + schema?: SearchMetadataSchema; +} + +/** + * Value object for schema results. + */ +export interface SearchSchemaValue { + /** + * The name of the schema. + */ + name?: string; + /** + * The display name of the schema. + */ + displayName?: string; + /** + * The type. + */ + type?: string; + /** + * The boolean that indicates the field is searchable as free text. + */ + indexed: boolean; + /** + * The boolean that indicates whether or not the field is stored. + */ + stored: boolean; + /** + * The boolean that indicates whether or not the field is a facet. + */ + facet: boolean; + /** + * The array of workflows containing the field. + */ + ownerType?: string[]; +} + +/** + * The get schema operation response. + */ +export interface SearchGetSchemaResponse { + /** + * The metadata from search results. + */ + metadata?: SearchMetadata; + /** + * The array of result values. + */ + value?: SearchSchemaValue[]; +} + +/** + * User-defined filters to return data which will be purged from the table. + */ +export interface WorkspacePurgeBodyFilters { + /** + * The column of the table over which the given query should run + */ + column?: string; + /** + * A query operator to evaluate over the provided column and value(s). Supported operators are + * ==, =~, in, in~, >, >=, <, <=, between, and have the same behavior as they would in a KQL + * query. + */ + operator?: string; + /** + * the value for the operator to function over. This can be a number (e.g., > 100), a string + * (timestamp >= '2017-09-01') or array of values. + */ + value?: any; + /** + * When filtering over custom dimensions, this key will be used as the name of the custom + * dimension. + */ + key?: string; +} + +/** + * Describes the body of a purge request for an App Insights Workspace + */ +export interface WorkspacePurgeBody { + /** + * Table from which to purge data. + */ + table: string; + /** + * The set of columns and filters (queries) to run over them to purge the resulting data. + */ + filters: WorkspacePurgeBodyFilters[]; +} + +/** + * Response containing operationId for a specific purge action. + */ +export interface WorkspacePurgeResponse { + /** + * Id to use when querying for status for a particular purge operation. + */ + operationId: string; +} + +/** + * Response containing status for a specific purge operation. + */ +export interface WorkspacePurgeStatusResponse { + /** + * Status of the operation represented by the requested Id. Possible values include: 'pending', + * 'completed' + */ + status: PurgeState; +} + +/** + * Optional Parameters. + */ +export interface DataSourcesListByWorkspaceOptionalParams extends msRest.RequestOptionsBase { + /** + * Starting point of the collection of data source instances. + */ + skiptoken?: string; +} + +/** + * Optional Parameters. + */ +export interface WorkspacesDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Deletes the workspace without the recovery option. A workspace that was deleted with this flag + * cannot be recovered. + */ + force?: boolean; +} + +/** + * Optional Parameters. + */ +export interface WorkspacesBeginDeleteMethodOptionalParams extends msRest.RequestOptionsBase { + /** + * Deletes the workspace without the recovery option. A workspace that was deleted with this flag + * cannot be recovered. + */ + force?: boolean; +} + +/** + * An interface representing OperationalInsightsManagementClientOptions. + */ +export interface OperationalInsightsManagementClientOptions extends AzureServiceClientOptions { + baseUri?: string; +} + +/** + * Defines headers for Purge operation. + */ +export interface WorkspacePurgePurgeHeaders { + /** + * The location from which to request the operation status. + */ + xMsStatusLocation: string; +} + +/** + * @interface + * Result of the request to list data exports. + * @extends Array + */ +export interface DataExportListResult extends Array { +} + +/** + * @interface + * The list data source by workspace operation response. + * @extends Array + */ +export interface DataSourceListResult extends Array { + /** + * The link (url) to the next page of datasources. + */ + nextLink?: string; +} + +/** + * @interface + * The list linked service operation response. + * @extends Array + */ +export interface LinkedServiceListResult extends Array { +} + +/** + * @interface + * The list linked storage accounts service operation response. + * @extends Array + */ +export interface LinkedStorageAccountsListResult extends Array { +} + +/** + * @interface + * The list workspace management groups operation response. + * @extends Array + */ +export interface WorkspaceListManagementGroupsResult extends Array { +} + +/** + * @interface + * Result of the request to list solution operations. + * @extends Array + */ +export interface OperationListResult extends Array { + /** + * URL to get the next set of operation list results if there are any. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * The list workspace usages operation response. + * @extends Array + */ +export interface WorkspaceListUsagesResult extends Array { +} + +/** + * @interface + * The list workspaces operation response. + * @extends Array + */ +export interface WorkspaceListResult extends Array { +} + +/** + * @interface + * The list clusters operation response. + * @extends Array + */ +export interface ClusterListResult extends Array { + /** + * The link used to get the next page of recommendations. + */ + nextLink?: string; +} + +/** + * @interface + * The list storage insights operation response. + * @extends Array + */ +export interface StorageInsightListResult extends Array { + /** + * The link (url) to the next page of results. + */ + odataNextLink?: string; +} + +/** + * Defines values for Type. + * Possible values include: 'StorageAccount', 'EventHub' + * @readonly + * @enum {string} + */ +export type Type = 'StorageAccount' | 'EventHub'; + +/** + * Defines values for DataSourceKind. + * Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', 'LinuxSyslog', + * 'LinuxSyslogCollection', 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'CustomLog', + * 'CustomLogCollection', 'AzureAuditLog', 'AzureActivityLog', 'GenericDataSource', + * 'ChangeTrackingCustomPath', 'ChangeTrackingPath', 'ChangeTrackingServices', + * 'ChangeTrackingDataTypeConfiguration', 'ChangeTrackingDefaultRegistry', + * 'ChangeTrackingRegistry', 'ChangeTrackingLinuxPath', 'LinuxChangeTrackingPath', + * 'ChangeTrackingContentLocation', 'WindowsTelemetry', 'Office365', + * 'SecurityWindowsBaselineConfiguration', 'SecurityCenterSecurityWindowsBaselineConfiguration', + * 'SecurityEventCollectionConfiguration', 'SecurityInsightsSecurityEventCollectionConfiguration', + * 'ImportComputerGroup', 'NetworkMonitoring', 'Itsm', 'DnsAnalytics', 'ApplicationInsights', + * 'SqlDataClassification' + * @readonly + * @enum {string} + */ +export type DataSourceKind = 'WindowsEvent' | 'WindowsPerformanceCounter' | 'IISLogs' | 'LinuxSyslog' | 'LinuxSyslogCollection' | 'LinuxPerformanceObject' | 'LinuxPerformanceCollection' | 'CustomLog' | 'CustomLogCollection' | 'AzureAuditLog' | 'AzureActivityLog' | 'GenericDataSource' | 'ChangeTrackingCustomPath' | 'ChangeTrackingPath' | 'ChangeTrackingServices' | 'ChangeTrackingDataTypeConfiguration' | 'ChangeTrackingDefaultRegistry' | 'ChangeTrackingRegistry' | 'ChangeTrackingLinuxPath' | 'LinuxChangeTrackingPath' | 'ChangeTrackingContentLocation' | 'WindowsTelemetry' | 'Office365' | 'SecurityWindowsBaselineConfiguration' | 'SecurityCenterSecurityWindowsBaselineConfiguration' | 'SecurityEventCollectionConfiguration' | 'SecurityInsightsSecurityEventCollectionConfiguration' | 'ImportComputerGroup' | 'NetworkMonitoring' | 'Itsm' | 'DnsAnalytics' | 'ApplicationInsights' | 'SqlDataClassification'; + +/** + * Defines values for LinkedServiceEntityStatus. + * Possible values include: 'Succeeded', 'Deleting', 'ProvisioningAccount', 'Updating' + * @readonly + * @enum {string} + */ +export type LinkedServiceEntityStatus = 'Succeeded' | 'Deleting' | 'ProvisioningAccount' | 'Updating'; + +/** + * Defines values for DataSourceType. + * Possible values include: 'CustomLogs', 'AzureWatson' + * @readonly + * @enum {string} + */ +export type DataSourceType = 'CustomLogs' | 'AzureWatson'; + +/** + * Defines values for WorkspaceSkuNameEnum. + * Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + * 'CapacityReservation' + * @readonly + * @enum {string} + */ +export type WorkspaceSkuNameEnum = 'Free' | 'Standard' | 'Premium' | 'PerNode' | 'PerGB2018' | 'Standalone' | 'CapacityReservation'; + +/** + * Defines values for WorkspaceEntityStatus. + * Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', + * 'ProvisioningAccount', 'Updating' + * @readonly + * @enum {string} + */ +export type WorkspaceEntityStatus = 'Creating' | 'Succeeded' | 'Failed' | 'Canceled' | 'Deleting' | 'ProvisioningAccount' | 'Updating'; + +/** + * Defines values for PublicNetworkAccessType. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type PublicNetworkAccessType = 'Enabled' | 'Disabled'; + +/** + * Defines values for ClusterEntityStatus. + * Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', + * 'ProvisioningAccount', 'Updating' + * @readonly + * @enum {string} + */ +export type ClusterEntityStatus = 'Creating' | 'Succeeded' | 'Failed' | 'Canceled' | 'Deleting' | 'ProvisioningAccount' | 'Updating'; + +/** + * Defines values for ClusterSkuNameEnum. + * Possible values include: 'CapacityReservation' + * @readonly + * @enum {string} + */ +export type ClusterSkuNameEnum = 'CapacityReservation'; + +/** + * Defines values for IdentityType. + * Possible values include: 'SystemAssigned', 'None' + * @readonly + * @enum {string} + */ +export type IdentityType = 'SystemAssigned' | 'None'; + +/** + * Defines values for StorageInsightState. + * Possible values include: 'OK', 'ERROR' + * @readonly + * @enum {string} + */ +export type StorageInsightState = 'OK' | 'ERROR'; + +/** + * Defines values for SkuNameEnum. + * Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + * 'CapacityReservation' + * @readonly + * @enum {string} + */ +export type SkuNameEnum = 'Free' | 'Standard' | 'Premium' | 'PerNode' | 'PerGB2018' | 'Standalone' | 'CapacityReservation'; + +/** + * Defines values for SearchSortEnum. + * Possible values include: 'asc', 'desc' + * @readonly + * @enum {string} + */ +export type SearchSortEnum = 'asc' | 'desc'; + +/** + * Defines values for PurgeState. + * Possible values include: 'pending', 'completed' + * @readonly + * @enum {string} + */ +export type PurgeState = 'pending' | 'completed'; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type DataExportsListByWorkspaceResponse = DataExportListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataExportListResult; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DataExportsCreateOrUpdateResponse = DataExport & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataExport; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DataExportsGetResponse = DataExport & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataExport; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type DataExportsBeginCreateOrUpdateResponse = DataExport & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataExport; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type DataSourcesCreateOrUpdateResponse = DataSource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataSource; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type DataSourcesGetResponse = DataSource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataSource; + }; +}; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type DataSourcesListByWorkspaceResponse = DataSourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataSourceListResult; + }; +}; + +/** + * Contains response data for the listByWorkspaceNext operation. + */ +export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: DataSourceListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type IntelligencePacksListResponse = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: IntelligencePack[]; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type LinkedServicesCreateOrUpdateResponse = LinkedService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedService; + }; +}; + +/** + * Contains response data for the deleteMethod operation. + */ +export type LinkedServicesDeleteMethodResponse = LinkedService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedService; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LinkedServicesGetResponse = LinkedService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedService; + }; +}; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedServiceListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type LinkedServicesBeginCreateOrUpdateResponse = LinkedService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedService; + }; +}; + +/** + * Contains response data for the beginDeleteMethod operation. + */ +export type LinkedServicesBeginDeleteMethodResponse = LinkedService & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedService; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type LinkedStorageAccountsCreateOrUpdateResponse = LinkedStorageAccountsResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedStorageAccountsResource; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type LinkedStorageAccountsGetResponse = LinkedStorageAccountsResource & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedStorageAccountsResource; + }; +}; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type LinkedStorageAccountsListByWorkspaceResponse = LinkedStorageAccountsListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: LinkedStorageAccountsListResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ManagementGroupsListResponse = WorkspaceListManagementGroupsResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListManagementGroupsResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type OperationsListResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type OperationsListNextResponse = OperationListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type OperationStatusesGetResponse = OperationStatus & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; +}; + +/** + * Contains response data for the getSharedKeys operation. + */ +export type SharedKeysGetSharedKeysResponse = SharedKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedKeys; + }; +}; + +/** + * Contains response data for the regenerate operation. + */ +export type SharedKeysRegenerateResponse = SharedKeys & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: SharedKeys; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type UsagesListResponse = WorkspaceListUsagesResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListUsagesResult; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type WorkspacesListResponse = WorkspaceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; + +/** + * Contains response data for the listByResourceGroup operation. */ -export interface DataSourcesListByWorkspaceOptionalParams extends msRest.RequestOptionsBase { +export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { /** - * @member {string} [skiptoken] Starting point of the collection of data - * source instances. + * The underlying HTTP response. */ - skiptoken?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; /** - * @interface - * An interface representing OperationalInsightsManagementClientOptions. - * @extends AzureServiceClientOptions + * Contains response data for the createOrUpdate operation. */ -export interface OperationalInsightsManagementClientOptions extends AzureServiceClientOptions { +export type WorkspacesCreateOrUpdateResponse = Workspace & { /** - * @member {string} [baseUri] + * The underlying HTTP response. */ - baseUri?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * @interface - * An interface representing the LinkedServiceListResult. - * The list linked service operation response. - * - * @extends Array + * Contains response data for the get operation. */ -export interface LinkedServiceListResult extends Array { -} +export type WorkspacesGetResponse = Workspace & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * @interface - * An interface representing the DataSourceListResult. - * The list data source by workspace operation response. - * - * @extends Array + * Contains response data for the update operation. */ -export interface DataSourceListResult extends Array { +export type WorkspacesUpdateResponse = Workspace & { /** - * @member {string} [nextLink] The link (url) to the next page of - * datasources. + * The underlying HTTP response. */ - nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * @interface - * An interface representing the WorkspaceListUsagesResult. - * The list workspace usages operation response. - * - * @extends Array - */ -export interface WorkspaceListUsagesResult extends Array { -} + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * @interface - * An interface representing the WorkspaceListManagementGroupsResult. - * The list workspace managmement groups operation response. - * - * @extends Array + * Contains response data for the availableServiceTiers operation. */ -export interface WorkspaceListManagementGroupsResult extends Array { -} +export type WorkspacesAvailableServiceTiersResponse = Array & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * @interface - * An interface representing the WorkspaceListResult. - * The list workspaces operation response. - * - * @extends Array - */ -export interface WorkspaceListResult extends Array { -} + /** + * The response body as parsed JSON or XML + */ + parsedBody: AvailableServiceTier[]; + }; +}; /** - * @interface - * An interface representing the OperationListResult. - * Result of the request to list solution operations. - * - * @extends Array + * Contains response data for the beginCreateOrUpdate operation. */ -export interface OperationListResult extends Array { +export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The underlying HTTP response. */ - readonly nextLink?: string; -} + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for DataSourceKind. - * Possible values include: 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', 'CustomLog', - * 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', - * 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', - * 'WindowsPerformanceCounter' - * @readonly - * @enum {string} - */ -export type DataSourceKind = 'AzureActivityLog' | 'ChangeTrackingPath' | 'ChangeTrackingDefaultPath' | 'ChangeTrackingDefaultRegistry' | 'ChangeTrackingCustomRegistry' | 'CustomLog' | 'CustomLogCollection' | 'GenericDataSource' | 'IISLogs' | 'LinuxPerformanceObject' | 'LinuxPerformanceCollection' | 'LinuxSyslog' | 'LinuxSyslogCollection' | 'WindowsEvent' | 'WindowsPerformanceCounter'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: Workspace; + }; +}; /** - * Defines values for SkuNameEnum. - * Possible values include: 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - * 'Standalone' - * @readonly - * @enum {string} + * Contains response data for the list operation. */ -export type SkuNameEnum = 'Free' | 'Standard' | 'Premium' | 'Unlimited' | 'PerNode' | 'PerGB2018' | 'Standalone'; +export type DeletedWorkspacesListResponse = WorkspaceListResult & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; -/** - * Defines values for EntityStatus. - * Possible values include: 'Creating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', - * 'ProvisioningAccount' - * @readonly - * @enum {string} - */ -export type EntityStatus = 'Creating' | 'Succeeded' | 'Failed' | 'Canceled' | 'Deleting' | 'ProvisioningAccount'; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WorkspaceListResult; + }; +}; /** - * Contains response data for the createOrUpdate operation. + * Contains response data for the listByResourceGroup operation. */ -export type LinkedServicesCreateOrUpdateResponse = LinkedService & { +export type DeletedWorkspacesListByResourceGroupResponse = WorkspaceListResult & { /** * The underlying HTTP response. */ @@ -528,17 +1997,18 @@ export type LinkedServicesCreateOrUpdateResponse = LinkedService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: LinkedService; + parsedBody: WorkspaceListResult; }; }; /** - * Contains response data for the get operation. + * Contains response data for the listByResourceGroup operation. */ -export type LinkedServicesGetResponse = LinkedService & { +export type ClustersListByResourceGroupResponse = ClusterListResult & { /** * The underlying HTTP response. */ @@ -547,17 +2017,18 @@ export type LinkedServicesGetResponse = LinkedService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: LinkedService; + parsedBody: ClusterListResult; }; }; /** - * Contains response data for the listByWorkspace operation. + * Contains response data for the list operation. */ -export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult & { +export type ClustersListResponse = ClusterListResult & { /** * The underlying HTTP response. */ @@ -566,17 +2037,18 @@ export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: LinkedServiceListResult; + parsedBody: ClusterListResult; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type DataSourcesCreateOrUpdateResponse = DataSource & { +export type ClustersCreateOrUpdateResponse = Cluster & { /** * The underlying HTTP response. */ @@ -585,17 +2057,18 @@ export type DataSourcesCreateOrUpdateResponse = DataSource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DataSource; + parsedBody: Cluster; }; }; /** * Contains response data for the get operation. */ -export type DataSourcesGetResponse = DataSource & { +export type ClustersGetResponse = Cluster & { /** * The underlying HTTP response. */ @@ -604,17 +2077,18 @@ export type DataSourcesGetResponse = DataSource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DataSource; + parsedBody: Cluster; }; }; /** - * Contains response data for the listByWorkspace operation. + * Contains response data for the update operation. */ -export type DataSourcesListByWorkspaceResponse = DataSourceListResult & { +export type ClustersUpdateResponse = Cluster & { /** * The underlying HTTP response. */ @@ -623,17 +2097,18 @@ export type DataSourcesListByWorkspaceResponse = DataSourceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DataSourceListResult; + parsedBody: Cluster; }; }; /** - * Contains response data for the listByWorkspaceNext operation. + * Contains response data for the beginCreateOrUpdate operation. */ -export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult & { +export type ClustersBeginCreateOrUpdateResponse = Cluster & { /** * The underlying HTTP response. */ @@ -642,17 +2117,18 @@ export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: DataSourceListResult; + parsedBody: Cluster; }; }; /** - * Contains response data for the listIntelligencePacks operation. + * Contains response data for the listByResourceGroupNext operation. */ -export type WorkspacesListIntelligencePacksResponse = Array & { +export type ClustersListByResourceGroupNextResponse = ClusterListResult & { /** * The underlying HTTP response. */ @@ -661,17 +2137,18 @@ export type WorkspacesListIntelligencePacksResponse = Array & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: IntelligencePack[]; + parsedBody: ClusterListResult; }; }; /** - * Contains response data for the getSharedKeys operation. + * Contains response data for the listNext operation. */ -export type WorkspacesGetSharedKeysResponse = SharedKeys & { +export type ClustersListNextResponse = ClusterListResult & { /** * The underlying HTTP response. */ @@ -680,17 +2157,18 @@ export type WorkspacesGetSharedKeysResponse = SharedKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: SharedKeys; + parsedBody: ClusterListResult; }; }; /** - * Contains response data for the listUsages operation. + * Contains response data for the createOrUpdate operation. */ -export type WorkspacesListUsagesResponse = WorkspaceListUsagesResult & { +export type StorageInsightConfigsCreateOrUpdateResponse = StorageInsight & { /** * The underlying HTTP response. */ @@ -699,17 +2177,18 @@ export type WorkspacesListUsagesResponse = WorkspaceListUsagesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListUsagesResult; + parsedBody: StorageInsight; }; }; /** - * Contains response data for the listManagementGroups operation. + * Contains response data for the get operation. */ -export type WorkspacesListManagementGroupsResponse = WorkspaceListManagementGroupsResult & { +export type StorageInsightConfigsGetResponse = StorageInsight & { /** * The underlying HTTP response. */ @@ -718,17 +2197,18 @@ export type WorkspacesListManagementGroupsResponse = WorkspaceListManagementGrou * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListManagementGroupsResult; + parsedBody: StorageInsight; }; }; /** - * Contains response data for the listByResourceGroup operation. + * Contains response data for the listByWorkspace operation. */ -export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { +export type StorageInsightConfigsListByWorkspaceResponse = StorageInsightListResult & { /** * The underlying HTTP response. */ @@ -737,17 +2217,18 @@ export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: StorageInsightListResult; }; }; /** - * Contains response data for the list operation. + * Contains response data for the listByWorkspaceNext operation. */ -export type WorkspacesListResponse = WorkspaceListResult & { +export type StorageInsightConfigsListByWorkspaceNextResponse = StorageInsightListResult & { /** * The underlying HTTP response. */ @@ -756,17 +2237,18 @@ export type WorkspacesListResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WorkspaceListResult; + parsedBody: StorageInsightListResult; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type WorkspacesCreateOrUpdateResponse = Workspace & { +export type SavedSearchesCreateOrUpdateResponse = SavedSearch & { /** * The underlying HTTP response. */ @@ -775,17 +2257,18 @@ export type WorkspacesCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: SavedSearch; }; }; /** * Contains response data for the get operation. */ -export type WorkspacesGetResponse = Workspace & { +export type SavedSearchesGetResponse = SavedSearch & { /** * The underlying HTTP response. */ @@ -794,17 +2277,18 @@ export type WorkspacesGetResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: SavedSearch; }; }; /** - * Contains response data for the update operation. + * Contains response data for the listByWorkspace operation. */ -export type WorkspacesUpdateResponse = Workspace & { +export type SavedSearchesListByWorkspaceResponse = SavedSearchesListResult & { /** * The underlying HTTP response. */ @@ -813,17 +2297,18 @@ export type WorkspacesUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: SavedSearchesListResult; }; }; /** - * Contains response data for the beginCreateOrUpdate operation. + * Contains response data for the get operation. */ -export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { +export type SchemaGetResponse = SearchGetSchemaResponse & { /** * The underlying HTTP response. */ @@ -832,36 +2317,43 @@ export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: Workspace; + parsedBody: SearchGetSchemaResponse; }; }; /** - * Contains response data for the list operation. + * Contains response data for the purge operation. */ -export type OperationsListResponse = OperationListResult & { +export type WorkspacePurgePurgeResponse = WorkspacePurgeResponse & WorkspacePurgePurgeHeaders & { /** * The underlying HTTP response. */ _response: msRest.HttpResponse & { + /** + * The parsed HTTP response headers. + */ + parsedHeaders: WorkspacePurgePurgeHeaders; + /** * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: WorkspacePurgeResponse; }; }; /** - * Contains response data for the listNext operation. + * Contains response data for the getPurgeStatus operation. */ -export type OperationsListNextResponse = OperationListResult & { +export type WorkspacePurgeGetPurgeStatusResponse = WorkspacePurgeStatusResponse & { /** * The underlying HTTP response. */ @@ -870,9 +2362,10 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: OperationListResult; + parsedBody: WorkspacePurgeStatusResponse; }; }; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/intelligencePacksMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/intelligencePacksMappers.ts new file mode 100644 index 000000000000..b387037b5598 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/intelligencePacksMappers.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError, + IntelligencePack +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts index 3dc8e75684e0..681dead1cfa7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts @@ -1,21 +1,35 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - LinkedService, + AzureEntityResource, BaseResource, CloudError, - LinkedServiceListResult, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedServiceListResult, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Tag, + TrackedResource, Workspace, - Sku, - Resource + WorkspacePatch, + WorkspaceSku } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/linkedStorageAccountsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedStorageAccountsMappers.ts new file mode 100644 index 000000000000..b4e2704fbe6f --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedStorageAccountsMappers.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsListResult, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Tag, + TrackedResource, + Workspace, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/managementGroupsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/managementGroupsMappers.ts new file mode 100644 index 000000000000..09119a8bdfef --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/managementGroupsMappers.ts @@ -0,0 +1,13 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError, + ManagementGroup, + WorkspaceListManagementGroupsResult +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts index 8ecc014974bd..85801fff74ee 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,26 +12,69 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; -export const OperationDisplay: msRest.CompositeMapper = { - serializedName: "Operation_display", +export const DataExport: msRest.CompositeMapper = { + serializedName: "DataExport", type: { name: "Composite", - className: "OperationDisplay", + className: "DataExport", modelProperties: { - provider: { - serializedName: "provider", + dataExportId: { + serializedName: "properties.dataExportId", type: { name: "String" } }, - resource: { - serializedName: "resource", + allTables: { + serializedName: "properties.allTables", + type: { + name: "Boolean" + } + }, + tableNames: { + serializedName: "properties.tableNames", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + resourceId: { + required: true, + serializedName: "properties.destination.resourceId", type: { name: "String" } }, - operation: { - serializedName: "operation", + dataExportType: { + readOnly: true, + serializedName: "properties.destination.type", + type: { + name: "String" + } + }, + eventHubName: { + serializedName: "properties.destination.metaData.eventHubName", + type: { + name: "String" + } + }, + enable: { + serializedName: "properties.enable", + type: { + name: "Boolean" + } + }, + createdDate: { + serializedName: "properties.createdDate", + type: { + name: "String" + } + }, + lastModifiedDate: { + serializedName: "properties.lastModifiedDate", type: { name: "String" } @@ -42,38 +83,174 @@ export const OperationDisplay: msRest.CompositeMapper = { } }; -export const Operation: msRest.CompositeMapper = { - serializedName: "Operation", +export const ErrorAdditionalInfo: msRest.CompositeMapper = { + serializedName: "ErrorAdditionalInfo", type: { name: "Composite", - className: "Operation", + className: "ErrorAdditionalInfo", + modelProperties: { + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + info: { + readOnly: true, + serializedName: "info", + type: { + name: "Object" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + className: "ErrorResponse", + modelProperties: { + code: { + readOnly: true, + serializedName: "code", + type: { + name: "String" + } + }, + message: { + readOnly: true, + serializedName: "message", + type: { + name: "String" + } + }, + target: { + readOnly: true, + serializedName: "target", + type: { + name: "String" + } + }, + details: { + readOnly: true, + serializedName: "details", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + }, + additionalInfo: { + readOnly: true, + serializedName: "additionalInfo", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ErrorAdditionalInfo" + } + } + } + } + } + } +}; + +export const DataExportErrorResponse: msRest.CompositeMapper = { + serializedName: "DataExportErrorResponse", + type: { + name: "Composite", + className: "DataExportErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const Resource: msRest.CompositeMapper = { + serializedName: "Resource", + type: { + name: "Composite", + className: "Resource", modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, name: { + readOnly: true, serializedName: "name", type: { name: "String" } }, - display: { - serializedName: "display", + type: { + readOnly: true, + serializedName: "type", type: { - name: "Composite", - className: "OperationDisplay" + name: "String" } } } } }; -export const LinkedService: msRest.CompositeMapper = { - serializedName: "LinkedService", +export const TrackedResource: msRest.CompositeMapper = { + serializedName: "TrackedResource", type: { name: "Composite", - className: "LinkedService", + className: "TrackedResource", modelProperties: { - resourceId: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + }, + location: { required: true, - serializedName: "properties.resourceId", + serializedName: "location", + type: { + name: "String" + } + } + } + } +}; + +export const AzureEntityResource: msRest.CompositeMapper = { + serializedName: "AzureEntityResource", + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + readOnly: true, + serializedName: "etag", type: { name: "String" } @@ -82,12 +259,24 @@ export const LinkedService: msRest.CompositeMapper = { } }; +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + ...Resource.type.modelProperties + } + } +}; + export const DataSource: msRest.CompositeMapper = { serializedName: "DataSource", type: { name: "Composite", className: "DataSource", modelProperties: { + ...ProxyResource.type.modelProperties, properties: { required: true, serializedName: "properties", @@ -107,6 +296,17 @@ export const DataSource: msRest.CompositeMapper = { type: { name: "String" } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } } } } @@ -156,73 +356,308 @@ export const IntelligencePack: msRest.CompositeMapper = { } }; -export const SharedKeys: msRest.CompositeMapper = { - serializedName: "SharedKeys", +export const LinkedService: msRest.CompositeMapper = { + serializedName: "LinkedService", type: { name: "Composite", - className: "SharedKeys", + className: "LinkedService", modelProperties: { - primarySharedKey: { - serializedName: "primarySharedKey", + ...ProxyResource.type.modelProperties, + resourceId: { + serializedName: "properties.resourceId", type: { name: "String" } }, - secondarySharedKey: { - serializedName: "secondarySharedKey", + writeAccessResourceId: { + serializedName: "properties.writeAccessResourceId", + type: { + name: "String" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", type: { name: "String" } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } } } } }; -export const MetricName: msRest.CompositeMapper = { - serializedName: "MetricName", +export const LinkedStorageAccountsResource: msRest.CompositeMapper = { + serializedName: "LinkedStorageAccountsResource", type: { name: "Composite", - className: "MetricName", + className: "LinkedStorageAccountsResource", modelProperties: { - value: { - serializedName: "value", + ...ProxyResource.type.modelProperties, + dataSourceType: { + readOnly: true, + serializedName: "properties.dataSourceType", type: { - name: "String" + name: "Enum", + allowedValues: [ + "CustomLogs", + "AzureWatson" + ] } }, - localizedValue: { - serializedName: "localizedValue", + storageAccountIds: { + serializedName: "properties.storageAccountIds", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const UsageMetric: msRest.CompositeMapper = { - serializedName: "UsageMetric", +export const ManagementGroup: msRest.CompositeMapper = { + serializedName: "ManagementGroup", type: { name: "Composite", - className: "UsageMetric", + className: "ManagementGroup", modelProperties: { - name: { - serializedName: "name", + serverCount: { + serializedName: "properties.serverCount", type: { - name: "Composite", - className: "MetricName" + name: "Number" } }, - unit: { - serializedName: "unit", + isGateway: { + serializedName: "properties.isGateway", type: { - name: "String" + name: "Boolean" } }, - currentValue: { - serializedName: "currentValue", + name: { + serializedName: "properties.name", type: { - name: "Number" + name: "String" + } + }, + id: { + serializedName: "properties.id", + type: { + name: "String" + } + }, + created: { + serializedName: "properties.created", + type: { + name: "DateTime" + } + }, + dataReceived: { + serializedName: "properties.dataReceived", + type: { + name: "DateTime" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "String" + } + } + } + } +}; + +export const OperationDisplay: msRest.CompositeMapper = { + serializedName: "Operation_display", + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", + type: { + name: "String" + } + }, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const Operation: msRest.CompositeMapper = { + serializedName: "Operation", + type: { + name: "Composite", + className: "Operation", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const OperationStatus: msRest.CompositeMapper = { + serializedName: "OperationStatus", + type: { + name: "Composite", + className: "OperationStatus", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const SharedKeys: msRest.CompositeMapper = { + serializedName: "SharedKeys", + type: { + name: "Composite", + className: "SharedKeys", + modelProperties: { + primarySharedKey: { + serializedName: "primarySharedKey", + type: { + name: "String" + } + }, + secondarySharedKey: { + serializedName: "secondarySharedKey", + type: { + name: "String" + } + } + } + } +}; + +export const MetricName: msRest.CompositeMapper = { + serializedName: "MetricName", + type: { + name: "Composite", + className: "MetricName", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "String" + } + }, + localizedValue: { + serializedName: "localizedValue", + type: { + name: "String" + } + } + } + } +}; + +export const UsageMetric: msRest.CompositeMapper = { + serializedName: "UsageMetric", + type: { + name: "Composite", + className: "UsageMetric", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "Composite", + className: "MetricName" + } + }, + unit: { + serializedName: "unit", + type: { + name: "String" + } + }, + currentValue: { + serializedName: "currentValue", + type: { + name: "Number" } }, limit: { @@ -247,178 +682,1070 @@ export const UsageMetric: msRest.CompositeMapper = { } }; -export const ManagementGroup: msRest.CompositeMapper = { - serializedName: "ManagementGroup", +export const WorkspaceSku: msRest.CompositeMapper = { + serializedName: "WorkspaceSku", type: { name: "Composite", - className: "ManagementGroup", + className: "WorkspaceSku", modelProperties: { - serverCount: { - serializedName: "properties.serverCount", + name: { + required: true, + serializedName: "name", type: { - name: "Number" + name: "String" + } + } + } + } +}; + +export const PrivateLinkScopedResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkScopedResource", + type: { + name: "Composite", + className: "PrivateLinkScopedResource", + modelProperties: { + resourceId: { + serializedName: "resourceId", + type: { + name: "String" } }, - isGateway: { - serializedName: "properties.isGateway", + scopeId: { + serializedName: "scopeId", type: { - name: "Boolean" + name: "String" + } + } + } + } +}; + +export const Workspace: msRest.CompositeMapper = { + serializedName: "Workspace", + type: { + name: "Composite", + className: "Workspace", + modelProperties: { + ...TrackedResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" } }, - name: { - serializedName: "properties.name", + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "Composite", + className: "WorkspaceSku" + } + }, + retentionInDays: { + serializedName: "properties.retentionInDays", + constraints: { + InclusiveMaximum: 730, + InclusiveMinimum: -1 + }, + type: { + name: "Number" + } + }, + publicNetworkAccessForIngestion: { + serializedName: "properties.publicNetworkAccessForIngestion", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + publicNetworkAccessForQuery: { + serializedName: "properties.publicNetworkAccessForQuery", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + privateLinkScopedResources: { + readOnly: true, + serializedName: "properties.privateLinkScopedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkScopedResource" + } + } + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspacePatch: msRest.CompositeMapper = { + serializedName: "WorkspacePatch", + type: { + name: "Composite", + className: "WorkspacePatch", + modelProperties: { + ...AzureEntityResource.type.modelProperties, + provisioningState: { + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + customerId: { + readOnly: true, + serializedName: "properties.customerId", + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", + type: { + name: "Composite", + className: "WorkspaceSku" + } + }, + retentionInDays: { + serializedName: "properties.retentionInDays", + constraints: { + InclusiveMaximum: 730, + InclusiveMinimum: -1 + }, + type: { + name: "Number" + } + }, + publicNetworkAccessForIngestion: { + serializedName: "properties.publicNetworkAccessForIngestion", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + publicNetworkAccessForQuery: { + serializedName: "properties.publicNetworkAccessForQuery", + defaultValue: 'Enabled', + type: { + name: "String" + } + }, + privateLinkScopedResources: { + readOnly: true, + serializedName: "properties.privateLinkScopedResources", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkScopedResource" + } + } + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const KeyVaultProperties: msRest.CompositeMapper = { + serializedName: "keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties", + modelProperties: { + keyVaultUri: { + serializedName: "keyVaultUri", + type: { + name: "String" + } + }, + keyName: { + serializedName: "keyName", + type: { + name: "String" + } + }, + keyVersion: { + serializedName: "keyVersion", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterErrorResponse: msRest.CompositeMapper = { + serializedName: "ClusterErrorResponse", + type: { + name: "Composite", + className: "ClusterErrorResponse", + modelProperties: { + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + +export const ClusterSku: msRest.CompositeMapper = { + serializedName: "ClusterSku", + type: { + name: "Composite", + className: "ClusterSku", + modelProperties: { + capacity: { + serializedName: "capacity", + type: { + name: "Number" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + +export const ClusterPatch: msRest.CompositeMapper = { + serializedName: "ClusterPatch", + type: { + name: "Composite", + className: "ClusterPatch", + modelProperties: { + keyVaultProperties: { + serializedName: "properties.keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ClusterSku" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Identity: msRest.CompositeMapper = { + serializedName: "Identity", + type: { + name: "Composite", + className: "Identity", + modelProperties: { + principalId: { + readOnly: true, + serializedName: "principalId", + type: { + name: "String" + } + }, + tenantId: { + readOnly: true, + serializedName: "tenantId", + type: { + name: "String" + } + }, + type: { + required: true, + serializedName: "type", + type: { + name: "Enum", + allowedValues: [ + "SystemAssigned", + "None" + ] + } + } + } + } +}; + +export const Cluster: msRest.CompositeMapper = { + serializedName: "Cluster", + type: { + name: "Composite", + className: "Cluster", + modelProperties: { + ...TrackedResource.type.modelProperties, + identity: { + serializedName: "identity", + type: { + name: "Composite", + className: "Identity" + } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "ClusterSku" + } + }, + nextLink: { + serializedName: "properties.nextLink", + type: { + name: "String" + } + }, + clusterId: { + readOnly: true, + serializedName: "properties.clusterId", + type: { + name: "String" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + keyVaultProperties: { + serializedName: "properties.keyVaultProperties", + type: { + name: "Composite", + className: "KeyVaultProperties" + } + } + } + } +}; + +export const StorageAccount: msRest.CompositeMapper = { + serializedName: "StorageAccount", + type: { + name: "Composite", + className: "StorageAccount", + modelProperties: { + id: { + required: true, + serializedName: "id", + type: { + name: "String" + } + }, + key: { + required: true, + serializedName: "key", + type: { + name: "String" + } + } + } + } +}; + +export const StorageInsightStatus: msRest.CompositeMapper = { + serializedName: "StorageInsightStatus", + type: { + name: "Composite", + className: "StorageInsightStatus", + modelProperties: { + state: { + required: true, + serializedName: "state", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + } + } + } +}; + +export const StorageInsight: msRest.CompositeMapper = { + serializedName: "StorageInsight", + type: { + name: "Composite", + className: "StorageInsight", + modelProperties: { + ...ProxyResource.type.modelProperties, + containers: { + serializedName: "properties.containers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + tables: { + serializedName: "properties.tables", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + storageAccount: { + required: true, + serializedName: "properties.storageAccount", + type: { + name: "Composite", + className: "StorageAccount" + } + }, + status: { + readOnly: true, + serializedName: "properties.status", + type: { + name: "Composite", + className: "StorageInsightStatus" + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const Tag: msRest.CompositeMapper = { + serializedName: "Tag", + type: { + name: "Composite", + className: "Tag", + modelProperties: { + name: { + required: true, + serializedName: "name", + type: { + name: "String" + } + }, + value: { + required: true, + serializedName: "value", + type: { + name: "String" + } + } + } + } +}; + +export const SavedSearch: msRest.CompositeMapper = { + serializedName: "SavedSearch", + type: { + name: "Composite", + className: "SavedSearch", + modelProperties: { + ...ProxyResource.type.modelProperties, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + category: { + required: true, + serializedName: "properties.category", + type: { + name: "String" + } + }, + displayName: { + required: true, + serializedName: "properties.displayName", + type: { + name: "String" + } + }, + query: { + required: true, + serializedName: "properties.query", + type: { + name: "String" + } + }, + version: { + serializedName: "properties.version", + type: { + name: "Number" + } + }, + tags: { + serializedName: "properties.tags", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Tag" + } + } + } + } + } + } +}; + +export const SavedSearchesListResult: msRest.CompositeMapper = { + serializedName: "SavedSearchesListResult", + type: { + name: "Composite", + className: "SavedSearchesListResult", + modelProperties: { + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SavedSearch" + } + } + } + } + } + } +}; + +export const AvailableServiceTier: msRest.CompositeMapper = { + serializedName: "AvailableServiceTier", + type: { + name: "Composite", + className: "AvailableServiceTier", + modelProperties: { + serviceTier: { + readOnly: true, + serializedName: "serviceTier", + type: { + name: "String" + } + }, + enabled: { + readOnly: true, + serializedName: "enabled", + type: { + name: "Boolean" + } + }, + minimumRetention: { + readOnly: true, + serializedName: "minimumRetention", + type: { + name: "Number" + } + }, + maximumRetention: { + readOnly: true, + serializedName: "maximumRetention", + type: { + name: "Number" + } + }, + defaultRetention: { + readOnly: true, + serializedName: "defaultRetention", + type: { + name: "Number" + } + }, + capacityReservationLevel: { + readOnly: true, + serializedName: "capacityReservationLevel", + type: { + name: "Number" + } + }, + lastSkuUpdate: { + readOnly: true, + serializedName: "lastSkuUpdate", + type: { + name: "DateTime" + } + } + } + } +}; + +export const CoreSummary: msRest.CompositeMapper = { + serializedName: "CoreSummary", + type: { + name: "Composite", + className: "CoreSummary", + modelProperties: { + status: { + serializedName: "status", + type: { + name: "String" + } + }, + numberOfDocuments: { + required: true, + serializedName: "numberOfDocuments", + type: { + name: "Number" + } + } + } + } +}; + +export const SearchSort: msRest.CompositeMapper = { + serializedName: "SearchSort", + type: { + name: "Composite", + className: "SearchSort", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + order: { + serializedName: "order", + type: { + name: "String" + } + } + } + } +}; + +export const SearchMetadataSchema: msRest.CompositeMapper = { + serializedName: "SearchMetadataSchema", + type: { + name: "Composite", + className: "SearchMetadataSchema", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + version: { + serializedName: "version", + type: { + name: "Number" + } + } + } + } +}; + +export const SearchMetadata: msRest.CompositeMapper = { + serializedName: "SearchMetadata", + type: { + name: "Composite", + className: "SearchMetadata", + modelProperties: { + searchId: { + serializedName: "requestId", + type: { + name: "String" + } + }, + resultType: { + serializedName: "resultType", + type: { + name: "String" + } + }, + total: { + serializedName: "total", + type: { + name: "Number" + } + }, + top: { + serializedName: "top", + type: { + name: "Number" + } + }, + id: { + serializedName: "id", + type: { + name: "String" + } + }, + coreSummaries: { + serializedName: "coreSummaries", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "CoreSummary" + } + } + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "DateTime" + } + }, + lastUpdated: { + serializedName: "lastUpdated", + type: { + name: "DateTime" + } + }, + eTag: { + serializedName: "eTag", + type: { + name: "String" + } + }, + sort: { + serializedName: "sort", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SearchSort" + } + } + } + }, + requestTime: { + serializedName: "requestTime", + type: { + name: "Number" + } + }, + aggregatedValueField: { + serializedName: "aggregatedValueField", + type: { + name: "String" + } + }, + aggregatedGroupingFields: { + serializedName: "aggregatedGroupingFields", + type: { + name: "String" + } + }, + sum: { + serializedName: "sum", + type: { + name: "Number" + } + }, + max: { + serializedName: "max", + type: { + name: "Number" + } + }, + schema: { + serializedName: "schema", + type: { + name: "Composite", + className: "SearchMetadataSchema" + } + } + } + } +}; + +export const SearchSchemaValue: msRest.CompositeMapper = { + serializedName: "SearchSchemaValue", + type: { + name: "Composite", + className: "SearchSchemaValue", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", type: { name: "String" } }, - id: { - serializedName: "properties.id", + type: { + serializedName: "type", type: { name: "String" } }, - created: { - serializedName: "properties.created", + indexed: { + required: true, + serializedName: "indexed", type: { - name: "DateTime" + name: "Boolean" } }, - dataReceived: { - serializedName: "properties.dataReceived", + stored: { + required: true, + serializedName: "stored", type: { - name: "DateTime" + name: "Boolean" } }, - version: { - serializedName: "properties.version", + facet: { + required: true, + serializedName: "facet", type: { - name: "String" + name: "Boolean" } }, - sku: { - serializedName: "properties.sku", + ownerType: { + serializedName: "ownerType", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const Sku: msRest.CompositeMapper = { - serializedName: "Sku", +export const SearchGetSchemaResponse: msRest.CompositeMapper = { + serializedName: "SearchGetSchemaResponse", type: { name: "Composite", - className: "Sku", + className: "SearchGetSchemaResponse", modelProperties: { - name: { - required: true, - serializedName: "name", + metadata: { + serializedName: "metadata", type: { - name: "String" + name: "Composite", + className: "SearchMetadata" + } + }, + value: { + serializedName: "value", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SearchSchemaValue" + } + } } } } } }; -export const Workspace: msRest.CompositeMapper = { - serializedName: "Workspace", +export const WorkspacePurgeBodyFilters: msRest.CompositeMapper = { + serializedName: "WorkspacePurgeBodyFilters", type: { name: "Composite", - className: "Workspace", + className: "WorkspacePurgeBodyFilters", modelProperties: { - provisioningState: { - serializedName: "properties.provisioningState", + column: { + serializedName: "column", type: { name: "String" } }, - source: { - serializedName: "properties.source", + operator: { + serializedName: "operator", type: { name: "String" } }, - customerId: { - serializedName: "properties.customerId", + value: { + serializedName: "value", type: { - name: "String" + name: "Object" } }, - portalUrl: { - serializedName: "properties.portalUrl", + key: { + serializedName: "key", type: { name: "String" } - }, - sku: { - serializedName: "properties.sku", - type: { - name: "Composite", - className: "Sku" - } - }, - retentionInDays: { - serializedName: "properties.retentionInDays", - constraints: { - InclusiveMaximum: 730, - InclusiveMinimum: -1 - }, + } + } + } +}; + +export const WorkspacePurgeBody: msRest.CompositeMapper = { + serializedName: "WorkspacePurgeBody", + type: { + name: "Composite", + className: "WorkspacePurgeBody", + modelProperties: { + table: { + required: true, + serializedName: "table", type: { - name: "Number" + name: "String" } }, - eTag: { - serializedName: "eTag", + filters: { + required: true, + serializedName: "filters", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WorkspacePurgeBodyFilters" + } + } } } } } }; -export const Resource: msRest.CompositeMapper = { - serializedName: "Resource", +export const WorkspacePurgeResponse: msRest.CompositeMapper = { + serializedName: "WorkspacePurgeResponse", type: { name: "Composite", - className: "Resource", + className: "WorkspacePurgeResponse", modelProperties: { - id: { - readOnly: true, - serializedName: "id", - type: { - name: "String" - } - }, - name: { - readOnly: true, - serializedName: "name", + operationId: { + required: true, + serializedName: "operationId", type: { name: "String" } - }, - type: { - readOnly: true, - serializedName: "type", + } + } + } +}; + +export const WorkspacePurgeStatusResponse: msRest.CompositeMapper = { + serializedName: "WorkspacePurgeStatusResponse", + type: { + name: "Composite", + className: "WorkspacePurgeStatusResponse", + modelProperties: { + status: { + required: true, + serializedName: "status", type: { name: "String" } - }, - location: { - serializedName: "location", + } + } + } +}; + +export const WorkspacePurgePurgeHeaders: msRest.CompositeMapper = { + serializedName: "workspacepurge-purge-headers", + type: { + name: "Composite", + className: "WorkspacePurgePurgeHeaders", + modelProperties: { + xMsStatusLocation: { + serializedName: "x-ms-status-location", type: { name: "String" } - }, - tags: { - serializedName: "tags", + } + } + } +}; + +export const DataExportListResult: msRest.CompositeMapper = { + serializedName: "DataExportListResult", + type: { + name: "Composite", + className: "DataExportListResult", + modelProperties: { + value: { + serializedName: "", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "DataExport" } } } @@ -427,40 +1754,70 @@ export const Resource: msRest.CompositeMapper = { } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const DataSourceListResult: msRest.CompositeMapper = { + serializedName: "DataSourceListResult", type: { name: "Composite", - className: "ProxyResource", + className: "DataSourceListResult", modelProperties: { - id: { - readOnly: true, - serializedName: "id", + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataSource" + } + } } }, - name: { - readOnly: true, - serializedName: "name", + nextLink: { + serializedName: "nextLink", type: { name: "String" } - }, - type: { - readOnly: true, - serializedName: "type", + } + } + } +}; + +export const LinkedServiceListResult: msRest.CompositeMapper = { + serializedName: "LinkedServiceListResult", + type: { + name: "Composite", + className: "LinkedServiceListResult", + modelProperties: { + value: { + serializedName: "", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LinkedService" + } + } } - }, - tags: { - serializedName: "tags", + } + } + } +}; + +export const LinkedStorageAccountsListResult: msRest.CompositeMapper = { + serializedName: "LinkedStorageAccountsListResult", + type: { + name: "Composite", + className: "LinkedStorageAccountsListResult", + modelProperties: { + value: { + serializedName: "", type: { - name: "Dictionary", - value: { + name: "Sequence", + element: { type: { - name: "String" + name: "Composite", + className: "LinkedStorageAccountsResource" } } } @@ -469,11 +1826,11 @@ export const ProxyResource: msRest.CompositeMapper = { } }; -export const LinkedServiceListResult: msRest.CompositeMapper = { - serializedName: "LinkedServiceListResult", +export const WorkspaceListManagementGroupsResult: msRest.CompositeMapper = { + serializedName: "WorkspaceListManagementGroupsResult", type: { name: "Composite", - className: "LinkedServiceListResult", + className: "WorkspaceListManagementGroupsResult", modelProperties: { value: { serializedName: "", @@ -482,7 +1839,7 @@ export const LinkedServiceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "LinkedService" + className: "ManagementGroup" } } } @@ -491,11 +1848,11 @@ export const LinkedServiceListResult: msRest.CompositeMapper = { } }; -export const DataSourceListResult: msRest.CompositeMapper = { - serializedName: "DataSourceListResult", +export const OperationListResult: msRest.CompositeMapper = { + serializedName: "OperationListResult", type: { name: "Composite", - className: "DataSourceListResult", + className: "OperationListResult", modelProperties: { value: { serializedName: "", @@ -504,12 +1861,13 @@ export const DataSourceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "DataSource" + className: "Operation" } } } }, nextLink: { + readOnly: true, serializedName: "nextLink", type: { name: "String" @@ -541,11 +1899,11 @@ export const WorkspaceListUsagesResult: msRest.CompositeMapper = { } }; -export const WorkspaceListManagementGroupsResult: msRest.CompositeMapper = { - serializedName: "WorkspaceListManagementGroupsResult", +export const WorkspaceListResult: msRest.CompositeMapper = { + serializedName: "WorkspaceListResult", type: { name: "Composite", - className: "WorkspaceListManagementGroupsResult", + className: "WorkspaceListResult", modelProperties: { value: { serializedName: "", @@ -554,7 +1912,7 @@ export const WorkspaceListManagementGroupsResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "ManagementGroup" + className: "Workspace" } } } @@ -563,12 +1921,18 @@ export const WorkspaceListManagementGroupsResult: msRest.CompositeMapper = { } }; -export const WorkspaceListResult: msRest.CompositeMapper = { - serializedName: "WorkspaceListResult", +export const ClusterListResult: msRest.CompositeMapper = { + serializedName: "ClusterListResult", type: { name: "Composite", - className: "WorkspaceListResult", + className: "ClusterListResult", modelProperties: { + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + }, value: { serializedName: "", type: { @@ -576,7 +1940,7 @@ export const WorkspaceListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Workspace" + className: "Cluster" } } } @@ -585,11 +1949,11 @@ export const WorkspaceListResult: msRest.CompositeMapper = { } }; -export const OperationListResult: msRest.CompositeMapper = { - serializedName: "OperationListResult", +export const StorageInsightListResult: msRest.CompositeMapper = { + serializedName: "StorageInsightListResult", type: { name: "Composite", - className: "OperationListResult", + className: "StorageInsightListResult", modelProperties: { value: { serializedName: "", @@ -598,14 +1962,13 @@ export const OperationListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "Operation" + className: "StorageInsight" } } } }, - nextLink: { - readOnly: true, - serializedName: "nextLink", + odataNextLink: { + serializedName: "@odata\\.nextLink", type: { name: "String" } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/operationStatusesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/operationStatusesMappers.ts new file mode 100644 index 000000000000..6661f04509dc --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/operationStatusesMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError, + ErrorAdditionalInfo, + ErrorResponse, + OperationStatus +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts index 2edcc577920e..689688180be7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + CloudError, Operation, OperationDisplay, - CloudError + OperationListResult } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts index b0f08de703a7..eb50b23ec8d7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts @@ -25,6 +25,69 @@ export const apiVersion: msRest.OperationQueryParameter = { mapper: { required: true, serializedName: "api-version", + constraints: { + MinLength: 1 + }, + type: { + name: "String" + } + } +}; +export const asyncOperationId: msRest.OperationURLParameter = { + parameterPath: "asyncOperationId", + mapper: { + required: true, + serializedName: "asyncOperationId", + type: { + name: "String" + } + } +}; +export const clusterName0: msRest.OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + required: true, + serializedName: "clusterName", + constraints: { + MaxLength: 63, + MinLength: 4, + Pattern: /^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$/ + }, + type: { + name: "String" + } + } +}; +export const clusterName1: msRest.OperationURLParameter = { + parameterPath: "clusterName", + mapper: { + required: true, + serializedName: "clusterName", + type: { + name: "String" + } + } +}; +export const dataExportName0: msRest.OperationURLParameter = { + parameterPath: "dataExportName", + mapper: { + required: true, + serializedName: "dataExportName", + constraints: { + MaxLength: 63, + MinLength: 4, + Pattern: /^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$/ + }, + type: { + name: "String" + } + } +}; +export const dataExportName1: msRest.OperationURLParameter = { + parameterPath: "dataExportName", + mapper: { + required: true, + serializedName: "dataExportName", type: { name: "String" } @@ -40,6 +103,20 @@ export const dataSourceName: msRest.OperationURLParameter = { } } }; +export const dataSourceType: msRest.OperationURLParameter = { + parameterPath: "dataSourceType", + mapper: { + required: true, + serializedName: "dataSourceType", + type: { + name: "Enum", + allowedValues: [ + "CustomLogs", + "AzureWatson" + ] + } + } +}; export const filter: msRest.OperationQueryParameter = { parameterPath: "filter", mapper: { @@ -50,6 +127,28 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const force: msRest.OperationQueryParameter = { + parameterPath: [ + "options", + "force" + ], + mapper: { + serializedName: "force", + type: { + name: "Boolean" + } + } +}; +export const gatewayId: msRest.OperationURLParameter = { + parameterPath: "gatewayId", + mapper: { + required: true, + serializedName: "gatewayId", + type: { + name: "String" + } + } +}; export const intelligencePackName: msRest.OperationURLParameter = { parameterPath: "intelligencePackName", mapper: { @@ -70,6 +169,16 @@ export const linkedServiceName: msRest.OperationURLParameter = { } } }; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -81,7 +190,17 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; -export const resourceGroupName0: msRest.OperationURLParameter = { +export const purgeId: msRest.OperationURLParameter = { + parameterPath: "purgeId", + mapper: { + required: true, + serializedName: "purgeId", + type: { + name: "String" + } + } +}; +export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, @@ -96,11 +215,11 @@ export const resourceGroupName0: msRest.OperationURLParameter = { } } }; -export const resourceGroupName1: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", +export const savedSearchId: msRest.OperationURLParameter = { + parameterPath: "savedSearchId", mapper: { required: true, - serializedName: "resourceGroupName", + serializedName: "savedSearchId", type: { name: "String" } @@ -118,27 +237,30 @@ export const skiptoken: msRest.OperationQueryParameter = { } } }; -export const subscriptionId: msRest.OperationURLParameter = { - parameterPath: "subscriptionId", +export const storageInsightName: msRest.OperationURLParameter = { + parameterPath: "storageInsightName", mapper: { required: true, - serializedName: "subscriptionId", + serializedName: "storageInsightName", type: { name: "String" } } }; -export const workspaceName0: msRest.OperationURLParameter = { - parameterPath: "workspaceName", +export const subscriptionId: msRest.OperationURLParameter = { + parameterPath: "subscriptionId", mapper: { required: true, - serializedName: "workspaceName", + serializedName: "subscriptionId", + constraints: { + MinLength: 1 + }, type: { name: "String" } } }; -export const workspaceName1: msRest.OperationURLParameter = { +export const workspaceName: msRest.OperationURLParameter = { parameterPath: "workspaceName", mapper: { required: true, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/savedSearchesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/savedSearchesMappers.ts new file mode 100644 index 000000000000..2c77cf5eecc0 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/savedSearchesMappers.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + SavedSearchesListResult, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Tag, + TrackedResource, + Workspace, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/schemaMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/schemaMappers.ts new file mode 100644 index 000000000000..8ce5a9ebcf29 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/schemaMappers.ts @@ -0,0 +1,17 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError, + CoreSummary, + SearchGetSchemaResponse, + SearchMetadata, + SearchMetadataSchema, + SearchSchemaValue, + SearchSort +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/sharedKeysOperationsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/sharedKeysOperationsMappers.ts new file mode 100644 index 000000000000..91053133130d --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/sharedKeysOperationsMappers.ts @@ -0,0 +1,12 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError, + SharedKeys +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/storageInsightConfigsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/storageInsightConfigsMappers.ts new file mode 100644 index 000000000000..b3381693f576 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/storageInsightConfigsMappers.ts @@ -0,0 +1,35 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + AzureEntityResource, + BaseResource, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, + DataSource, + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightListResult, + StorageInsightStatus, + Tag, + TrackedResource, + Workspace, + WorkspacePatch, + WorkspaceSku +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/usagesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/usagesMappers.ts new file mode 100644 index 000000000000..2c5ce37aa312 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/usagesMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError, + MetricName, + UsageMetric, + WorkspaceListUsagesResult +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacePurgeMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacePurgeMappers.ts new file mode 100644 index 000000000000..4a438d48eb3e --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacePurgeMappers.ts @@ -0,0 +1,16 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError, + WorkspacePurgeBody, + WorkspacePurgeBodyFilters, + WorkspacePurgePurgeHeaders, + WorkspacePurgeResponse, + WorkspacePurgeStatusResponse +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts index 1d18205a1490..c04595d65a3f 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts @@ -1,28 +1,36 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - CloudError, - IntelligencePack, - SharedKeys, - WorkspaceListUsagesResult, - UsageMetric, - MetricName, - WorkspaceListManagementGroupsResult, - ManagementGroup, - WorkspaceListResult, - Workspace, + AvailableServiceTier, + AzureEntityResource, BaseResource, - Sku, - LinkedService, + CloudError, + Cluster, + ClusterPatch, + ClusterSku, + DataExport, DataSource, - Resource + Identity, + KeyVaultProperties, + LinkedService, + LinkedStorageAccountsResource, + PrivateLinkScopedResource, + ProxyResource, + Resource, + SavedSearch, + StorageAccount, + StorageInsight, + StorageInsightStatus, + Tag, + TrackedResource, + Workspace, + WorkspaceListResult, + WorkspacePatch, + WorkspaceSku } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts index b06840df7055..93dab8b8d875 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts @@ -17,24 +17,51 @@ import { OperationalInsightsManagementClientContext } from "./operationalInsight class OperationalInsightsManagementClient extends OperationalInsightsManagementClientContext { // Operation groups - linkedServices: operations.LinkedServices; + dataExports: operations.DataExports; dataSources: operations.DataSources; - workspaces: operations.Workspaces; + intelligencePacks: operations.IntelligencePacks; + linkedServices: operations.LinkedServices; + linkedStorageAccounts: operations.LinkedStorageAccounts; + managementGroups: operations.ManagementGroups; operations: operations.Operations; + operationStatuses: operations.OperationStatuses; + sharedKeys: operations.SharedKeysOperations; + usages: operations.Usages; + workspaces: operations.Workspaces; + deletedWorkspaces: operations.DeletedWorkspaces; + clusters: operations.Clusters; + storageInsightConfigs: operations.StorageInsightConfigs; + savedSearches: operations.SavedSearches; + gateways: operations.Gateways; + schema: operations.Schema; + workspacePurge: operations.WorkspacePurge; /** * Initializes a new instance of the OperationalInsightsManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.OperationalInsightsManagementClientOptions) { super(credentials, subscriptionId, options); - this.linkedServices = new operations.LinkedServices(this); + this.dataExports = new operations.DataExports(this); this.dataSources = new operations.DataSources(this); - this.workspaces = new operations.Workspaces(this); + this.intelligencePacks = new operations.IntelligencePacks(this); + this.linkedServices = new operations.LinkedServices(this); + this.linkedStorageAccounts = new operations.LinkedStorageAccounts(this); + this.managementGroups = new operations.ManagementGroups(this); this.operations = new operations.Operations(this); + this.operationStatuses = new operations.OperationStatuses(this); + this.sharedKeys = new operations.SharedKeysOperations(this); + this.usages = new operations.Usages(this); + this.workspaces = new operations.Workspaces(this); + this.deletedWorkspaces = new operations.DeletedWorkspaces(this); + this.clusters = new operations.Clusters(this); + this.storageInsightConfigs = new operations.StorageInsightConfigs(this); + this.savedSearches = new operations.SavedSearches(this); + this.gateways = new operations.Gateways(this); + this.schema = new operations.Schema(this); + this.workspacePurge = new operations.WorkspacePurge(this); } } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts index b7e62e1ece9f..dc0683f0d883 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts @@ -13,18 +13,17 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-operationalinsights"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class OperationalInsightsManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; - subscriptionId: string; apiVersion?: string; + subscriptionId: string; /** * Initializes a new instance of the OperationalInsightsManagementClient class. * @param credentials Credentials needed for the client to connect to Azure. - * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure - * subscription. The subscription ID forms part of the URI for every service call. + * @param subscriptionId The ID of the target subscription. * @param [options] The parameter options */ constructor(credentials: msRest.ServiceClientCredentials, subscriptionId: string, options?: Models.OperationalInsightsManagementClientOptions) { @@ -45,7 +44,7 @@ export class OperationalInsightsManagementClientContext extends msRestAzure.Azur super(credentials, options); - this.apiVersion = '2015-11-01-preview'; + this.apiVersion = '2020-03-01-preview'; this.acceptLanguage = 'en-US'; this.longRunningOperationRetryTimeout = 30; this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts new file mode 100644 index 000000000000..3f6acfafae5b --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts @@ -0,0 +1,476 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/clustersMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a Clusters. */ +export class Clusters { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a Clusters. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets Log Analytics clusters in a resource group. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } + + /** + * Gets the Log Analytics clusters in a subscription. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Create or update a Log Analytics cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, clusterName: string, parameters: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,clusterName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a cluster instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,clusterName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets a Log Analytics cluster instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, clusterName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Updates a Log Analytics cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @param [options] The optional parameters + * @returns Promise + */ + update(resourceGroupName: string, clusterName: string, parameters: Models.ClusterPatch, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @param callback The callback + */ + update(resourceGroupName: string, clusterName: string, parameters: Models.ClusterPatch, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param parameters The parameters required to patch a Log Analytics cluster. + * @param options The optional parameters + * @param callback The callback + */ + update(resourceGroupName: string, clusterName: string, parameters: Models.ClusterPatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, clusterName: string, parameters: Models.ClusterPatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + clusterName, + parameters, + options + }, + updateOperationSpec, + callback) as Promise; + } + + /** + * Create or update a Log Analytics cluster. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName The name of the Log Analytics cluster. + * @param parameters The parameters required to create or update a Log Analytics cluster. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, clusterName: string, parameters: Models.Cluster, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a cluster instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param clusterName Name of the Log Analytics Cluster. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, clusterName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + clusterName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets Log Analytics clusters in a resource group. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByResourceGroupNextOperationSpec, + callback) as Promise; + } + + /** + * Gets the Log Analytics clusters in a subscription. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.clusterName1 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.clusterName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.ClusterPatch, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.clusterName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.Cluster, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.Cluster + }, + 201: { + bodyMapper: Mappers.Cluster + }, + 202: {}, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.clusterName1, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ClusterListResult + }, + default: { + bodyMapper: Mappers.ClusterErrorResponse + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts new file mode 100644 index 000000000000..e12a5d11fbe9 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts @@ -0,0 +1,284 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/dataExportsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a DataExports. */ +export class DataExports { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a DataExports. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Lists the data export instances within a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } + + /** + * Create or update a data export. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,workspaceName,dataExportName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Gets a data export instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, dataExportName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, dataExportName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataExportName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes the specified data export in a given workspace.. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataExportName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataExportName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataExportName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Create or update a data export. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + dataExportName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataExportListResult + }, + default: { + bodyMapper: Mappers.DataExportErrorResponse + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataExportName1 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.DataExport + }, + 404: {}, + default: { + bodyMapper: Mappers.DataExportErrorResponse + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataExportName1 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 404: {}, + default: { + bodyMapper: Mappers.DataExportErrorResponse + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataExportName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DataExport, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.DataExport + }, + 201: { + bodyMapper: Mappers.DataExport + }, + default: { + bodyMapper: Mappers.DataExportErrorResponse + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts index 2ec14ba4b4c3..20305162d14e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts @@ -28,8 +28,8 @@ export class DataSources { /** * Create or update a data source. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName The name of the datasource resource. * @param parameters The parameters required to create or update a datasource. * @param [options] The optional parameters @@ -37,16 +37,16 @@ export class DataSources { */ createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceName: string, parameters: Models.DataSource, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName The name of the datasource resource. * @param parameters The parameters required to create or update a datasource. * @param callback The callback */ createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceName: string, parameters: Models.DataSource, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName The name of the datasource resource. * @param parameters The parameters required to create or update a datasource. * @param options The optional parameters @@ -68,23 +68,23 @@ export class DataSources { /** * Deletes a data source instance. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. * @param [options] The optional parameters * @returns Promise */ deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. * @param callback The callback */ deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource. * @param options The optional parameters * @param callback The callback @@ -104,23 +104,23 @@ export class DataSources { /** * Gets a datasource instance. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, workspaceName: string, dataSourceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource * @param callback The callback */ get(resourceGroupName: string, workspaceName: string, dataSourceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the datasource. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param dataSourceName Name of the datasource * @param options The optional parameters * @param callback The callback @@ -140,23 +140,23 @@ export class DataSources { /** * Gets the first page of data source instances in a workspace with the link to the next page. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The workspace that contains the data sources. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param filter The filter to apply on the operation. * @param [options] The optional parameters * @returns Promise */ listByWorkspace(resourceGroupName: string, workspaceName: string, filter: string, options?: Models.DataSourcesListByWorkspaceOptionalParams): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The workspace that contains the data sources. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param filter The filter to apply on the operation. * @param callback The callback */ listByWorkspace(resourceGroupName: string, workspaceName: string, filter: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The workspace that contains the data sources. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param filter The filter to apply on the operation. * @param options The optional parameters * @param callback The callback @@ -209,8 +209,8 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.dataSourceName, Parameters.subscriptionId ], @@ -245,8 +245,8 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.dataSourceName, Parameters.subscriptionId ], @@ -270,8 +270,8 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.dataSourceName, Parameters.subscriptionId ], @@ -296,8 +296,8 @@ const listByWorkspaceOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts new file mode 100644 index 000000000000..b6dff36141d2 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts @@ -0,0 +1,129 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/deletedWorkspacesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a DeletedWorkspaces. */ +export class DeletedWorkspaces { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a DeletedWorkspaces. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets recently deleted workspaces in a subscription, available for recovery. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Gets recently deleted workspaces in a resource group, available for recovery. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param [options] The optional parameters + * @returns Promise + */ + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param options The optional parameters + * @param callback The callback + */ + listByResourceGroup(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + options + }, + listByResourceGroupOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/deletedWorkspaces", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByResourceGroupOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/deletedWorkspaces", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts new file mode 100644 index 000000000000..e47561515ea9 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts @@ -0,0 +1,89 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Mappers from "../models/gatewaysMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a Gateways. */ +export class Gateways { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a Gateways. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Delete a Log Analytics gateway. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, gatewayId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, gatewayId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param gatewayId The Log Analytics gateway Id. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, gatewayId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, gatewayId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + gatewayId, + options + }, + deleteMethodOperationSpec, + callback); + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/gateways/{gatewayId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.gatewayId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts index bcfdc7b26a31..03aa768702fd 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts @@ -8,7 +8,21 @@ * regenerated. */ -export * from "./linkedServices"; +export * from "./dataExports"; export * from "./dataSources"; -export * from "./workspaces"; +export * from "./intelligencePacks"; +export * from "./linkedServices"; +export * from "./linkedStorageAccounts"; +export * from "./managementGroups"; export * from "./operations"; +export * from "./operationStatuses"; +export * from "./sharedKeysOperations"; +export * from "./usages"; +export * from "./workspaces"; +export * from "./deletedWorkspaces"; +export * from "./clusters"; +export * from "./storageInsightConfigs"; +export * from "./savedSearches"; +export * from "./gateways"; +export * from "./schema"; +export * from "./workspacePurge"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts new file mode 100644 index 000000000000..be569798e782 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts @@ -0,0 +1,219 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/intelligencePacksMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a IntelligencePacks. */ +export class IntelligencePacks { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a IntelligencePacks. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Disables an intelligence pack for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @param [options] The optional parameters + * @returns Promise + */ + disable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @param callback The callback + */ + disable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be disabled. + * @param options The optional parameters + * @param callback The callback + */ + disable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + disable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + intelligencePackName, + options + }, + disableOperationSpec, + callback); + } + + /** + * Enables an intelligence pack for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @param [options] The optional parameters + * @returns Promise + */ + enable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @param callback The callback + */ + enable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param intelligencePackName The name of the intelligence pack to be enabled. + * @param options The optional parameters + * @param callback The callback + */ + enable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + enable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + intelligencePackName, + options + }, + enableOperationSpec, + callback); + } + + /** + * Lists all the intelligence packs possible and whether they are enabled or disabled for a given + * workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const disableOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.intelligencePackName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const enableOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.intelligencePackName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "IntelligencePack" + } + } + } + } + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts index 4aba88b32c2d..b83b0ae15593 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts @@ -9,6 +9,7 @@ */ import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as Models from "../models"; import * as Mappers from "../models/linkedServicesMappers"; import * as Parameters from "../models/parameters"; @@ -28,108 +29,50 @@ export class LinkedServices { /** * Create or update a linked service. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linkedServices resource * @param parameters The parameters required to create or update a linked service. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices - * resource - * @param linkedServiceName Name of the linkedServices resource - * @param parameters The parameters required to create or update a linked service. - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that will contain the linkedServices - * resource - * @param linkedServiceName Name of the linkedServices resource - * @param parameters The parameters required to create or update a linked service. - * @param options The optional parameters - * @param callback The callback - */ - createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - linkedServiceName, - parameters, - options - }, - createOrUpdateOperationSpec, - callback) as Promise; + createOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,workspaceName,linkedServiceName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Deletes a linked service instance. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource - * @param linkedServiceName Name of the linked service. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource - * @param linkedServiceName Name of the linked service. - * @param options The optional parameters - * @param callback The callback + * @returns Promise */ - deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - linkedServiceName, - options - }, - deleteMethodOperationSpec, - callback); + deleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,linkedServiceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; } /** * Gets a linked service instance. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. * @param callback The callback */ get(resourceGroupName: string, workspaceName: string, linkedServiceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linkedServices - * resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param linkedServiceName Name of the linked service. * @param options The optional parameters * @param callback The callback @@ -149,21 +92,21 @@ export class LinkedServices { /** * Gets the linked services instances in a workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linked services. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param [options] The optional parameters * @returns Promise */ listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linked services. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param callback The callback */ listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace that contains the linked services. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param options The optional parameters * @param callback The callback */ @@ -178,16 +121,58 @@ export class LinkedServices { listByWorkspaceOperationSpec, callback) as Promise; } + + /** + * Create or update a linked service. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linkedServices resource + * @param parameters The parameters required to create or update a linked service. + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: Models.LinkedService, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + linkedServiceName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a linked service instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param linkedServiceName Name of the linked service. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + linkedServiceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const createOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.linkedServiceName, Parameters.subscriptionId ], @@ -197,20 +182,10 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.LinkedService, - required: true - } - }, responses: { 200: { bodyMapper: Mappers.LinkedService }, - 201: { - bodyMapper: Mappers.LinkedService - }, default: { bodyMapper: Mappers.CloudError } @@ -218,13 +193,12 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.linkedServiceName, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ @@ -234,8 +208,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.LinkedServiceListResult + }, default: { bodyMapper: Mappers.CloudError } @@ -243,12 +218,12 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.linkedServiceName, Parameters.subscriptionId ], @@ -258,10 +233,20 @@ const getOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LinkedService, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.LinkedService }, + 201: { + bodyMapper: Mappers.LinkedService + }, default: { bodyMapper: Mappers.CloudError } @@ -269,12 +254,13 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const listByWorkspaceOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.linkedServiceName, Parameters.subscriptionId ], queryParameters: [ @@ -285,8 +271,9 @@ const listByWorkspaceOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.LinkedServiceListResult + bodyMapper: Mappers.LinkedService }, + 204: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts new file mode 100644 index 000000000000..0c3a6e5e4332 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts @@ -0,0 +1,295 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/linkedStorageAccountsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a LinkedStorageAccounts. */ +export class LinkedStorageAccounts { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a LinkedStorageAccounts. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Create or Update a link relation between current workspace and a group of storage accounts of a + * specific data source type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param parameters The parameters required to create or update linked storage accounts. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, parameters: Models.LinkedStorageAccountsResource, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param parameters The parameters required to create or update linked storage accounts. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, parameters: Models.LinkedStorageAccountsResource, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param parameters The parameters required to create or update linked storage accounts. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, parameters: Models.LinkedStorageAccountsResource, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, parameters: Models.LinkedStorageAccountsResource, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataSourceType, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Deletes all linked storage accounts of a specific data source type associated with the specified + * workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataSourceType, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Gets all linked storage account of a specific data source type associated with the specified + * workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', + * 'AzureWatson' + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataSourceType, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets all linked storage accounts associated with the specified workspace, storage accounts will + * be sorted by their data source type. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataSourceType, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.LinkedStorageAccountsResource, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.LinkedStorageAccountsResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataSourceType, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.dataSourceType, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LinkedStorageAccountsResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.LinkedStorageAccountsListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts new file mode 100644 index 000000000000..ed62f7d12d9e --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managementGroupsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a ManagementGroups. */ +export class ManagementGroups { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a ManagementGroups. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of management groups connected to a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceListManagementGroupsResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts new file mode 100644 index 000000000000..72d394a84c97 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/operationStatusesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a OperationStatuses. */ +export class OperationStatuses { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a OperationStatuses. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Get the status of a long running azure asynchronous operation. + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param [options] The optional parameters + * @returns Promise + */ + get(location: string, asyncOperationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param callback The callback + */ + get(location: string, asyncOperationId: string, callback: msRest.ServiceCallback): void; + /** + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param options The optional parameters + * @param callback The callback + */ + get(location: string, asyncOperationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(location: string, asyncOperationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + location, + asyncOperationId, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}", + urlParameters: [ + Parameters.location, + Parameters.asyncOperationId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts new file mode 100644 index 000000000000..fbb704069419 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts @@ -0,0 +1,282 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/savedSearchesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a SavedSearches. */ +export class SavedSearches { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a SavedSearches. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Deletes the specified saved search in a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, savedSearchId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, savedSearchId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + savedSearchId, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Creates or updates a saved search for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, savedSearchId: string, parameters: Models.SavedSearch, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, savedSearchId: string, parameters: Models.SavedSearch, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param parameters The parameters required to save a search. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, savedSearchId: string, parameters: Models.SavedSearch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, workspaceName: string, savedSearchId: string, parameters: Models.SavedSearch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + savedSearchId, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets the specified saved search for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, savedSearchId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param savedSearchId The id of the saved search. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, savedSearchId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + savedSearchId, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets the saved searches for a given Log Analytics Workspace + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.savedSearchId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.savedSearchId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.SavedSearch, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.SavedSearch + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.savedSearchId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SavedSearch + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SavedSearchesListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts new file mode 100644 index 000000000000..b2e3fba87525 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/schemaMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a Schema. */ +export class Schema { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a Schema. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets the schema for a given workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + getOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SearchGetSchemaResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts new file mode 100644 index 000000000000..4aa5882712df --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts @@ -0,0 +1,145 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/sharedKeysOperationsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a SharedKeysOperations. */ +export class SharedKeysOperations { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a SharedKeysOperations. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets the shared keys for a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + getSharedKeys(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + getSharedKeys(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + getSharedKeys(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getSharedKeys(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + getSharedKeysOperationSpec, + callback) as Promise; + } + + /** + * Regenerates the shared keys for a Log Analytics Workspace. These keys are used to connect + * Microsoft Operational Insights agents to the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + regenerate(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + regenerate(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + regenerate(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + regenerate(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + regenerateOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getSharedKeysOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SharedKeys + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const regenerateOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/regenerateSharedKey", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.SharedKeys + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts new file mode 100644 index 000000000000..57e41f9aa542 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts @@ -0,0 +1,335 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/storageInsightConfigsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a StorageInsightConfigs. */ +export class StorageInsightConfigs { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a StorageInsightConfigs. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Create or update a storage insight. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, storageInsightName: string, parameters: Models.StorageInsight, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, storageInsightName: string, parameters: Models.StorageInsight, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param parameters The parameters required to create or update a storage insight. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, storageInsightName: string, parameters: Models.StorageInsight, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, workspaceName: string, storageInsightName: string, parameters: Models.StorageInsight, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + storageInsightName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; + } + + /** + * Gets a storage insight instance. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, storageInsightName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, storageInsightName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + storageInsightName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Deletes a storageInsightsConfigs resource + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, storageInsightName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param storageInsightName Name of the storageInsightsConfigs resource + * @param options The optional parameters + * @param callback The callback + */ + deleteMethod(resourceGroupName: string, workspaceName: string, storageInsightName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + storageInsightName, + options + }, + deleteMethodOperationSpec, + callback); + } + + /** + * Lists the storage insight instances within a workspace + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } + + /** + * Lists the storage insight instances within a workspace + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByWorkspaceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.storageInsightName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.StorageInsight, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.StorageInsight + }, + 201: { + bodyMapper: Mappers.StorageInsight + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.storageInsightName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageInsight + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.storageInsightName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageInsightListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.StorageInsightListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts new file mode 100644 index 000000000000..6e9f23fec48a --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/usagesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a Usages. */ +export class Usages { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a Usages. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets a list of usage metrics for a workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + list(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspaceListUsagesResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts new file mode 100644 index 000000000000..7d0f2a9ecce8 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts @@ -0,0 +1,173 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/workspacePurgeMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a WorkspacePurge. */ +export class WorkspacePurge { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a WorkspacePurge. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Purges data in an Log Analytics workspace by a set of user-defined filters. + * + * In order to manage system resources, purge requests are throttled at 50 requests per hour. You + * should batch the execution of purge requests by sending a single command whose predicate + * includes all user identities that require purging. Use the in operator to specify multiple + * identities. You should run the query prior to using for a purge request to verify that the + * results are expected. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics + * Workspace + * @param [options] The optional parameters + * @returns Promise + */ + purge(resourceGroupName: string, workspaceName: string, body: Models.WorkspacePurgeBody, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics + * Workspace + * @param callback The callback + */ + purge(resourceGroupName: string, workspaceName: string, body: Models.WorkspacePurgeBody, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param body Describes the body of a request to purge data in a single table of an Log Analytics + * Workspace + * @param options The optional parameters + * @param callback The callback + */ + purge(resourceGroupName: string, workspaceName: string, body: Models.WorkspacePurgeBody, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + purge(resourceGroupName: string, workspaceName: string, body: Models.WorkspacePurgeBody, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + body, + options + }, + purgeOperationSpec, + callback) as Promise; + } + + /** + * Gets status of an ongoing purge operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is + * returned. + * @param [options] The optional parameters + * @returns Promise + */ + getPurgeStatus(resourceGroupName: string, workspaceName: string, purgeId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is + * returned. + * @param callback The callback + */ + getPurgeStatus(resourceGroupName: string, workspaceName: string, purgeId: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param purgeId In a purge status request, this is the Id of the operation the status of which is + * returned. + * @param options The optional parameters + * @param callback The callback + */ + getPurgeStatus(resourceGroupName: string, workspaceName: string, purgeId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getPurgeStatus(resourceGroupName: string, workspaceName: string, purgeId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + purgeId, + options + }, + getPurgeStatusOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const purgeOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.workspaceName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "body", + mapper: { + ...Mappers.WorkspacePurgeBody, + required: true + } + }, + responses: { + 202: { + bodyMapper: Mappers.WorkspacePurgeResponse, + headersMapper: Mappers.WorkspacePurgePurgeHeaders + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getPurgeStatusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/operations/{purgeId}", + urlParameters: [ + Parameters.resourceGroupName, + Parameters.subscriptionId, + Parameters.workspaceName, + Parameters.purgeId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.WorkspacePurgeStatusResponse + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts index e06fc4746ca9..051bcb3cab07 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts @@ -28,220 +28,43 @@ export class Workspaces { } /** - * Disables an intelligence pack for a given workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be disabled. - * @param [options] The optional parameters - * @returns Promise - */ - disableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be disabled. - * @param callback The callback - */ - disableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be disabled. - * @param options The optional parameters - * @param callback The callback - */ - disableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - disableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - intelligencePackName, - options - }, - disableIntelligencePackOperationSpec, - callback); - } - - /** - * Enables an intelligence pack for a given workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be enabled. - * @param [options] The optional parameters - * @returns Promise - */ - enableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be enabled. - * @param callback The callback - */ - enableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param intelligencePackName The name of the intelligence pack to be enabled. - * @param options The optional parameters - * @param callback The callback - */ - enableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - enableIntelligencePack(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - intelligencePackName, - options - }, - enableIntelligencePackOperationSpec, - callback); - } - - /** - * Lists all the intelligence packs possible and whether they are enabled or disabled for a given - * workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param [options] The optional parameters - * @returns Promise - */ - listIntelligencePacks(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param callback The callback - */ - listIntelligencePacks(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param options The optional parameters - * @param callback The callback - */ - listIntelligencePacks(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listIntelligencePacks(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - options - }, - listIntelligencePacksOperationSpec, - callback) as Promise; - } - - /** - * Gets the shared keys for a workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param [options] The optional parameters - * @returns Promise - */ - getSharedKeys(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param callback The callback - */ - getSharedKeys(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName Name of the Log Analytics Workspace. - * @param options The optional parameters - * @param callback The callback - */ - getSharedKeys(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - getSharedKeys(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - options - }, - getSharedKeysOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of usage metrics for a workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param [options] The optional parameters - * @returns Promise - */ - listUsages(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param callback The callback - */ - listUsages(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param options The optional parameters - * @param callback The callback - */ - listUsages(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listUsages(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - options - }, - listUsagesOperationSpec, - callback) as Promise; - } - - /** - * Gets a list of management groups connected to a workspace. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. + * Gets the workspaces in a subscription. * @param [options] The optional parameters - * @returns Promise + * @returns Promise */ - listManagementGroups(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + list(options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. * @param callback The callback */ - listManagementGroups(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + list(callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @param workspaceName The name of the workspace. * @param options The optional parameters * @param callback The callback */ - listManagementGroups(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listManagementGroups(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { - resourceGroupName, - workspaceName, options }, - listManagementGroupsOperationSpec, - callback) as Promise; + listOperationSpec, + callback) as Promise; } /** * Gets workspaces in a resource group. - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param [options] The optional parameters * @returns Promise */ listByResourceGroup(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param callback The callback */ listByResourceGroup(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param options The optional parameters * @param callback The callback */ @@ -256,33 +79,9 @@ export class Workspaces { callback) as Promise; } - /** - * Gets the workspaces in a subscription. - * @param [options] The optional parameters - * @returns Promise - */ - list(options?: msRest.RequestOptionsBase): Promise; - /** - * @param callback The callback - */ - list(callback: msRest.ServiceCallback): void; - /** - * @param options The optional parameters - * @param callback The callback - */ - list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - options - }, - listOperationSpec, - callback) as Promise; - } - /** * Create or update a workspace. - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to create or update a workspace. * @param [options] The optional parameters @@ -294,54 +93,37 @@ export class Workspaces { } /** - * Deletes a workspace instance. - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in + * the same subscription, resource group and location. The name is kept for 14 days and cannot be + * used for another workspace. To remove the workspace completely and release the name, use the + * force flag. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param [options] The optional parameters * @returns Promise */ - deleteMethod(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; - /** - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; - /** - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. - * @param options The optional parameters - * @param callback The callback - */ - deleteMethod(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - deleteMethod(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - options - }, - deleteMethodOperationSpec, - callback); + deleteMethod(resourceGroupName: string, workspaceName: string, options?: Models.WorkspacesDeleteMethodOptionalParams): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); } /** * Gets a workspace instance. - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param callback The callback */ get(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The resource group name of the workspace. - * @param workspaceName Name of the Log Analytics Workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. * @param options The optional parameters * @param callback The callback */ @@ -359,29 +141,29 @@ export class Workspaces { /** * Updates a workspace. - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. * @param [options] The optional parameters * @returns Promise */ - update(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options?: msRest.RequestOptionsBase): Promise; + update(resourceGroupName: string, workspaceName: string, parameters: Models.WorkspacePatch, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. * @param callback The callback */ - update(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, workspaceName: string, parameters: Models.WorkspacePatch, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to patch a workspace. * @param options The optional parameters * @param callback The callback */ - update(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - update(resourceGroupName: string, workspaceName: string, parameters: Models.Workspace, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + update(resourceGroupName: string, workspaceName: string, parameters: Models.WorkspacePatch, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + update(resourceGroupName: string, workspaceName: string, parameters: Models.WorkspacePatch, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -393,9 +175,41 @@ export class Workspaces { callback) as Promise; } + /** + * Gets the available service tiers for the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + availableServiceTiers(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param callback The callback + */ + availableServiceTiers(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param options The optional parameters + * @param callback The callback + */ + availableServiceTiers(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + availableServiceTiers(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + availableServiceTiersOperationSpec, + callback) as Promise; + } + /** * Create or update a workspace. - * @param resourceGroupName The resource group name of the workspace. + * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param parameters The parameters required to create or update a workspace. * @param [options] The optional parameters @@ -412,150 +226,35 @@ export class Workspaces { beginCreateOrUpdateOperationSpec, options); } + + /** + * Deletes a workspace resource. To recover the workspace, create it again with the same name, in + * the same subscription, resource group and location. The name is kept for 14 days and cannot be + * used for another workspace. To remove the workspace completely and release the name, use the + * force flag. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, options?: Models.WorkspacesBeginDeleteMethodOptionalParams): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + options + }, + beginDeleteMethodOperationSpec, + options); + } } // Operation Specifications const serializer = new msRest.Serializer(Mappers); -const disableIntelligencePackOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.intelligencePackName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const enableIntelligencePackOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.intelligencePackName, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: {}, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listIntelligencePacksOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: { - serializedName: "parsedResponse", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "IntelligencePack" - } - } - } - } - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const getSharedKeysOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.SharedKeys - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listUsagesOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages", - urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion - ], - headerParameters: [ - Parameters.acceptLanguage - ], - responses: { - 200: { - bodyMapper: Mappers.WorkspaceListUsagesResult - }, - default: { - bodyMapper: Mappers.CloudError - } - }, - serializer -}; - -const listManagementGroupsOperationSpec: msRest.OperationSpec = { +const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups", + path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces", urlParameters: [ - Parameters.resourceGroupName0, - Parameters.workspaceName0, Parameters.subscriptionId ], queryParameters: [ @@ -566,7 +265,7 @@ const listManagementGroupsOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.WorkspaceListManagementGroupsResult + bodyMapper: Mappers.WorkspaceListResult }, default: { bodyMapper: Mappers.CloudError @@ -579,7 +278,7 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces", urlParameters: [ - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.subscriptionId ], queryParameters: [ @@ -599,10 +298,12 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { serializer }; -const listOperationSpec: msRest.OperationSpec = { +const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/workspaces", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", urlParameters: [ + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ @@ -613,7 +314,7 @@ const listOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.WorkspaceListResult + bodyMapper: Mappers.Workspace }, default: { bodyMapper: Mappers.CloudError @@ -622,12 +323,12 @@ const listOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const updateOperationSpec: msRest.OperationSpec = { + httpMethod: "PATCH", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", urlParameters: [ - Parameters.resourceGroupName1, - Parameters.workspaceName0, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ @@ -636,9 +337,17 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.WorkspacePatch, + required: true + } + }, responses: { - 200: {}, - 204: {}, + 200: { + bodyMapper: Mappers.Workspace + }, default: { bodyMapper: Mappers.CloudError } @@ -646,13 +355,13 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { +const availableServiceTiersOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", + path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers", urlParameters: [ - Parameters.resourceGroupName1, - Parameters.workspaceName0, - Parameters.subscriptionId + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName ], queryParameters: [ Parameters.apiVersion @@ -662,7 +371,18 @@ const getOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.Workspace + bodyMapper: { + serializedName: "parsedResponse", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "AvailableServiceTier" + } + } + } + } }, default: { bodyMapper: Mappers.CloudError @@ -671,12 +391,12 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const updateOperationSpec: msRest.OperationSpec = { - httpMethod: "PATCH", +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", urlParameters: [ - Parameters.resourceGroupName1, - Parameters.workspaceName1, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ @@ -696,6 +416,10 @@ const updateOperationSpec: msRest.OperationSpec = { 200: { bodyMapper: Mappers.Workspace }, + 201: { + bodyMapper: Mappers.Workspace + }, + 202: {}, default: { bodyMapper: Mappers.CloudError } @@ -703,34 +427,25 @@ const updateOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}", urlParameters: [ - Parameters.resourceGroupName1, - Parameters.workspaceName1, + Parameters.resourceGroupName, + Parameters.workspaceName, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion, + Parameters.force ], headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.Workspace, - required: true - } - }, responses: { - 200: { - bodyMapper: Mappers.Workspace - }, - 201: { - bodyMapper: Mappers.Workspace - }, + 200: {}, + 202: {}, + 204: {}, default: { bodyMapper: Mappers.CloudError } diff --git a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json +++ b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true