diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ab30db3a98b1..7f8abd3fcbaa 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -623,6 +623,21 @@ packages: - supports-color dev: false + /@azure/arm-operationalinsights/8.0.0: + resolution: {integrity: sha512-YYeOOCajQvqaK/boY8VYkGK0SX5k+QUUtDvRYfmQBBLVPbLHiM5PsoWkIrb/1GpRyl+E+KX0n1o+yZDWU7pPLQ==} + engines: {node: '>=12.0.0'} + dependencies: + '@azure/abort-controller': 1.0.4 + '@azure/core-auth': 1.3.2 + '@azure/core-client': 1.5.0 + '@azure/core-lro': 2.2.3 + '@azure/core-paging': 1.2.1 + '@azure/core-rest-pipeline': 1.6.0 + tslib: 2.3.1 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/communication-common/1.1.0: resolution: {integrity: sha512-vqTtzDtb4NG3LWoWoqlOOJApZRRIIImNUKlGyTa6c1YC+v5A7UEOL9TX8NRDxvFVUF2wDHsSnkhLBVBgkcAhIQ==} engines: {node: '>=12.0.0'} @@ -11539,11 +11554,12 @@ packages: dev: false file:projects/arm-monitor.tgz: - resolution: {integrity: sha512-sfxCB/Jzd3T1hg/Lzn8jowP0QgvNSmgZfMazqQo2T+t0tgCml2c8cwzscIhPcqt5meE/e6YirRLrCSt1AiS+8Q==, tarball: file:projects/arm-monitor.tgz} + resolution: {integrity: sha512-Pj32JFCXn7ec0HXGWjKEKXtlpQEhkt1/0QI1H5NNqLf6qS+JHFAD8C7sPQ6Q1oPikt8jcMUH6LzRqI2HhZCpIQ==, tarball: file:projects/arm-monitor.tgz} name: '@rush-temp/arm-monitor' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 + '@azure/arm-operationalinsights': 8.0.0 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.19.4 '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 @@ -11757,23 +11773,23 @@ packages: dev: false file:projects/arm-operationalinsights.tgz: - resolution: {integrity: sha512-r4oyapjF/4b7RKBAUXHEnuSNjfo8sZiD3na4lXZSMEEo7UhW8WYG/XkdQ6UwxKdICqdQnFfo9INzA/nM6tCJTg==, tarball: file:projects/arm-operationalinsights.tgz} + resolution: {integrity: sha512-SaZIFL2pBNA6KghabLeoeF8iVRDFD7S5zdRbj7J0cv41iKiEoB2IjzPCHElNoZZsubh2agw4OjtuQ/A7ymGAPg==, tarball: file:projects/arm-operationalinsights.tgz} name: '@rush-temp/arm-operationalinsights' version: 0.0.0 dependencies: '@azure-tools/test-recorder': 1.0.2 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.19.4 - '@rollup/plugin-commonjs': 21.0.2_rollup@2.70.0 - '@rollup/plugin-json': 4.1.0_rollup@2.70.0 - '@rollup/plugin-multi-entry': 3.0.1_rollup@2.70.0 - '@rollup/plugin-node-resolve': 8.4.0_rollup@2.70.0 + '@rollup/plugin-commonjs': 11.0.2_rollup@1.32.1 + '@rollup/plugin-json': 4.1.0_rollup@1.32.1 + '@rollup/plugin-multi-entry': 3.0.1_rollup@1.32.1 + '@rollup/plugin-node-resolve': 8.4.0_rollup@1.32.1 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 rimraf: 3.0.2 - rollup: 2.70.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@2.70.0 + rollup: 1.32.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.32.1 tslib: 2.3.1 typescript: 4.2.4 uglify-js: 3.15.2 diff --git a/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md b/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md index 241df1494951..f4d9cfc2279a 100644 --- a/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md +++ b/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md @@ -1,15 +1,111 @@ # Release History + +## 9.0.0 (2022-03-14) + +**Features** -## 8.0.1 (Unreleased) + - Added operation Tables.beginCreateOrUpdate + - Added operation Tables.beginCreateOrUpdateAndWait + - Added operation Tables.beginDelete + - Added operation Tables.beginDeleteAndWait + - Added operation Tables.beginUpdate + - Added operation Tables.beginUpdateAndWait + - Added operation Tables.migrate + - Added Interface Column + - Added Interface RestoredLogs + - Added Interface ResultStatistics + - Added Interface Schema + - Added Interface SearchResults + - Added Interface SystemData + - Added Interface TablesCreateOrUpdateOptionalParams + - Added Interface TablesDeleteOptionalParams + - Added Interface TablesMigrateOptionalParams + - Added Type Alias ColumnDataTypeHintEnum + - Added Type Alias ColumnTypeEnum + - Added Type Alias CreatedByType + - Added Type Alias ProvisioningStateEnum + - Added Type Alias SourceEnum + - Added Type Alias TablePlanEnum + - Added Type Alias TablesCreateOrUpdateResponse + - Added Type Alias TableSubTypeEnum + - Added Type Alias TableTypeEnum + - Interface OperationalInsightsManagementClientOptionalParams has a new optional parameter apiVersion + - Interface TablesUpdateOptionalParams has a new optional parameter resumeFrom + - Interface TablesUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Class OperationalInsightsManagementClient has a new parameter apiVersion + - Type Alias Table has a new parameter systemData + - Type Alias Table has a new parameter totalRetentionInDays + - Type Alias Table has a new parameter archiveRetentionInDays + - Type Alias Table has a new parameter searchResults + - Type Alias Table has a new parameter restoredLogs + - Type Alias Table has a new parameter resultStatistics + - Type Alias Table has a new parameter plan + - Type Alias Table has a new parameter lastPlanModifiedDate + - Type Alias Table has a new parameter schema + - Type Alias Table has a new parameter provisioningState + - Type Alias Workspace has a new parameter systemData + - Type Alias Workspace has a new parameter defaultDataCollectionRuleResourceId + - Type Alias WorkspacePatch has a new parameter defaultDataCollectionRuleResourceId + - Added Enum KnownColumnDataTypeHintEnum + - Added Enum KnownColumnTypeEnum + - Added Enum KnownCreatedByType + - Added Enum KnownProvisioningStateEnum + - Added Enum KnownSourceEnum + - Added Enum KnownTablePlanEnum + - Added Enum KnownTableSubTypeEnum + - Added Enum KnownTableTypeEnum -### Features Added - -### Breaking Changes - -### Bugs Fixed - -### Other Changes +**Breaking Changes** + - Removed operation group AvailableServiceTiers + - Removed operation group Clusters + - Removed operation group DataExports + - Removed operation group DataSources + - Removed operation group Gateways + - Removed operation group IntelligencePacks + - Removed operation group LinkedServices + - Removed operation group LinkedStorageAccounts + - Removed operation group ManagementGroups + - Removed operation group OperationStatuses + - Removed operation group SavedSearches + - Removed operation group Schema + - Removed operation group SharedKeysOperations + - Removed operation group StorageInsightConfigs + - Removed operation group Usages + - Removed operation group WorkspacePurge + - Removed operation Tables.create + - Removed operation Tables.update + - Class OperationalInsightsManagementClient no longer has parameter availableServiceTiers + - Class OperationalInsightsManagementClient no longer has parameter clusters + - Class OperationalInsightsManagementClient no longer has parameter dataExports + - Class OperationalInsightsManagementClient no longer has parameter dataSources + - Class OperationalInsightsManagementClient no longer has parameter gateways + - Class OperationalInsightsManagementClient no longer has parameter intelligencePacks + - Class OperationalInsightsManagementClient no longer has parameter linkedServices + - Class OperationalInsightsManagementClient no longer has parameter linkedStorageAccounts + - Class OperationalInsightsManagementClient no longer has parameter managementGroups + - Class OperationalInsightsManagementClient no longer has parameter operationStatuses + - Class OperationalInsightsManagementClient no longer has parameter savedSearches + - Class OperationalInsightsManagementClient no longer has parameter schema + - Class OperationalInsightsManagementClient no longer has parameter sharedKeysOperations + - Class OperationalInsightsManagementClient no longer has parameter storageInsightConfigs + - Class OperationalInsightsManagementClient no longer has parameter usages + - Class OperationalInsightsManagementClient no longer has parameter workspacePurge + - Type Alias Table no longer has parameter isTroubleshootingAllowed + - Type Alias Table no longer has parameter isTroubleshootEnabled + - Type Alias Table no longer has parameter lastTroubleshootDate + - Removed Enum KnownBillingType + - Removed Enum KnownClusterEntityStatus + - Removed Enum KnownClusterSkuNameEnum + - Removed Enum KnownDataSourceKind + - Removed Enum KnownLinkedServiceEntityStatus + - Removed Enum KnownPurgeState + - Removed Enum KnownSearchSortEnum + - Removed Enum KnownSkuNameEnum + - Removed Enum KnownStorageInsightState + - Removed Enum KnownType + + ## 8.0.0 (2021-12-14) The package of @azure/arm-operationalinsights is using our next generation design principles since version 8.0.0, which contains breaking changes. diff --git a/sdk/operationalinsights/arm-operationalinsights/LICENSE b/sdk/operationalinsights/arm-operationalinsights/LICENSE index ccb63b166732..5d1d36e0af80 100644 --- a/sdk/operationalinsights/arm-operationalinsights/LICENSE +++ b/sdk/operationalinsights/arm-operationalinsights/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 Microsoft +Copyright (c) 2022 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/_meta.json b/sdk/operationalinsights/arm-operationalinsights/_meta.json index bee68d8804c8..cc39ec3091bc 100644 --- a/sdk/operationalinsights/arm-operationalinsights/_meta.json +++ b/sdk/operationalinsights/arm-operationalinsights/_meta.json @@ -1,7 +1,8 @@ { - "commit": "ea0f7b072ad3aaff203ea9003246b9e584b819ff", + "commit": "9743c24031f2c6f7de48e9f9068a988a4477f5ea", "readme": "specification/operationalinsights/resource-manager/readme.md", - "autorest_command": "autorest --version=3.1.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=D:\\mydev\\azure-sdk-for-js ../azure-rest-api-specs/specification/operationalinsights/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20211207.1", + "autorest_command": "autorest --version=3.7.3 --typescript --modelerfour.lenient-model-deduplication --head-as-boolean=true --license-header=MICROSOFT_MIT_NO_VERSION --generate-test --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js ../azure-rest-api-specs/specification/operationalinsights/resource-manager/readme.md --use=@autorest/typescript@6.0.0-alpha.16.20220105.1", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "use": "@autorest/typescript@6.0.0-alpha.16.20211207.1" + "release_tool": "@azure-tools/js-sdk-release-tools@2.1.1", + "use": "@autorest/typescript@6.0.0-alpha.16.20220105.1" } \ No newline at end of file diff --git a/sdk/operationalinsights/arm-operationalinsights/api-extractor.json b/sdk/operationalinsights/arm-operationalinsights/api-extractor.json index 22d2bd212360..fe8e37dd3918 100644 --- a/sdk/operationalinsights/arm-operationalinsights/api-extractor.json +++ b/sdk/operationalinsights/arm-operationalinsights/api-extractor.json @@ -1,18 +1,31 @@ { "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", "mainEntryPointFilePath": "./dist-esm/src/index.d.ts", - "docModel": { "enabled": true }, - "apiReport": { "enabled": true, "reportFolder": "./review" }, + "docModel": { + "enabled": true + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, "dtsRollup": { "enabled": true, "untrimmedFilePath": "", "publicTrimmedFilePath": "./types/arm-operationalinsights.d.ts" }, "messages": { - "tsdocMessageReporting": { "default": { "logLevel": "none" } }, + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, "extractorMessageReporting": { - "ae-missing-release-tag": { "logLevel": "none" }, - "ae-unresolved-link": { "logLevel": "none" } + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } } } -} +} \ No newline at end of file diff --git a/sdk/operationalinsights/arm-operationalinsights/package.json b/sdk/operationalinsights/arm-operationalinsights/package.json index 0f42591043bb..3fe583b108f0 100644 --- a/sdk/operationalinsights/arm-operationalinsights/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/package.json @@ -3,7 +3,7 @@ "sdk-type": "mgmt", "author": "Microsoft Corporation", "description": "A generated SDK for OperationalInsightsManagementClient.", - "version": "8.0.1", + "version": "9.0.0", "engines": { "node": ">=12.0.0" }, @@ -29,12 +29,12 @@ "types": "./types/arm-operationalinsights.d.ts", "devDependencies": { "@microsoft/api-extractor": "^7.18.11", - "@rollup/plugin-commonjs": "^21.0.1", + "@rollup/plugin-commonjs": "11.0.2", "@rollup/plugin-json": "^4.0.0", "@rollup/plugin-multi-entry": "^3.0.0", "@rollup/plugin-node-resolve": "^8.0.0", "mkdirp": "^1.0.4", - "rollup": "^2.0.0", + "rollup": "^1.16.3", "rollup-plugin-sourcemaps": "^0.4.2", "typescript": "~4.2.0", "uglify-js": "^3.4.9", @@ -99,4 +99,4 @@ }, "sideEffects": false, "autoPublish": true -} +} \ No newline at end of file diff --git a/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md b/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md index 0f2b52d6a16b..0d1c525090b3 100644 --- a/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md +++ b/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md @@ -10,302 +10,37 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging'; import { PollerLike } from '@azure/core-lro'; import { PollOperationState } from '@azure/core-lro'; -// @public -export interface AssociatedWorkspace { - readonly associateDate?: string; - readonly resourceId?: string; - readonly workspaceId?: string; - readonly workspaceName?: string; -} - -// @public -export interface AvailableServiceTier { - readonly capacityReservationLevel?: number; - readonly defaultRetention?: number; - readonly enabled?: boolean; - readonly lastSkuUpdate?: string; - readonly maximumRetention?: number; - readonly minimumRetention?: number; - readonly serviceTier?: SkuNameEnum; -} - -// @public -export interface AvailableServiceTiers { - listByWorkspace(resourceGroupName: string, workspaceName: string, options?: AvailableServiceTiersListByWorkspaceOptionalParams): Promise; -} - -// @public -export interface AvailableServiceTiersListByWorkspaceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type AvailableServiceTiersListByWorkspaceResponse = AvailableServiceTier[]; - // @public export type AzureEntityResource = Resource & { readonly etag?: string; }; -// @public -export type BillingType = string; - -// @public -export type Capacity = 500 | 1000 | 2000 | 5000; - // @public export type CapacityReservationLevel = 100 | 200 | 300 | 400 | 500 | 1000 | 2000 | 5000; // @public -export interface CapacityReservationProperties { - readonly lastSkuUpdate?: string; - readonly minCapacity?: number; -} - -// @public -export type Cluster = TrackedResource & { - identity?: Identity; - sku?: ClusterSku; - readonly clusterId?: string; - readonly provisioningState?: ClusterEntityStatus; - isDoubleEncryptionEnabled?: boolean; - isAvailabilityZonesEnabled?: boolean; - billingType?: BillingType; - keyVaultProperties?: KeyVaultProperties; - readonly lastModifiedDate?: string; - readonly createdDate?: string; - associatedWorkspaces?: AssociatedWorkspace[]; - capacityReservationProperties?: CapacityReservationProperties; -}; - -// @public -export type ClusterEntityStatus = string; - -// @public -export interface ClusterListResult { - nextLink?: string; - value?: Cluster[]; -} - -// @public -export interface ClusterPatch { - billingType?: BillingType; - identity?: Identity; - keyVaultProperties?: KeyVaultProperties; - sku?: ClusterSku; - tags?: { - [propertyName: string]: string; - }; -} - -// @public -export interface Clusters { - beginCreateOrUpdate(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise, ClustersCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, clusterName: string, parameters: Cluster, options?: ClustersCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise, void>>; - beginDeleteAndWait(resourceGroupName: string, clusterName: string, options?: ClustersDeleteOptionalParams): Promise; - beginUpdate(resourceGroupName: string, clusterName: string, parameters: ClusterPatch, options?: ClustersUpdateOptionalParams): Promise, ClustersUpdateResponse>>; - beginUpdateAndWait(resourceGroupName: string, clusterName: string, parameters: ClusterPatch, options?: ClustersUpdateOptionalParams): Promise; - get(resourceGroupName: string, clusterName: string, options?: ClustersGetOptionalParams): Promise; - list(options?: ClustersListOptionalParams): PagedAsyncIterableIterator; - listByResourceGroup(resourceGroupName: string, options?: ClustersListByResourceGroupOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface ClustersCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ClustersCreateOrUpdateResponse = Cluster; - -// @public -export interface ClustersDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export interface ClustersGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersGetResponse = Cluster; - -// @public -export interface ClusterSku { - capacity?: Capacity; - name?: ClusterSkuNameEnum; -} - -// @public -export type ClusterSkuNameEnum = string; - -// @public -export interface ClustersListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersListByResourceGroupNextResponse = ClusterListResult; - -// @public -export interface ClustersListByResourceGroupOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersListByResourceGroupResponse = ClusterListResult; - -// @public -export interface ClustersListNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersListNextResponse = ClusterListResult; - -// @public -export interface ClustersListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type ClustersListResponse = ClusterListResult; - -// @public -export interface ClustersUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type ClustersUpdateResponse = Cluster; - -// @public -export interface CoreSummary { - numberOfDocuments: number; - status?: string; -} - -// @public -export type DataExport = ProxyResource & { - dataExportId?: string; - tableNames?: string[]; - enable?: boolean; - createdDate?: string; - lastModifiedDate?: string; - resourceId?: string; - readonly typePropertiesDestinationType?: Type; - eventHubName?: string; -}; - -// @public -export interface DataExportListResult { - value?: DataExport[]; -} - -// @public -export interface DataExports { - createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: DataExport, options?: DataExportsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: DataExportsDeleteOptionalParams): Promise; - get(resourceGroupName: string, workspaceName: string, dataExportName: string, options?: DataExportsGetOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, workspaceName: string, options?: DataExportsListByWorkspaceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface DataExportsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataExportsCreateOrUpdateResponse = DataExport; - -// @public -export interface DataExportsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface DataExportsGetOptionalParams extends coreClient.OperationOptions { +export interface Column { + dataTypeHint?: ColumnDataTypeHintEnum; + description?: string; + displayName?: string; + readonly isDefaultDisplay?: boolean; + readonly isHidden?: boolean; + name?: string; + type?: ColumnTypeEnum; } // @public -export type DataExportsGetResponse = DataExport; +export type ColumnDataTypeHintEnum = string; // @public -export interface DataExportsListByWorkspaceOptionalParams extends coreClient.OperationOptions { -} +export type ColumnTypeEnum = string; // @public -export type DataExportsListByWorkspaceResponse = DataExportListResult; +export type CreatedByType = string; // @public export type DataIngestionStatus = string; -// @public -export type DataSource = ProxyResource & { - properties: Record; - etag?: string; - kind: DataSourceKind; - tags?: { - [propertyName: string]: string; - }; -}; - -// @public -export interface DataSourceFilter { - kind?: DataSourceKind; -} - -// @public -export type DataSourceKind = string; - -// @public -export interface DataSourceListResult { - nextLink?: string; - value?: DataSource[]; -} - -// @public -export interface DataSources { - createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceName: string, parameters: DataSource, options?: DataSourcesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, workspaceName: string, dataSourceName: string, options?: DataSourcesDeleteOptionalParams): Promise; - get(resourceGroupName: string, workspaceName: string, dataSourceName: string, options?: DataSourcesGetOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, workspaceName: string, filter: string, options?: DataSourcesListByWorkspaceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface DataSourcesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataSourcesCreateOrUpdateResponse = DataSource; - -// @public -export interface DataSourcesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface DataSourcesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type DataSourcesGetResponse = DataSource; - -// @public -export interface DataSourcesListByWorkspaceNextOptionalParams extends coreClient.OperationOptions { - skiptoken?: string; -} - -// @public -export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult; - -// @public -export interface DataSourcesListByWorkspaceOptionalParams extends coreClient.OperationOptions { - skiptoken?: string; -} - -// @public -export type DataSourcesListByWorkspaceResponse = DataSourceListResult; - -// @public -export type DataSourceType = "CustomLogs" | "AzureWatson" | "Query" | "Alerts"; - // @public export interface DeletedWorkspaces { list(options?: DeletedWorkspacesListOptionalParams): PagedAsyncIterableIterator; @@ -347,414 +82,131 @@ export interface ErrorResponse { } // @public -export interface Gateways { - delete(resourceGroupName: string, workspaceName: string, gatewayId: string, options?: GatewaysDeleteOptionalParams): Promise; -} - -// @public -export interface GatewaysDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface Identity { - readonly principalId?: string; - readonly tenantId?: string; - type: IdentityType; - userAssignedIdentities?: { - [propertyName: string]: UserIdentityProperties; - }; -} - -// @public -export type IdentityType = "SystemAssigned" | "UserAssigned" | "None"; - -// @public -export interface IntelligencePack { - displayName?: string; - enabled?: boolean; - name?: string; -} - -// @public -export interface IntelligencePacks { - disable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: IntelligencePacksDisableOptionalParams): Promise; - enable(resourceGroupName: string, workspaceName: string, intelligencePackName: string, options?: IntelligencePacksEnableOptionalParams): Promise; - list(resourceGroupName: string, workspaceName: string, options?: IntelligencePacksListOptionalParams): Promise; -} - -// @public -export interface IntelligencePacksDisableOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface IntelligencePacksEnableOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface IntelligencePacksListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type IntelligencePacksListResponse = IntelligencePack[]; - -// @public -export interface KeyVaultProperties { - keyName?: string; - keyRsaSize?: number; - keyVaultUri?: string; - keyVersion?: string; +export enum KnownColumnDataTypeHintEnum { + ArmPath = "armPath", + Guid = "guid", + Ip = "ip", + Uri = "uri" } // @public -export enum KnownBillingType { +export enum KnownColumnTypeEnum { // (undocumented) - Cluster = "Cluster", + Boolean = "boolean", // (undocumented) - Workspaces = "Workspaces" -} - -// @public -export enum KnownClusterEntityStatus { + DateTime = "dateTime", // (undocumented) - Canceled = "Canceled", + Dynamic = "dynamic", // (undocumented) - Creating = "Creating", + Guid = "guid", // (undocumented) - Deleting = "Deleting", - // (undocumented) - Failed = "Failed", - // (undocumented) - ProvisioningAccount = "ProvisioningAccount", - // (undocumented) - Succeeded = "Succeeded", - // (undocumented) - Updating = "Updating" -} - -// @public -export enum KnownClusterSkuNameEnum { - // (undocumented) - CapacityReservation = "CapacityReservation" -} - -// @public -export enum KnownDataIngestionStatus { - ApproachingQuota = "ApproachingQuota", - ForceOff = "ForceOff", - ForceOn = "ForceOn", - OverQuota = "OverQuota", - RespectQuota = "RespectQuota", - SubscriptionSuspended = "SubscriptionSuspended" -} - -// @public -export enum KnownDataSourceKind { - // (undocumented) - ApplicationInsights = "ApplicationInsights", - // (undocumented) - AzureActivityLog = "AzureActivityLog", - // (undocumented) - AzureAuditLog = "AzureAuditLog", - // (undocumented) - ChangeTrackingContentLocation = "ChangeTrackingContentLocation", - // (undocumented) - ChangeTrackingCustomPath = "ChangeTrackingCustomPath", - // (undocumented) - ChangeTrackingDataTypeConfiguration = "ChangeTrackingDataTypeConfiguration", - // (undocumented) - ChangeTrackingDefaultRegistry = "ChangeTrackingDefaultRegistry", - // (undocumented) - ChangeTrackingLinuxPath = "ChangeTrackingLinuxPath", - // (undocumented) - ChangeTrackingPath = "ChangeTrackingPath", - // (undocumented) - ChangeTrackingRegistry = "ChangeTrackingRegistry", - // (undocumented) - ChangeTrackingServices = "ChangeTrackingServices", - // (undocumented) - CustomLog = "CustomLog", - // (undocumented) - CustomLogCollection = "CustomLogCollection", - // (undocumented) - DnsAnalytics = "DnsAnalytics", - // (undocumented) - GenericDataSource = "GenericDataSource", - // (undocumented) - IISLogs = "IISLogs", - // (undocumented) - ImportComputerGroup = "ImportComputerGroup", - // (undocumented) - Itsm = "Itsm", - // (undocumented) - LinuxChangeTrackingPath = "LinuxChangeTrackingPath", - // (undocumented) - LinuxPerformanceCollection = "LinuxPerformanceCollection", - // (undocumented) - LinuxPerformanceObject = "LinuxPerformanceObject", - // (undocumented) - LinuxSyslog = "LinuxSyslog", - // (undocumented) - LinuxSyslogCollection = "LinuxSyslogCollection", - // (undocumented) - NetworkMonitoring = "NetworkMonitoring", - // (undocumented) - Office365 = "Office365", - // (undocumented) - SecurityCenterSecurityWindowsBaselineConfiguration = "SecurityCenterSecurityWindowsBaselineConfiguration", - // (undocumented) - SecurityEventCollectionConfiguration = "SecurityEventCollectionConfiguration", - // (undocumented) - SecurityInsightsSecurityEventCollectionConfiguration = "SecurityInsightsSecurityEventCollectionConfiguration", - // (undocumented) - SecurityWindowsBaselineConfiguration = "SecurityWindowsBaselineConfiguration", - // (undocumented) - SqlDataClassification = "SqlDataClassification", - // (undocumented) - WindowsEvent = "WindowsEvent", - // (undocumented) - WindowsPerformanceCounter = "WindowsPerformanceCounter", - // (undocumented) - WindowsTelemetry = "WindowsTelemetry" -} - -// @public -export enum KnownLinkedServiceEntityStatus { - // (undocumented) - Deleting = "Deleting", - // (undocumented) - ProvisioningAccount = "ProvisioningAccount", - // (undocumented) - Succeeded = "Succeeded", - // (undocumented) - Updating = "Updating" -} - -// @public -export enum KnownPublicNetworkAccessType { - Disabled = "Disabled", - Enabled = "Enabled" -} - -// @public -export enum KnownPurgeState { - // (undocumented) - Completed = "completed", - // (undocumented) - Pending = "pending" -} - -// @public -export enum KnownSearchSortEnum { - // (undocumented) - Asc = "asc", - // (undocumented) - Desc = "desc" -} - -// @public -export enum KnownSkuNameEnum { - // (undocumented) - CapacityReservation = "CapacityReservation", - // (undocumented) - Free = "Free", - // (undocumented) - PerGB2018 = "PerGB2018", + Int = "int", // (undocumented) - PerNode = "PerNode", - // (undocumented) - Premium = "Premium", - // (undocumented) - Standalone = "Standalone", - // (undocumented) - Standard = "Standard" -} - -// @public -export enum KnownStorageInsightState { - // (undocumented) - Error = "ERROR", - // (undocumented) - OK = "OK" -} - -// @public -export enum KnownType { - // (undocumented) - EventHub = "EventHub", - // (undocumented) - StorageAccount = "StorageAccount" -} - -// @public -export enum KnownWorkspaceEntityStatus { - // (undocumented) - Canceled = "Canceled", - // (undocumented) - Creating = "Creating", - // (undocumented) - Deleting = "Deleting", - // (undocumented) - Failed = "Failed", - // (undocumented) - ProvisioningAccount = "ProvisioningAccount", + Long = "long", // (undocumented) - Succeeded = "Succeeded", + Real = "real", // (undocumented) - Updating = "Updating" + String = "string" } // @public -export enum KnownWorkspaceSkuNameEnum { - // (undocumented) - CapacityReservation = "CapacityReservation", +export enum KnownCreatedByType { // (undocumented) - Free = "Free", - // (undocumented) - LACluster = "LACluster", - // (undocumented) - PerGB2018 = "PerGB2018", - // (undocumented) - PerNode = "PerNode", + Application = "Application", // (undocumented) - Premium = "Premium", + Key = "Key", // (undocumented) - Standalone = "Standalone", + ManagedIdentity = "ManagedIdentity", // (undocumented) - Standard = "Standard" -} - -// @public -export type LinkedService = ProxyResource & { - tags?: { - [propertyName: string]: string; - }; - resourceId?: string; - writeAccessResourceId?: string; - provisioningState?: LinkedServiceEntityStatus; -}; - -// @public -export type LinkedServiceEntityStatus = string; - -// @public -export interface LinkedServiceListResult { - value?: LinkedService[]; -} - -// @public -export interface LinkedServices { - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: LinkedService, options?: LinkedServicesCreateOrUpdateOptionalParams): Promise, LinkedServicesCreateOrUpdateResponse>>; - beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, linkedServiceName: string, parameters: LinkedService, options?: LinkedServicesCreateOrUpdateOptionalParams): Promise; - beginDelete(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: LinkedServicesDeleteOptionalParams): Promise, LinkedServicesDeleteResponse>>; - beginDeleteAndWait(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: LinkedServicesDeleteOptionalParams): Promise; - get(resourceGroupName: string, workspaceName: string, linkedServiceName: string, options?: LinkedServicesGetOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, workspaceName: string, options?: LinkedServicesListByWorkspaceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface LinkedServicesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LinkedServicesCreateOrUpdateResponse = LinkedService; - -// @public -export interface LinkedServicesDeleteOptionalParams extends coreClient.OperationOptions { - resumeFrom?: string; - updateIntervalInMs?: number; -} - -// @public -export type LinkedServicesDeleteResponse = LinkedService; - -// @public -export interface LinkedServicesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LinkedServicesGetResponse = LinkedService; - -// @public -export interface LinkedServicesListByWorkspaceOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult; - -// @public -export interface LinkedStorageAccounts { - createOrUpdate(resourceGroupName: string, workspaceName: string, dataSourceType: DataSourceType, parameters: LinkedStorageAccountsResource, options?: LinkedStorageAccountsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, workspaceName: string, dataSourceType: DataSourceType, options?: LinkedStorageAccountsDeleteOptionalParams): Promise; - get(resourceGroupName: string, workspaceName: string, dataSourceType: DataSourceType, options?: LinkedStorageAccountsGetOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, workspaceName: string, options?: LinkedStorageAccountsListByWorkspaceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface LinkedStorageAccountsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type LinkedStorageAccountsCreateOrUpdateResponse = LinkedStorageAccountsResource; - -// @public -export interface LinkedStorageAccountsDeleteOptionalParams extends coreClient.OperationOptions { + User = "User" } // @public -export interface LinkedStorageAccountsGetOptionalParams extends coreClient.OperationOptions { +export enum KnownDataIngestionStatus { + ApproachingQuota = "ApproachingQuota", + ForceOff = "ForceOff", + ForceOn = "ForceOn", + OverQuota = "OverQuota", + RespectQuota = "RespectQuota", + SubscriptionSuspended = "SubscriptionSuspended" } // @public -export type LinkedStorageAccountsGetResponse = LinkedStorageAccountsResource; - -// @public -export interface LinkedStorageAccountsListByWorkspaceOptionalParams extends coreClient.OperationOptions { +export enum KnownProvisioningStateEnum { + InProgress = "InProgress", + Succeeded = "Succeeded", + Updating = "Updating" } // @public -export type LinkedStorageAccountsListByWorkspaceResponse = LinkedStorageAccountsListResult; - -// @public -export interface LinkedStorageAccountsListResult { - value?: LinkedStorageAccountsResource[]; +export enum KnownPublicNetworkAccessType { + Disabled = "Disabled", + Enabled = "Enabled" } // @public -export type LinkedStorageAccountsResource = ProxyResource & { - readonly dataSourceType?: DataSourceType; - storageAccountIds?: string[]; -}; +export enum KnownSourceEnum { + Customer = "customer", + Microsoft = "microsoft" +} // @public -export interface ManagementGroup { - created?: Date; - dataReceived?: Date; - id?: string; - isGateway?: boolean; - name?: string; - serverCount?: number; - sku?: string; - version?: string; +export enum KnownTablePlanEnum { + Analytics = "Analytics", + Basic = "Basic" } // @public -export interface ManagementGroups { - list(resourceGroupName: string, workspaceName: string, options?: ManagementGroupsListOptionalParams): PagedAsyncIterableIterator; +export enum KnownTableSubTypeEnum { + Any = "Any", + Classic = "Classic", + DataCollectionRuleBased = "DataCollectionRuleBased" } // @public -export interface ManagementGroupsListOptionalParams extends coreClient.OperationOptions { +export enum KnownTableTypeEnum { + CustomLog = "CustomLog", + Microsoft = "Microsoft", + RestoredLogs = "RestoredLogs", + SearchResults = "SearchResults" } // @public -export type ManagementGroupsListResponse = WorkspaceListManagementGroupsResult; +export enum KnownWorkspaceEntityStatus { + // (undocumented) + Canceled = "Canceled", + // (undocumented) + Creating = "Creating", + // (undocumented) + Deleting = "Deleting", + // (undocumented) + Failed = "Failed", + // (undocumented) + ProvisioningAccount = "ProvisioningAccount", + // (undocumented) + Succeeded = "Succeeded", + // (undocumented) + Updating = "Updating" +} // @public -export interface MetricName { - localizedValue?: string; - value?: string; +export enum KnownWorkspaceSkuNameEnum { + // (undocumented) + CapacityReservation = "CapacityReservation", + // (undocumented) + Free = "Free", + // (undocumented) + LACluster = "LACluster", + // (undocumented) + PerGB2018 = "PerGB2018", + // (undocumented) + PerNode = "PerNode", + // (undocumented) + Premium = "Premium", + // (undocumented) + Standalone = "Standalone", + // (undocumented) + Standard = "Standard" } // @public @@ -769,52 +221,23 @@ export class OperationalInsightsManagementClient extends coreClient.ServiceClien $host: string; constructor(credentials: coreAuth.TokenCredential, subscriptionId: string, options?: OperationalInsightsManagementClientOptionalParams); // (undocumented) - availableServiceTiers: AvailableServiceTiers; - // (undocumented) - clusters: Clusters; - // (undocumented) - dataExports: DataExports; - // (undocumented) - dataSources: DataSources; + apiVersion: string; // (undocumented) deletedWorkspaces: DeletedWorkspaces; // (undocumented) - gateways: Gateways; - // (undocumented) - intelligencePacks: IntelligencePacks; - // (undocumented) - linkedServices: LinkedServices; - // (undocumented) - linkedStorageAccounts: LinkedStorageAccounts; - // (undocumented) - managementGroups: ManagementGroups; - // (undocumented) operations: Operations; // (undocumented) - operationStatuses: OperationStatuses; - // (undocumented) - savedSearches: SavedSearches; - // (undocumented) - schema: Schema; - // (undocumented) - sharedKeysOperations: SharedKeysOperations; - // (undocumented) - storageInsightConfigs: StorageInsightConfigs; - // (undocumented) subscriptionId: string; // (undocumented) tables: Tables; // (undocumented) - usages: Usages; - // (undocumented) - workspacePurge: WorkspacePurge; - // (undocumented) workspaces: Workspaces; } // @public export interface OperationalInsightsManagementClientOptionalParams extends coreClient.ServiceClientOptions { $host?: string; + apiVersion?: string; endpoint?: string; } @@ -851,28 +274,6 @@ export interface OperationsListOptionalParams extends coreClient.OperationOption // @public export type OperationsListResponse = OperationListResult; -// @public -export interface OperationStatus { - endTime?: string; - error?: ErrorResponse; - id?: string; - name?: string; - startTime?: string; - status?: string; -} - -// @public -export interface OperationStatuses { - get(location: string, asyncOperationId: string, options?: OperationStatusesGetOptionalParams): Promise; -} - -// @public -export interface OperationStatusesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type OperationStatusesGetResponse = OperationStatus; - // @public export interface PrivateLinkScopedResource { resourceId?: string; @@ -880,13 +281,13 @@ export interface PrivateLinkScopedResource { } // @public -export type ProxyResource = Resource & {}; +export type ProvisioningStateEnum = string; // @public -export type PublicNetworkAccessType = string; +export type ProxyResource = Resource & {}; // @public -export type PurgeState = string; +export type PublicNetworkAccessType = string; // @public export interface Resource { @@ -896,244 +297,103 @@ export interface Resource { } // @public -export type SavedSearch = ProxyResource & { - etag?: string; - category: string; - displayName: string; - query: string; - functionAlias?: string; - functionParameters?: string; - version?: number; - tags?: Tag[]; -}; - -// @public -export interface SavedSearches { - createOrUpdate(resourceGroupName: string, workspaceName: string, savedSearchId: string, parameters: SavedSearch, options?: SavedSearchesCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: SavedSearchesDeleteOptionalParams): Promise; - get(resourceGroupName: string, workspaceName: string, savedSearchId: string, options?: SavedSearchesGetOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, workspaceName: string, options?: SavedSearchesListByWorkspaceOptionalParams): Promise; -} - -// @public -export interface SavedSearchesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SavedSearchesCreateOrUpdateResponse = SavedSearch; - -// @public -export interface SavedSearchesDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface SavedSearchesGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SavedSearchesGetResponse = SavedSearch; - -// @public -export interface SavedSearchesListByWorkspaceOptionalParams extends coreClient.OperationOptions { +export interface RestoredLogs { + endRestoreTime?: Date; + sourceTable?: string; + startRestoreTime?: Date; } // @public -export type SavedSearchesListByWorkspaceResponse = SavedSearchesListResult; - -// @public -export interface SavedSearchesListResult { - value?: SavedSearch[]; +export interface ResultStatistics { + readonly ingestedRecords?: number; + readonly progress?: number; } // @public export interface Schema { - get(resourceGroupName: string, workspaceName: string, options?: SchemaGetOptionalParams): Promise; -} - -// @public -export interface SchemaGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SchemaGetResponse = SearchGetSchemaResponse; - -// @public -export interface SearchGetSchemaResponse { - metadata?: SearchMetadata; - value?: SearchSchemaValue[]; -} - -// @public -export interface SearchMetadata { - aggregatedGroupingFields?: string; - aggregatedValueField?: string; - coreSummaries?: CoreSummary[]; - eTag?: string; - id?: string; - lastUpdated?: Date; - max?: number; - requestTime?: number; - resultType?: string; - schema?: SearchMetadataSchema; - searchId?: string; - sort?: SearchSort[]; - startTime?: Date; - status?: string; - sum?: number; - top?: number; - total?: number; -} - -// @public -export interface SearchMetadataSchema { - name?: string; - version?: number; -} - -// @public -export interface SearchSchemaValue { + readonly categories?: string[]; + columns?: Column[]; + description?: string; displayName?: string; - facet: boolean; - indexed: boolean; - name?: string; - ownerType?: string[]; - stored: boolean; - type?: string; -} - -// @public -export interface SearchSort { + readonly labels?: string[]; name?: string; - order?: SearchSortEnum; -} - -// @public -export type SearchSortEnum = string; - -// @public -export interface SharedKeys { - primarySharedKey?: string; - secondarySharedKey?: string; -} - -// @public -export interface SharedKeysGetSharedKeysOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SharedKeysGetSharedKeysResponse = SharedKeys; - -// @public -export interface SharedKeysOperations { - getSharedKeys(resourceGroupName: string, workspaceName: string, options?: SharedKeysGetSharedKeysOptionalParams): Promise; - regenerate(resourceGroupName: string, workspaceName: string, options?: SharedKeysRegenerateOptionalParams): Promise; -} - -// @public -export interface SharedKeysRegenerateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type SharedKeysRegenerateResponse = SharedKeys; - -// @public -export type SkuNameEnum = string; - -// @public -export interface StorageAccount { - id: string; - key: string; -} - -// @public -export type StorageInsight = ProxyResource & { - eTag?: string; - tags?: { - [propertyName: string]: string; - }; - containers?: string[]; - tables?: string[]; - storageAccount?: StorageAccount; - readonly status?: StorageInsightStatus; -}; - -// @public -export interface StorageInsightConfigs { - createOrUpdate(resourceGroupName: string, workspaceName: string, storageInsightName: string, parameters: StorageInsight, options?: StorageInsightConfigsCreateOrUpdateOptionalParams): Promise; - delete(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: StorageInsightConfigsDeleteOptionalParams): Promise; - get(resourceGroupName: string, workspaceName: string, storageInsightName: string, options?: StorageInsightConfigsGetOptionalParams): Promise; - listByWorkspace(resourceGroupName: string, workspaceName: string, options?: StorageInsightConfigsListByWorkspaceOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface StorageInsightConfigsCreateOrUpdateOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StorageInsightConfigsCreateOrUpdateResponse = StorageInsight; - -// @public -export interface StorageInsightConfigsDeleteOptionalParams extends coreClient.OperationOptions { -} - -// @public -export interface StorageInsightConfigsGetOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StorageInsightConfigsGetResponse = StorageInsight; - -// @public -export interface StorageInsightConfigsListByWorkspaceNextOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type StorageInsightConfigsListByWorkspaceNextResponse = StorageInsightListResult; - -// @public -export interface StorageInsightConfigsListByWorkspaceOptionalParams extends coreClient.OperationOptions { + readonly restoredLogs?: RestoredLogs; + readonly searchResults?: SearchResults; + readonly solutions?: string[]; + readonly source?: SourceEnum; + readonly standardColumns?: Column[]; + readonly tableSubType?: TableSubTypeEnum; + readonly tableType?: TableTypeEnum; } // @public -export type StorageInsightConfigsListByWorkspaceResponse = StorageInsightListResult; - -// @public -export interface StorageInsightListResult { - odataNextLink?: string; - value?: StorageInsight[]; +export interface SearchResults { + description?: string; + endSearchTime?: Date; + limit?: number; + query?: string; + readonly sourceTable?: string; + startSearchTime?: Date; } // @public -export type StorageInsightState = string; +export type SourceEnum = string; // @public -export interface StorageInsightStatus { - description?: string; - state: StorageInsightState; +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; } // @public export type Table = ProxyResource & { + readonly systemData?: SystemData; retentionInDays?: number; - readonly isTroubleshootingAllowed?: boolean; - isTroubleshootEnabled?: boolean; - readonly lastTroubleshootDate?: string; + totalRetentionInDays?: number; + readonly archiveRetentionInDays?: number; + searchResults?: SearchResults; + restoredLogs?: RestoredLogs; + resultStatistics?: ResultStatistics; + plan?: TablePlanEnum; + readonly lastPlanModifiedDate?: string; + schema?: Schema; + readonly provisioningState?: ProvisioningStateEnum; }; +// @public +export type TablePlanEnum = string; + // @public export interface Tables { - create(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesCreateOptionalParams): Promise; + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesCreateOrUpdateOptionalParams): Promise, TablesCreateOrUpdateResponse>>; + beginCreateOrUpdateAndWait(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesCreateOrUpdateOptionalParams): Promise; + beginDelete(resourceGroupName: string, workspaceName: string, tableName: string, options?: TablesDeleteOptionalParams): Promise, void>>; + beginDeleteAndWait(resourceGroupName: string, workspaceName: string, tableName: string, options?: TablesDeleteOptionalParams): Promise; + beginUpdate(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesUpdateOptionalParams): Promise, TablesUpdateResponse>>; + beginUpdateAndWait(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesUpdateOptionalParams): Promise; get(resourceGroupName: string, workspaceName: string, tableName: string, options?: TablesGetOptionalParams): Promise; listByWorkspace(resourceGroupName: string, workspaceName: string, options?: TablesListByWorkspaceOptionalParams): PagedAsyncIterableIterator; - update(resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesUpdateOptionalParams): Promise; + migrate(resourceGroupName: string, workspaceName: string, tableName: string, options?: TablesMigrateOptionalParams): Promise; } // @public -export interface TablesCreateOptionalParams extends coreClient.OperationOptions { +export interface TablesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public -export type TablesCreateResponse = Table; +export type TablesCreateOrUpdateResponse = Table; + +// @public +export interface TablesDeleteOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; +} // @public export interface TablesGetOptionalParams extends coreClient.OperationOptions { @@ -1154,18 +414,24 @@ export interface TablesListResult { value?: Table[]; } +// @public +export interface TablesMigrateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type TableSubTypeEnum = string; + // @public export interface TablesUpdateOptionalParams extends coreClient.OperationOptions { + resumeFrom?: string; + updateIntervalInMs?: number; } // @public export type TablesUpdateResponse = Table; // @public -export interface Tag { - name: string; - value: string; -} +export type TableTypeEnum = string; // @public export type TrackedResource = Resource & { @@ -1175,41 +441,11 @@ export type TrackedResource = Resource & { location: string; }; -// @public -export type Type = string; - -// @public -export interface UsageMetric { - currentValue?: number; - limit?: number; - name?: MetricName; - nextResetTime?: Date; - quotaPeriod?: string; - unit?: string; -} - -// @public -export interface Usages { - list(resourceGroupName: string, workspaceName: string, options?: UsagesListOptionalParams): PagedAsyncIterableIterator; -} - -// @public -export interface UsagesListOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type UsagesListResponse = WorkspaceListUsagesResult; - -// @public -export interface UserIdentityProperties { - readonly clientId?: string; - readonly principalId?: string; -} - // @public export type Workspace = TrackedResource & { + readonly systemData?: SystemData; eTag?: string; - provisioningState?: WorkspaceEntityStatus; + readonly provisioningState?: WorkspaceEntityStatus; readonly customerId?: string; sku?: WorkspaceSku; retentionInDays?: number; @@ -1221,6 +457,7 @@ export type Workspace = TrackedResource & { forceCmkForQuery?: boolean; readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; features?: WorkspaceFeatures; + defaultDataCollectionRuleResourceId?: string; }; // @public @@ -1243,27 +480,17 @@ export interface WorkspaceFeatures { immediatePurgeDataOn30Days?: boolean; } -// @public -export interface WorkspaceListManagementGroupsResult { - value?: ManagementGroup[]; -} - // @public export interface WorkspaceListResult { value?: Workspace[]; } -// @public -export interface WorkspaceListUsagesResult { - value?: UsageMetric[]; -} - // @public export type WorkspacePatch = AzureEntityResource & { tags?: { [propertyName: string]: string; }; - provisioningState?: WorkspaceEntityStatus; + readonly provisioningState?: WorkspaceEntityStatus; readonly customerId?: string; sku?: WorkspaceSku; retentionInDays?: number; @@ -1275,57 +502,9 @@ export type WorkspacePatch = AzureEntityResource & { forceCmkForQuery?: boolean; readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; features?: WorkspaceFeatures; + defaultDataCollectionRuleResourceId?: string; }; -// @public -export interface WorkspacePurge { - getPurgeStatus(resourceGroupName: string, workspaceName: string, purgeId: string, options?: WorkspacePurgeGetPurgeStatusOptionalParams): Promise; - purge(resourceGroupName: string, workspaceName: string, body: WorkspacePurgeBody, options?: WorkspacePurgePurgeOptionalParams): Promise; -} - -// @public -export interface WorkspacePurgeBody { - filters: WorkspacePurgeBodyFilters[]; - table: string; -} - -// @public -export interface WorkspacePurgeBodyFilters { - column?: string; - key?: string; - operator?: string; - value?: any; -} - -// @public -export interface WorkspacePurgeGetPurgeStatusOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkspacePurgeGetPurgeStatusResponse = WorkspacePurgeStatusResponse; - -// @public -export interface WorkspacePurgePurgeHeaders { - xMsStatusLocation?: string; -} - -// @public -export interface WorkspacePurgePurgeOptionalParams extends coreClient.OperationOptions { -} - -// @public -export type WorkspacePurgePurgeResponse = WorkspacePurgePurgeHeaders & WorkspacePurgeResponse; - -// @public -export interface WorkspacePurgeResponse { - operationId: string; -} - -// @public -export interface WorkspacePurgeStatusResponse { - status: PurgeState; -} - // @public export interface Workspaces { beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, parameters: Workspace, options?: WorkspacesCreateOrUpdateOptionalParams): Promise, WorkspacesCreateOrUpdateResponse>>; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts index 1c2538c724e2..80a86bf1de46 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts @@ -8,29 +8,35 @@ import * as coreClient from "@azure/core-client"; -/** Result of the request to list data exports. */ -export interface DataExportListResult { - /** List of data export instances within a workspace.. */ - value?: DataExport[]; -} - -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { - /** - * 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. - */ - 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; +/** Result of the request to list solution operations. */ +export interface OperationListResult { + /** List of solution operations supported by the OperationsManagement resource provider. */ + value?: Operation[]; /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * 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 type?: string; + readonly nextLink?: 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; +} + +/** 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; } /** Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). */ @@ -82,460 +88,169 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } -/** The list data source by workspace operation response. */ -export interface DataSourceListResult { - /** A list of datasources. */ - value?: DataSource[]; - /** The link (url) to the next page of datasources. */ - nextLink?: string; -} - -/** Intelligence Pack containing a string name and boolean indicating if it's enabled. */ -export interface IntelligencePack { - /** The name of the intelligence pack. */ - name?: string; - /** The enabled boolean for the intelligence pack. */ - enabled?: boolean; - /** The display name of the intelligence pack. */ - displayName?: string; -} - -/** The list linked service operation response. */ -export interface LinkedServiceListResult { - /** The list of linked service instances */ - value?: LinkedService[]; -} - -/** The list linked storage accounts service operation response. */ -export interface LinkedStorageAccountsListResult { - /** A list of linked storage accounts instances. */ - value?: LinkedStorageAccountsResource[]; -} - -/** The list workspace management groups operation response. */ -export interface WorkspaceListManagementGroupsResult { - /** Gets or sets a list of management groups attached to the workspace. */ - value?: ManagementGroup[]; -} - -/** 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; -} - -/** 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 { - /** The primary shared key of a workspace. */ - primarySharedKey?: string; - /** The secondary shared key of a workspace. */ - secondarySharedKey?: string; -} - -/** The list workspace usages operation response. */ -export interface WorkspaceListUsagesResult { - /** Gets or sets a list of usage metrics for a workspace. */ - value?: UsageMetric[]; -} - -/** A metric describing the usage of a resource. */ -export interface UsageMetric { - /** The name of the metric. */ - name?: MetricName; - /** The units used for the metric. */ - unit?: string; - /** The current value of the metric. */ - currentValue?: number; - /** The quota limit for the metric. */ - limit?: number; - /** The time that the metric's value will reset. */ - nextResetTime?: Date; - /** The quota period that determines the length of time between value resets. */ - quotaPeriod?: string; -} - -/** The name of a metric. */ -export interface MetricName { - /** The system name of the metric. */ - value?: string; - /** The localized name of the metric. */ - localizedValue?: string; -} - -/** 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 list tables operation response. */ +export interface TablesListResult { + /** A list of data tables. */ + value?: Table[]; } -/** The status of the storage insight. */ -export interface StorageInsightStatus { - /** The state of the storage insight connection to the workspace */ - state: StorageInsightState; - /** Description of the state of the storage insight. */ +/** Parameters of the search job that initiated this table. */ +export interface SearchResults { + /** Search job query. */ + query?: string; + /** Search job Description. */ description?: string; + /** Limit the search job to return up to specified number of rows. */ + limit?: number; + /** The timestamp to start the search from (UTC) */ + startSearchTime?: Date; + /** The timestamp to end the search by (UTC) */ + endSearchTime?: Date; + /** + * The table used in the search job. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly sourceTable?: string; } -/** The list storage insights operation response. */ -export interface StorageInsightListResult { - /** A list of storage insight items. */ - value?: StorageInsight[]; - /** The link (url) to the next page of results. */ - odataNextLink?: string; -} - -/** A tag of a saved search. */ -export interface Tag { - /** The tag name. */ - name: string; - /** The tag value. */ - value: string; -} - -/** The saved search list operation response. */ -export interface SavedSearchesListResult { - /** The array of result values. */ - value?: SavedSearch[]; +/** Restore parameters. */ +export interface RestoredLogs { + /** The timestamp to start the restore from (UTC). */ + startRestoreTime?: Date; + /** The timestamp to end the restore by (UTC). */ + endRestoreTime?: Date; + /** The table to restore data from. */ + sourceTable?: string; } -/** Service Tier details. */ -export interface AvailableServiceTier { +/** Search job execution statistics. */ +export interface ResultStatistics { /** - * The name of the Service Tier. + * Search job completion percentage. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly serviceTier?: SkuNameEnum; + readonly progress?: number; /** - * True if the Service Tier is enabled for the workspace. + * The number of rows that were returned by the search job. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly enabled?: boolean; + readonly ingestedRecords?: number; +} + +/** Table's schema. */ +export interface Schema { + /** Table name. */ + name?: string; + /** Table display name. */ + displayName?: string; + /** Table description. */ + description?: string; + /** A list of table custom columns. */ + columns?: Column[]; /** - * The minimum retention for the Service Tier, in days. + * A list of table standard columns. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly minimumRetention?: number; + readonly standardColumns?: Column[]; /** - * The maximum retention for the Service Tier, in days. + * Table category. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly maximumRetention?: number; + readonly categories?: string[]; /** - * The default retention for the Service Tier, in days. + * Table labels. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly defaultRetention?: number; + readonly labels?: string[]; /** - * The capacity reservation level in GB per day. Returned for the Capacity Reservation Service Tier. + * Table's creator. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly capacityReservationLevel?: number; + readonly source?: SourceEnum; /** - * Time when the sku was last updated for the workspace. Returned for the Capacity Reservation Service Tier. + * Table's creator. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastSkuUpdate?: string; -} - -/** The get schema operation response. */ -export interface SearchGetSchemaResponse { - /** The metadata from search results. */ - metadata?: SearchMetadata; - /** The array of result values. */ - value?: SearchSchemaValue[]; -} - -/** 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; -} - -/** 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. */ - 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; -} - -/** 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[]; -} - -/** 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[]; -} - -/** 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; -} - -/** 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. */ - status: PurgeState; -} - -/** Result of the request to list solution operations. */ -export interface OperationListResult { - /** List of solution operations supported by the OperationsManagement resource provider. */ - value?: Operation[]; + readonly tableType?: TableTypeEnum; /** - * URL to get the next set of operation list results if there are any. + * The subtype describes what APIs can be used to interact with the table, and what features are available against it. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly nextLink?: 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; -} - -/** 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; -} - -/** The list tables operation response. */ -export interface TablesListResult { - /** A list of data tables. */ - value?: Table[]; -} - -/** The list clusters operation response. */ -export interface ClusterListResult { - /** The link used to get the next page of recommendations. */ - nextLink?: string; - /** A list of Log Analytics clusters. */ - value?: Cluster[]; -} - -/** Identity for the resource. */ -export interface Identity { + readonly tableSubType?: TableSubTypeEnum; + /** + * List of solutions the table is affiliated with + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly solutions?: string[]; /** - * The principal ID of resource identity. + * Parameters of the search job that initiated this table. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly searchResults?: SearchResults; /** - * The tenant ID of resource. + * Parameters of the restore operation that initiated this table. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly tenantId?: string; - /** Type of managed service identity. */ - type: IdentityType; - /** The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. */ - userAssignedIdentities?: { [propertyName: string]: UserIdentityProperties }; + readonly restoredLogs?: RestoredLogs; } -/** User assigned identity properties. */ -export interface UserIdentityProperties { +/** Table column. */ +export interface Column { + /** Column name. */ + name?: string; + /** Column data type. */ + type?: ColumnTypeEnum; + /** Column data type logical hint. */ + dataTypeHint?: ColumnDataTypeHintEnum; + /** Column display name. */ + displayName?: string; + /** Column description. */ + description?: string; /** - * The principal id of user assigned identity. + * Is displayed by default. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly principalId?: string; + readonly isDefaultDisplay?: boolean; /** - * The client id of user assigned identity. + * Is column hidden. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clientId?: string; + readonly isHidden?: boolean; } -/** The cluster sku definition. */ -export interface ClusterSku { - /** The capacity value */ - capacity?: Capacity; - /** The name of the SKU. */ - name?: ClusterSkuNameEnum; -} - -/** The key vault properties. */ -export interface KeyVaultProperties { - /** The Key Vault uri which holds they key associated with the Log Analytics cluster. */ - keyVaultUri?: string; - /** The name of the key associated with the Log Analytics cluster. */ - keyName?: string; - /** The version of the key associated with the Log Analytics cluster. */ - keyVersion?: string; - /** Selected key minimum required size. */ - keyRsaSize?: number; +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemData { + /** The identity that created the resource. */ + createdBy?: string; + /** The type of identity that created the resource. */ + createdByType?: CreatedByType; + /** The timestamp of resource creation (UTC). */ + createdAt?: Date; + /** The identity that last modified the resource. */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource. */ + lastModifiedByType?: CreatedByType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; } -/** The list of Log Analytics workspaces associated with the cluster. */ -export interface AssociatedWorkspace { - /** - * The id of the assigned workspace. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly workspaceId?: string; - /** - * The name id the assigned workspace. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly workspaceName?: string; - /** - * The ResourceId id the assigned workspace. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly resourceId?: string; +/** Common fields that are returned in the response for all Azure Resource Manager resources */ +export interface Resource { /** - * The time of workspace association. + * 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. */ - readonly associateDate?: string; -} - -/** The Capacity Reservation properties. */ -export interface CapacityReservationProperties { + readonly id?: string; /** - * The last time Sku was updated. + * The name of the resource * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastSkuUpdate?: string; + readonly name?: string; /** - * Minimum CapacityReservation value in GB. + * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly minCapacity?: number; -} - -/** The top level Log Analytics cluster resource container. */ -export interface ClusterPatch { - /** The identity of the resource. */ - identity?: Identity; - /** The sku properties. */ - sku?: ClusterSku; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** The associated key properties. */ - keyVaultProperties?: KeyVaultProperties; - /** The cluster's billing type. */ - billingType?: BillingType; + readonly type?: string; } /** The list workspaces operation response. */ @@ -597,12 +312,6 @@ export interface WorkspaceFeatures { disableLocalAuth?: boolean; } -/** DataSource filter. Right now, only filter by kind is supported. */ -export interface DataSourceFilter { - /** The kind of the DataSource. */ - kind?: DataSourceKind; -} - /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export type ProxyResource = Resource & {}; @@ -623,167 +332,58 @@ export type AzureEntityResource = Resource & { readonly etag?: string; }; -/** The top level data export resource container. */ -export type DataExport = ProxyResource & { - /** The data export rule ID. */ - dataExportId?: string; - /** An array of tables to export, for example: [“Heartbeat, SecurityEvent”]. */ - tableNames?: 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; - /** 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 - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly typePropertiesDestinationType?: Type; - /** Optional. Allows to define an Event Hub name. Not applicable when destination is Storage Account. */ - eventHubName?: string; -}; - -/** Datasources under OMS Workspace. */ -export type DataSource = ProxyResource & { - /** The data source properties in raw json format, each kind of data source have it's own schema. */ - properties: Record; - /** The ETag of the data source. */ - etag?: string; - /** The kind of the DataSource. */ - kind: DataSourceKind; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; -}; - -/** The top level Linked service resource container. */ -export type LinkedService = ProxyResource & { - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** 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. */ - provisioningState?: LinkedServiceEntityStatus; -}; - -/** Linked storage accounts top level resource container. */ -export type LinkedStorageAccountsResource = ProxyResource & { - /** - * Linked storage accounts type. - * 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[]; -}; - -/** The top level storage insight resource container. */ -export type StorageInsight = ProxyResource & { - /** The ETag of the storage insight. */ - eTag?: string; - /** Resource tags. */ - tags?: { [propertyName: string]: string }; - /** 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; - /** - * The status of the storage insight - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly status?: StorageInsightStatus; -}; - -/** Value object for saved search results. */ -export type SavedSearch = ProxyResource & { - /** The ETag of the saved search. To override an existing saved search, use "*" or specify the current Etag */ - 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. */ - query: string; - /** The function alias if query serves as a function. */ - functionAlias?: string; - /** The optional function parameters if query serves as a function. Value should be in the following format: 'param-name1:type1 = default_value1, param-name2:type2 = default_value2'. For more examples and proper syntax please refer to https://docs.microsoft.com/en-us/azure/kusto/query/functions/user-defined-functions. */ - functionParameters?: 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[]; -}; - /** Workspace data table definition. */ export type Table = ProxyResource & { - /** The data table data retention in days, between 7 and 730. Setting this property to null will default to the workspace retention. */ - retentionInDays?: number; - /** - * Specifies if IsTroubleshootingEnabled property can be set for this table. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly isTroubleshootingAllowed?: boolean; - /** Enable or disable troubleshoot for this table. */ - isTroubleshootEnabled?: boolean; - /** - * Last time when troubleshooting was set for this table. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly lastTroubleshootDate?: string; -}; - -/** The top level Log Analytics cluster resource container. */ -export type Cluster = TrackedResource & { - /** The identity of the resource. */ - identity?: Identity; - /** The sku properties. */ - sku?: ClusterSku; /** - * The ID associated with the cluster. + * Metadata pertaining to creation and last modification of the resource. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly clusterId?: string; + readonly systemData?: SystemData; + /** The table retention in days, between 4 and 730. Setting this property to -1 will default to the workspace retention. */ + retentionInDays?: number; + /** The table total retention in days, between 4 and 2555. Setting this property to -1 will default to table retention. */ + totalRetentionInDays?: number; /** - * The provisioning state of the cluster. + * The table data archive retention in days. Calculated as (totalRetentionInDays-retentionInDays) * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly provisioningState?: ClusterEntityStatus; - /** Configures whether cluster will use double encryption. This Property can not be modified after cluster creation. Default value is 'true' */ - isDoubleEncryptionEnabled?: boolean; - /** Sets whether the cluster will support availability zones. This can be set as true only in regions where Azure Data Explorer support Availability Zones. This Property can not be modified after cluster creation. Default value is 'true' if region supports Availability Zones. */ - isAvailabilityZonesEnabled?: boolean; - /** The cluster's billing type. */ - billingType?: BillingType; - /** The associated key properties. */ - keyVaultProperties?: KeyVaultProperties; + readonly archiveRetentionInDays?: number; + /** Parameters of the search job that initiated this table. */ + searchResults?: SearchResults; + /** Parameters of the restore operation that initiated this table. */ + restoredLogs?: RestoredLogs; + /** Search job execution statistics. */ + resultStatistics?: ResultStatistics; + /** Instruct the system how to handle and charge the logs ingested to this table. */ + plan?: TablePlanEnum; /** - * The last time the cluster was updated. + * The timestamp that table plan was last modified (UTC). * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly lastModifiedDate?: string; + readonly lastPlanModifiedDate?: string; + /** Table schema. */ + schema?: Schema; /** - * The cluster creation time + * Table's current provisioning state. If set to 'updating', indicates a resource lock due to ongoing operation, forbidding any update to the table until the ongoing operation is concluded. * NOTE: This property will not be serialized. It can only be populated by the server. */ - readonly createdDate?: string; - /** The list of Log Analytics workspaces associated with the cluster */ - associatedWorkspaces?: AssociatedWorkspace[]; - /** Additional properties for capacity reservation */ - capacityReservationProperties?: CapacityReservationProperties; + readonly provisioningState?: ProvisioningStateEnum; }; /** The top level Workspace resource container. */ export type Workspace = TrackedResource & { + /** + * Metadata pertaining to creation and last modification of the resource. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; /** The ETag of the workspace. */ eTag?: string; - /** The provisioning state of the workspace. */ - provisioningState?: WorkspaceEntityStatus; + /** + * The provisioning state of the workspace. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: WorkspaceEntityStatus; /** * 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. @@ -818,14 +418,19 @@ export type Workspace = TrackedResource & { readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; /** Workspace features. */ features?: WorkspaceFeatures; + /** The resource ID of the default Data Collection Rule to use for this workspace. Expected format is - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}. */ + defaultDataCollectionRuleResourceId?: string; }; /** The top level Workspace resource container. */ export type WorkspacePatch = AzureEntityResource & { /** Resource tags. Optional. */ tags?: { [propertyName: string]: string }; - /** The provisioning state of the workspace. */ - provisioningState?: WorkspaceEntityStatus; + /** + * The provisioning state of the workspace. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: WorkspaceEntityStatus; /** * 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. @@ -860,257 +465,183 @@ export type WorkspacePatch = AzureEntityResource & { readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; /** Workspace features. */ features?: WorkspaceFeatures; + /** The resource ID of the default Data Collection Rule to use for this workspace. Expected format is - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/dataCollectionRules/{dcrName}. */ + defaultDataCollectionRuleResourceId?: string; }; -/** Defines headers for WorkspacePurge_purge operation. */ -export interface WorkspacePurgePurgeHeaders { - /** The location from which to request the operation status. */ - xMsStatusLocation?: string; -} - -/** Known values of {@link Type} that the service accepts. */ -export enum KnownType { - StorageAccount = "StorageAccount", - EventHub = "EventHub" -} - -/** - * Defines values for Type. \ - * {@link KnownType} can be used interchangeably with Type, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **StorageAccount** \ - * **EventHub** - */ -export type Type = string; - -/** Known values of {@link DataSourceKind} that the service accepts. */ -export enum KnownDataSourceKind { - WindowsEvent = "WindowsEvent", - WindowsPerformanceCounter = "WindowsPerformanceCounter", - IISLogs = "IISLogs", - LinuxSyslog = "LinuxSyslog", - LinuxSyslogCollection = "LinuxSyslogCollection", - LinuxPerformanceObject = "LinuxPerformanceObject", - LinuxPerformanceCollection = "LinuxPerformanceCollection", - CustomLog = "CustomLog", - CustomLogCollection = "CustomLogCollection", - AzureAuditLog = "AzureAuditLog", - AzureActivityLog = "AzureActivityLog", - GenericDataSource = "GenericDataSource", - ChangeTrackingCustomPath = "ChangeTrackingCustomPath", - ChangeTrackingPath = "ChangeTrackingPath", - ChangeTrackingServices = "ChangeTrackingServices", - ChangeTrackingDataTypeConfiguration = "ChangeTrackingDataTypeConfiguration", - ChangeTrackingDefaultRegistry = "ChangeTrackingDefaultRegistry", - ChangeTrackingRegistry = "ChangeTrackingRegistry", - ChangeTrackingLinuxPath = "ChangeTrackingLinuxPath", - LinuxChangeTrackingPath = "LinuxChangeTrackingPath", - ChangeTrackingContentLocation = "ChangeTrackingContentLocation", - WindowsTelemetry = "WindowsTelemetry", - Office365 = "Office365", - SecurityWindowsBaselineConfiguration = "SecurityWindowsBaselineConfiguration", - SecurityCenterSecurityWindowsBaselineConfiguration = "SecurityCenterSecurityWindowsBaselineConfiguration", - SecurityEventCollectionConfiguration = "SecurityEventCollectionConfiguration", - SecurityInsightsSecurityEventCollectionConfiguration = "SecurityInsightsSecurityEventCollectionConfiguration", - ImportComputerGroup = "ImportComputerGroup", - NetworkMonitoring = "NetworkMonitoring", - Itsm = "Itsm", - DnsAnalytics = "DnsAnalytics", - ApplicationInsights = "ApplicationInsights", - SqlDataClassification = "SqlDataClassification" -} - -/** - * Defines values for DataSourceKind. \ - * {@link KnownDataSourceKind} can be used interchangeably with DataSourceKind, - * this enum contains the known values that the service supports. - * ### Known values supported by the service - * **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** - */ -export type DataSourceKind = string; - -/** Known values of {@link LinkedServiceEntityStatus} that the service accepts. */ -export enum KnownLinkedServiceEntityStatus { - Succeeded = "Succeeded", - Deleting = "Deleting", - ProvisioningAccount = "ProvisioningAccount", - Updating = "Updating" +/** Known values of {@link TablePlanEnum} that the service accepts. */ +export enum KnownTablePlanEnum { + /** Logs that are adjusted to support high volume low value verbose logs. */ + Basic = "Basic", + /** Logs that allow monitoring and analytics. */ + Analytics = "Analytics" } /** - * Defines values for LinkedServiceEntityStatus. \ - * {@link KnownLinkedServiceEntityStatus} can be used interchangeably with LinkedServiceEntityStatus, + * Defines values for TablePlanEnum. \ + * {@link KnownTablePlanEnum} can be used interchangeably with TablePlanEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Succeeded** \ - * **Deleting** \ - * **ProvisioningAccount** \ - * **Updating** + * **Basic**: Logs that are adjusted to support high volume low value verbose logs. \ + * **Analytics**: Logs that allow monitoring and analytics. */ -export type LinkedServiceEntityStatus = string; +export type TablePlanEnum = string; -/** Known values of {@link StorageInsightState} that the service accepts. */ -export enum KnownStorageInsightState { - OK = "OK", - Error = "ERROR" +/** Known values of {@link ColumnTypeEnum} that the service accepts. */ +export enum KnownColumnTypeEnum { + String = "string", + Int = "int", + Long = "long", + Real = "real", + Boolean = "boolean", + DateTime = "dateTime", + Guid = "guid", + Dynamic = "dynamic" } /** - * Defines values for StorageInsightState. \ - * {@link KnownStorageInsightState} can be used interchangeably with StorageInsightState, + * Defines values for ColumnTypeEnum. \ + * {@link KnownColumnTypeEnum} can be used interchangeably with ColumnTypeEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **OK** \ - * **ERROR** + * **string** \ + * **int** \ + * **long** \ + * **real** \ + * **boolean** \ + * **dateTime** \ + * **guid** \ + * **dynamic** */ -export type StorageInsightState = string; +export type ColumnTypeEnum = string; -/** Known values of {@link SkuNameEnum} that the service accepts. */ -export enum KnownSkuNameEnum { - Free = "Free", - Standard = "Standard", - Premium = "Premium", - PerNode = "PerNode", - PerGB2018 = "PerGB2018", - Standalone = "Standalone", - CapacityReservation = "CapacityReservation" +/** Known values of {@link ColumnDataTypeHintEnum} that the service accepts. */ +export enum KnownColumnDataTypeHintEnum { + /** A string that matches the pattern of a URI, for example, scheme://username:password@host:1234/this/is/a/path?k1=v1&k2=v2#fragment */ + Uri = "uri", + /** A standard 128-bit GUID following the standard shape, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx */ + Guid = "guid", + /** An Azure Resource Model (ARM) path: /subscriptions/{...}/resourceGroups/{...}/providers/Microsoft.{...}/{...}/{...}/{...}... */ + ArmPath = "armPath", + /** A standard V4/V6 ip address following the standard shape, x.x.x.x/y:y:y:y:y:y:y:y */ + Ip = "ip" } /** - * Defines values for SkuNameEnum. \ - * {@link KnownSkuNameEnum} can be used interchangeably with SkuNameEnum, + * Defines values for ColumnDataTypeHintEnum. \ + * {@link KnownColumnDataTypeHintEnum} can be used interchangeably with ColumnDataTypeHintEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Free** \ - * **Standard** \ - * **Premium** \ - * **PerNode** \ - * **PerGB2018** \ - * **Standalone** \ - * **CapacityReservation** + * **uri**: A string that matches the pattern of a URI, for example, scheme:\/\/username:password@host:1234\/this\/is\/a\/path?k1=v1&k2=v2#fragment \ + * **guid**: A standard 128-bit GUID following the standard shape, xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx \ + * **armPath**: An Azure Resource Model (ARM) path: \/subscriptions\/{...}\/resourceGroups\/{...}\/providers\/Microsoft.{...}\/{...}\/{...}\/{...}... \ + * **ip**: A standard V4\/V6 ip address following the standard shape, x.x.x.x\/y:y:y:y:y:y:y:y */ -export type SkuNameEnum = string; +export type ColumnDataTypeHintEnum = string; -/** Known values of {@link SearchSortEnum} that the service accepts. */ -export enum KnownSearchSortEnum { - Asc = "asc", - Desc = "desc" +/** Known values of {@link SourceEnum} that the service accepts. */ +export enum KnownSourceEnum { + /** Tables provisioned by the system, as collected via Diagnostic Settings, the Agents, or any other standard data collection means. */ + Microsoft = "microsoft", + /** Tables created by the owner of the Workspace, and only found in this Workspace. */ + Customer = "customer" } /** - * Defines values for SearchSortEnum. \ - * {@link KnownSearchSortEnum} can be used interchangeably with SearchSortEnum, + * Defines values for SourceEnum. \ + * {@link KnownSourceEnum} can be used interchangeably with SourceEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **asc** \ - * **desc** + * **microsoft**: Tables provisioned by the system, as collected via Diagnostic Settings, the Agents, or any other standard data collection means. \ + * **customer**: Tables created by the owner of the Workspace, and only found in this Workspace. */ -export type SearchSortEnum = string; +export type SourceEnum = string; -/** Known values of {@link PurgeState} that the service accepts. */ -export enum KnownPurgeState { - Pending = "pending", - Completed = "completed" +/** Known values of {@link TableTypeEnum} that the service accepts. */ +export enum KnownTableTypeEnum { + /** Standard data collected by Azure Monitor. */ + Microsoft = "Microsoft", + /** Custom log table. */ + CustomLog = "CustomLog", + /** Restored data. */ + RestoredLogs = "RestoredLogs", + /** Data collected by a search job. */ + SearchResults = "SearchResults" } /** - * Defines values for PurgeState. \ - * {@link KnownPurgeState} can be used interchangeably with PurgeState, + * Defines values for TableTypeEnum. \ + * {@link KnownTableTypeEnum} can be used interchangeably with TableTypeEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **pending** \ - * **completed** + * **Microsoft**: Standard data collected by Azure Monitor. \ + * **CustomLog**: Custom log table. \ + * **RestoredLogs**: Restored data. \ + * **SearchResults**: Data collected by a search job. */ -export type PurgeState = string; +export type TableTypeEnum = string; -/** Known values of {@link ClusterSkuNameEnum} that the service accepts. */ -export enum KnownClusterSkuNameEnum { - CapacityReservation = "CapacityReservation" +/** Known values of {@link TableSubTypeEnum} that the service accepts. */ +export enum KnownTableSubTypeEnum { + /** The default subtype with which built-in tables are created. */ + Any = "Any", + /** Indicates a table created through the Data Collector API or with the custom logs feature of the MMA agent, or any table against which Custom Fields were created. */ + Classic = "Classic", + /** A table eligible to have data sent into it via any of the means supported by Data Collection Rules: the Data Collection Endpoint API, ingestion-time transformations, or any other mechanism provided by Data Collection Rules */ + DataCollectionRuleBased = "DataCollectionRuleBased" } /** - * Defines values for ClusterSkuNameEnum. \ - * {@link KnownClusterSkuNameEnum} can be used interchangeably with ClusterSkuNameEnum, + * Defines values for TableSubTypeEnum. \ + * {@link KnownTableSubTypeEnum} can be used interchangeably with TableSubTypeEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **CapacityReservation** + * **Any**: The default subtype with which built-in tables are created. \ + * **Classic**: Indicates a table created through the Data Collector API or with the custom logs feature of the MMA agent, or any table against which Custom Fields were created. \ + * **DataCollectionRuleBased**: A table eligible to have data sent into it via any of the means supported by Data Collection Rules: the Data Collection Endpoint API, ingestion-time transformations, or any other mechanism provided by Data Collection Rules */ -export type ClusterSkuNameEnum = string; +export type TableSubTypeEnum = string; -/** Known values of {@link ClusterEntityStatus} that the service accepts. */ -export enum KnownClusterEntityStatus { - Creating = "Creating", - Succeeded = "Succeeded", - Failed = "Failed", - Canceled = "Canceled", - Deleting = "Deleting", - ProvisioningAccount = "ProvisioningAccount", - Updating = "Updating" +/** Known values of {@link ProvisioningStateEnum} that the service accepts. */ +export enum KnownProvisioningStateEnum { + /** Table schema is still being built and updated, table is currently locked for any changes till the procedure is done. */ + Updating = "Updating", + /** Table schema is stable and without changes, table data is being updated. */ + InProgress = "InProgress", + /** Table state is stable and without changes, table is unlocked and open for new updates. */ + Succeeded = "Succeeded" } /** - * Defines values for ClusterEntityStatus. \ - * {@link KnownClusterEntityStatus} can be used interchangeably with ClusterEntityStatus, + * Defines values for ProvisioningStateEnum. \ + * {@link KnownProvisioningStateEnum} can be used interchangeably with ProvisioningStateEnum, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Creating** \ - * **Succeeded** \ - * **Failed** \ - * **Canceled** \ - * **Deleting** \ - * **ProvisioningAccount** \ - * **Updating** + * **Updating**: Table schema is still being built and updated, table is currently locked for any changes till the procedure is done. \ + * **InProgress**: Table schema is stable and without changes, table data is being updated. \ + * **Succeeded**: Table state is stable and without changes, table is unlocked and open for new updates. */ -export type ClusterEntityStatus = string; +export type ProvisioningStateEnum = string; -/** Known values of {@link BillingType} that the service accepts. */ -export enum KnownBillingType { - Cluster = "Cluster", - Workspaces = "Workspaces" +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" } /** - * Defines values for BillingType. \ - * {@link KnownBillingType} can be used interchangeably with BillingType, + * Defines values for CreatedByType. \ + * {@link KnownCreatedByType} can be used interchangeably with CreatedByType, * this enum contains the known values that the service supports. * ### Known values supported by the service - * **Cluster** \ - * **Workspaces** + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** */ -export type BillingType = string; +export type CreatedByType = string; /** Known values of {@link WorkspaceEntityStatus} that the service accepts. */ export enum KnownWorkspaceEntityStatus { @@ -1213,12 +744,6 @@ export enum KnownPublicNetworkAccessType { * **Disabled**: Disables public connectivity to Log Analytics through public DNS. */ export type PublicNetworkAccessType = string; -/** Defines values for DataSourceType. */ -export type DataSourceType = "CustomLogs" | "AzureWatson" | "Query" | "Alerts"; -/** Defines values for IdentityType. */ -export type IdentityType = "SystemAssigned" | "UserAssigned" | "None"; -/** Defines values for Capacity. */ -export type Capacity = 500 | 1000 | 2000 | 5000; /** Defines values for CapacityReservationLevel. */ export type CapacityReservationLevel = | 100 @@ -1230,270 +755,6 @@ export type CapacityReservationLevel = | 2000 | 5000; -/** Optional parameters. */ -export interface DataExportsListByWorkspaceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspace operation. */ -export type DataExportsListByWorkspaceResponse = DataExportListResult; - -/** Optional parameters. */ -export interface DataExportsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type DataExportsCreateOrUpdateResponse = DataExport; - -/** Optional parameters. */ -export interface DataExportsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DataExportsGetResponse = DataExport; - -/** Optional parameters. */ -export interface DataExportsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DataSourcesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type DataSourcesCreateOrUpdateResponse = DataSource; - -/** Optional parameters. */ -export interface DataSourcesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface DataSourcesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type DataSourcesGetResponse = DataSource; - -/** Optional parameters. */ -export interface DataSourcesListByWorkspaceOptionalParams - extends coreClient.OperationOptions { - /** Starting point of the collection of data source instances. */ - skiptoken?: string; -} - -/** Contains response data for the listByWorkspace operation. */ -export type DataSourcesListByWorkspaceResponse = DataSourceListResult; - -/** Optional parameters. */ -export interface DataSourcesListByWorkspaceNextOptionalParams - extends coreClient.OperationOptions { - /** Starting point of the collection of data source instances. */ - skiptoken?: string; -} - -/** Contains response data for the listByWorkspaceNext operation. */ -export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult; - -/** Optional parameters. */ -export interface IntelligencePacksDisableOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface IntelligencePacksEnableOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface IntelligencePacksListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type IntelligencePacksListResponse = IntelligencePack[]; - -/** Optional parameters. */ -export interface LinkedServicesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the createOrUpdate operation. */ -export type LinkedServicesCreateOrUpdateResponse = LinkedService; - -/** Optional parameters. */ -export interface LinkedServicesDeleteOptionalParams - extends coreClient.OperationOptions { - /** Delay to wait until next poll, in milliseconds. */ - updateIntervalInMs?: number; - /** A serialized poller which can be used to resume an existing paused Long-Running-Operation. */ - resumeFrom?: string; -} - -/** Contains response data for the delete operation. */ -export type LinkedServicesDeleteResponse = LinkedService; - -/** Optional parameters. */ -export interface LinkedServicesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LinkedServicesGetResponse = LinkedService; - -/** Optional parameters. */ -export interface LinkedServicesListByWorkspaceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspace operation. */ -export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult; - -/** Optional parameters. */ -export interface LinkedStorageAccountsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type LinkedStorageAccountsCreateOrUpdateResponse = LinkedStorageAccountsResource; - -/** Optional parameters. */ -export interface LinkedStorageAccountsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface LinkedStorageAccountsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type LinkedStorageAccountsGetResponse = LinkedStorageAccountsResource; - -/** Optional parameters. */ -export interface LinkedStorageAccountsListByWorkspaceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspace operation. */ -export type LinkedStorageAccountsListByWorkspaceResponse = LinkedStorageAccountsListResult; - -/** Optional parameters. */ -export interface ManagementGroupsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ManagementGroupsListResponse = WorkspaceListManagementGroupsResult; - -/** Optional parameters. */ -export interface OperationStatusesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type OperationStatusesGetResponse = OperationStatus; - -/** Optional parameters. */ -export interface SharedKeysGetSharedKeysOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getSharedKeys operation. */ -export type SharedKeysGetSharedKeysResponse = SharedKeys; - -/** Optional parameters. */ -export interface SharedKeysRegenerateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the regenerate operation. */ -export type SharedKeysRegenerateResponse = SharedKeys; - -/** Optional parameters. */ -export interface UsagesListOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type UsagesListResponse = WorkspaceListUsagesResult; - -/** Optional parameters. */ -export interface StorageInsightConfigsCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type StorageInsightConfigsCreateOrUpdateResponse = StorageInsight; - -/** Optional parameters. */ -export interface StorageInsightConfigsGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type StorageInsightConfigsGetResponse = StorageInsight; - -/** Optional parameters. */ -export interface StorageInsightConfigsDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface StorageInsightConfigsListByWorkspaceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspace operation. */ -export type StorageInsightConfigsListByWorkspaceResponse = StorageInsightListResult; - -/** Optional parameters. */ -export interface StorageInsightConfigsListByWorkspaceNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspaceNext operation. */ -export type StorageInsightConfigsListByWorkspaceNextResponse = StorageInsightListResult; - -/** Optional parameters. */ -export interface SavedSearchesDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SavedSearchesCreateOrUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the createOrUpdate operation. */ -export type SavedSearchesCreateOrUpdateResponse = SavedSearch; - -/** Optional parameters. */ -export interface SavedSearchesGetOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SavedSearchesGetResponse = SavedSearch; - -/** Optional parameters. */ -export interface SavedSearchesListByWorkspaceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspace operation. */ -export type SavedSearchesListByWorkspaceResponse = SavedSearchesListResult; - -/** Optional parameters. */ -export interface AvailableServiceTiersListByWorkspaceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspace operation. */ -export type AvailableServiceTiersListByWorkspaceResponse = AvailableServiceTier[]; - -/** Optional parameters. */ -export interface GatewaysDeleteOptionalParams - extends coreClient.OperationOptions {} - -/** Optional parameters. */ -export interface SchemaGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type SchemaGetResponse = SearchGetSchemaResponse; - -/** Optional parameters. */ -export interface WorkspacePurgePurgeOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the purge operation. */ -export type WorkspacePurgePurgeResponse = WorkspacePurgePurgeHeaders & - WorkspacePurgeResponse; - -/** Optional parameters. */ -export interface WorkspacePurgeGetPurgeStatusOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the getPurgeStatus operation. */ -export type WorkspacePurgeGetPurgeStatusResponse = WorkspacePurgeStatusResponse; - /** Optional parameters. */ export interface OperationsListOptionalParams extends coreClient.OperationOptions {} @@ -1516,41 +777,7 @@ export interface TablesListByWorkspaceOptionalParams export type TablesListByWorkspaceResponse = TablesListResult; /** Optional parameters. */ -export interface TablesUpdateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the update operation. */ -export type TablesUpdateResponse = Table; - -/** Optional parameters. */ -export interface TablesCreateOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the create operation. */ -export type TablesCreateResponse = Table; - -/** Optional parameters. */ -export interface TablesGetOptionalParams extends coreClient.OperationOptions {} - -/** Contains response data for the get operation. */ -export type TablesGetResponse = Table; - -/** Optional parameters. */ -export interface ClustersListByResourceGroupOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByResourceGroup operation. */ -export type ClustersListByResourceGroupResponse = ClusterListResult; - -/** Optional parameters. */ -export interface ClustersListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type ClustersListResponse = ClusterListResult; - -/** Optional parameters. */ -export interface ClustersCreateOrUpdateOptionalParams +export interface TablesCreateOrUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1559,10 +786,10 @@ export interface ClustersCreateOrUpdateOptionalParams } /** Contains response data for the createOrUpdate operation. */ -export type ClustersCreateOrUpdateResponse = Cluster; +export type TablesCreateOrUpdateResponse = Table; /** Optional parameters. */ -export interface ClustersDeleteOptionalParams +export interface TablesUpdateOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1570,15 +797,17 @@ export interface ClustersDeleteOptionalParams resumeFrom?: string; } +/** Contains response data for the update operation. */ +export type TablesUpdateResponse = Table; + /** Optional parameters. */ -export interface ClustersGetOptionalParams - extends coreClient.OperationOptions {} +export interface TablesGetOptionalParams extends coreClient.OperationOptions {} /** Contains response data for the get operation. */ -export type ClustersGetResponse = Cluster; +export type TablesGetResponse = Table; /** Optional parameters. */ -export interface ClustersUpdateOptionalParams +export interface TablesDeleteOptionalParams extends coreClient.OperationOptions { /** Delay to wait until next poll, in milliseconds. */ updateIntervalInMs?: number; @@ -1586,23 +815,10 @@ export interface ClustersUpdateOptionalParams resumeFrom?: string; } -/** Contains response data for the update operation. */ -export type ClustersUpdateResponse = Cluster; - /** Optional parameters. */ -export interface ClustersListByResourceGroupNextOptionalParams +export interface TablesMigrateOptionalParams extends coreClient.OperationOptions {} -/** Contains response data for the listByResourceGroupNext operation. */ -export type ClustersListByResourceGroupNextResponse = ClusterListResult; - -/** Optional parameters. */ -export interface ClustersListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type ClustersListNextResponse = ClusterListResult; - /** Optional parameters. */ export interface WorkspacesListOptionalParams extends coreClient.OperationOptions {} @@ -1673,6 +889,8 @@ export interface OperationalInsightsManagementClientOptionalParams extends coreClient.ServiceClientOptions { /** server parameter */ $host?: string; + /** Api Version */ + apiVersion?: string; /** Overrides client endpoint. */ endpoint?: string; } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts index 1520ed6514cd..a1ae2cd5d26f 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts @@ -8,10 +8,10 @@ import * as coreClient from "@azure/core-client"; -export const DataExportListResult: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataExportListResult", + className: "OperationListResult", modelProperties: { value: { serializedName: "value", @@ -20,37 +20,69 @@ export const DataExportListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DataExport" + className: "Operation" } } } + }, + nextLink: { + serializedName: "nextLink", + readOnly: true, + type: { + name: "String" + } } } } }; -export const Resource: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "Operation", modelProperties: { - id: { - serializedName: "id", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } }, - name: { - serializedName: "name", - readOnly: true, + display: { + serializedName: "display", + type: { + name: "Composite", + className: "OperationDisplay" + } + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", type: { name: "String" } }, - type: { - serializedName: "type", - readOnly: true, + resource: { + serializedName: "resource", + type: { + name: "String" + } + }, + operation: { + serializedName: "operation", + type: { + name: "String" + } + }, + description: { + serializedName: "description", type: { name: "String" } @@ -155,10 +187,10 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const DataSourceListResult: coreClient.CompositeMapper = { +export const TablesListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataSourceListResult", + className: "TablesListResult", modelProperties: { value: { serializedName: "value", @@ -167,13 +199,53 @@ export const DataSourceListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "DataSource" + className: "Table" } } } + } + } + } +}; + +export const SearchResults: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SearchResults", + modelProperties: { + query: { + serializedName: "query", + type: { + name: "String" + } }, - nextLink: { - serializedName: "nextLink", + description: { + serializedName: "description", + type: { + name: "String" + } + }, + limit: { + serializedName: "limit", + type: { + name: "Number" + } + }, + startSearchTime: { + serializedName: "startSearchTime", + type: { + name: "DateTime" + } + }, + endSearchTime: { + serializedName: "endSearchTime", + type: { + name: "DateTime" + } + }, + sourceTable: { + serializedName: "sourceTable", + readOnly: true, type: { name: "String" } @@ -182,25 +254,25 @@ export const DataSourceListResult: coreClient.CompositeMapper = { } }; -export const IntelligencePack: coreClient.CompositeMapper = { +export const RestoredLogs: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IntelligencePack", + className: "RestoredLogs", modelProperties: { - name: { - serializedName: "name", + startRestoreTime: { + serializedName: "startRestoreTime", type: { - name: "String" + name: "DateTime" } }, - enabled: { - serializedName: "enabled", + endRestoreTime: { + serializedName: "endRestoreTime", type: { - name: "Boolean" + name: "DateTime" } }, - displayName: { - serializedName: "displayName", + sourceTable: { + serializedName: "sourceTable", type: { name: "String" } @@ -209,1517 +281,275 @@ export const IntelligencePack: coreClient.CompositeMapper = { } }; -export const LinkedServiceListResult: coreClient.CompositeMapper = { +export const ResultStatistics: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinkedServiceListResult", + className: "ResultStatistics", modelProperties: { - value: { - serializedName: "value", + progress: { + constraints: { + MultipleOf: 0.01 + }, + serializedName: "progress", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "LinkedService" - } - } + name: "Number" + } + }, + ingestedRecords: { + serializedName: "ingestedRecords", + readOnly: true, + type: { + name: "Number" } } } } }; -export const LinkedStorageAccountsListResult: coreClient.CompositeMapper = { +export const Schema: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinkedStorageAccountsListResult", + className: "Schema", modelProperties: { - value: { - serializedName: "value", + name: { + serializedName: "name", + type: { + name: "String" + } + }, + displayName: { + serializedName: "displayName", + type: { + name: "String" + } + }, + description: { + serializedName: "description", + type: { + name: "String" + } + }, + columns: { + serializedName: "columns", type: { name: "Sequence", element: { type: { name: "Composite", - className: "LinkedStorageAccountsResource" + className: "Column" } } } - } - } - } -}; - -export const WorkspaceListManagementGroupsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspaceListManagementGroupsResult", - modelProperties: { - value: { - serializedName: "value", + }, + standardColumns: { + serializedName: "standardColumns", + readOnly: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "ManagementGroup" + className: "Column" } } } - } - } - } -}; - -export const ManagementGroup: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ManagementGroup", - modelProperties: { - serverCount: { - serializedName: "properties.serverCount", + }, + categories: { + serializedName: "categories", + readOnly: true, type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - isGateway: { - serializedName: "properties.isGateway", + labels: { + serializedName: "labels", + readOnly: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - name: { - serializedName: "properties.name", + source: { + serializedName: "source", + readOnly: true, type: { name: "String" } }, - id: { - serializedName: "properties.id", + tableType: { + serializedName: "tableType", + readOnly: true, type: { name: "String" } }, - created: { - serializedName: "properties.created", + tableSubType: { + serializedName: "tableSubType", + readOnly: true, type: { - name: "DateTime" + name: "String" } }, - dataReceived: { - serializedName: "properties.dataReceived", + solutions: { + serializedName: "solutions", + readOnly: true, type: { - name: "DateTime" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - version: { - serializedName: "properties.version", + searchResults: { + serializedName: "searchResults", type: { - name: "String" + name: "Composite", + className: "SearchResults" } }, - sku: { - serializedName: "properties.sku", + restoredLogs: { + serializedName: "restoredLogs", type: { - name: "String" + name: "Composite", + className: "RestoredLogs" } } } } }; -export const OperationStatus: coreClient.CompositeMapper = { +export const Column: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationStatus", + className: "Column", modelProperties: { - id: { - serializedName: "id", - type: { - name: "String" - } - }, name: { serializedName: "name", type: { name: "String" } }, - startTime: { - serializedName: "startTime", + type: { + serializedName: "type", type: { name: "String" } }, - endTime: { - serializedName: "endTime", + dataTypeHint: { + serializedName: "dataTypeHint", type: { name: "String" } }, - status: { - serializedName: "status", + displayName: { + serializedName: "displayName", type: { name: "String" } }, - error: { - serializedName: "error", - type: { - name: "Composite", - className: "ErrorResponse" - } - } - } - } -}; - -export const SharedKeys: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SharedKeys", - modelProperties: { - primarySharedKey: { - serializedName: "primarySharedKey", + description: { + serializedName: "description", type: { name: "String" } }, - secondarySharedKey: { - serializedName: "secondarySharedKey", + isDefaultDisplay: { + serializedName: "isDefaultDisplay", + readOnly: true, type: { - name: "String" + name: "Boolean" } - } - } - } -}; - -export const WorkspaceListUsagesResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspaceListUsagesResult", - modelProperties: { - value: { - serializedName: "value", + }, + isHidden: { + serializedName: "isHidden", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "UsageMetric" - } - } + name: "Boolean" } } } } }; -export const UsageMetric: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UsageMetric", + className: "SystemData", modelProperties: { - name: { - serializedName: "name", + createdBy: { + serializedName: "createdBy", type: { - name: "Composite", - className: "MetricName" + name: "String" } }, - unit: { - serializedName: "unit", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - currentValue: { - serializedName: "currentValue", + createdAt: { + serializedName: "createdAt", type: { - name: "Number" + name: "DateTime" } }, - limit: { - serializedName: "limit", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { - name: "Number" + name: "String" } }, - nextResetTime: { - serializedName: "nextResetTime", - type: { - name: "DateTime" - } - }, - quotaPeriod: { - serializedName: "quotaPeriod", - type: { - name: "String" - } - } - } - } -}; - -export const MetricName: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "MetricName", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "String" - } - }, - localizedValue: { - serializedName: "localizedValue", - type: { - name: "String" - } - } - } - } -}; - -export const StorageAccount: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageAccount", - modelProperties: { - id: { - serializedName: "id", - required: true, - type: { - name: "String" - } - }, - key: { - serializedName: "key", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const StorageInsightStatus: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageInsightStatus", - modelProperties: { - state: { - serializedName: "state", - required: true, - type: { - name: "String" - } - }, - description: { - serializedName: "description", - type: { - name: "String" - } - } - } - } -}; - -export const StorageInsightListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "StorageInsightListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "StorageInsight" - } - } - } - }, - odataNextLink: { - serializedName: "@odata\\.nextLink", - type: { - name: "String" - } - } - } - } -}; - -export const Tag: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Tag", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - value: { - serializedName: "value", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const SavedSearchesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SavedSearchesListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SavedSearch" - } - } - } - } - } - } -}; - -export const AvailableServiceTier: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AvailableServiceTier", - modelProperties: { - serviceTier: { - serializedName: "serviceTier", - readOnly: true, - type: { - name: "String" - } - }, - enabled: { - serializedName: "enabled", - readOnly: true, - type: { - name: "Boolean" - } - }, - minimumRetention: { - serializedName: "minimumRetention", - readOnly: true, - type: { - name: "Number" - } - }, - maximumRetention: { - serializedName: "maximumRetention", - readOnly: true, - type: { - name: "Number" - } - }, - defaultRetention: { - serializedName: "defaultRetention", - readOnly: true, - type: { - name: "Number" - } - }, - capacityReservationLevel: { - serializedName: "capacityReservationLevel", - readOnly: true, - type: { - name: "Number" - } - }, - lastSkuUpdate: { - serializedName: "lastSkuUpdate", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const SearchGetSchemaResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SearchGetSchemaResponse", - modelProperties: { - metadata: { - serializedName: "metadata", - type: { - name: "Composite", - className: "SearchMetadata" - } - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SearchSchemaValue" - } - } - } - } - } - } -}; - -export const SearchMetadata: coreClient.CompositeMapper = { - 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 CoreSummary: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CoreSummary", - modelProperties: { - status: { - serializedName: "status", - type: { - name: "String" - } - }, - numberOfDocuments: { - serializedName: "numberOfDocuments", - required: true, - type: { - name: "Number" - } - } - } - } -}; - -export const SearchSort: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SearchSort", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - order: { - serializedName: "order", - type: { - name: "String" - } - } - } - } -}; - -export const SearchMetadataSchema: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SearchMetadataSchema", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - version: { - serializedName: "version", - type: { - name: "Number" - } - } - } - } -}; - -export const SearchSchemaValue: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "SearchSchemaValue", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - displayName: { - serializedName: "displayName", - type: { - name: "String" - } - }, - type: { - serializedName: "type", - type: { - name: "String" - } - }, - indexed: { - serializedName: "indexed", - required: true, - type: { - name: "Boolean" - } - }, - stored: { - serializedName: "stored", - required: true, - type: { - name: "Boolean" - } - }, - facet: { - serializedName: "facet", - required: true, - type: { - name: "Boolean" - } - }, - ownerType: { - serializedName: "ownerType", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - } - } - } -}; - -export const WorkspacePurgeBody: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspacePurgeBody", - modelProperties: { - table: { - serializedName: "table", - required: true, - type: { - name: "String" - } - }, - filters: { - serializedName: "filters", - required: true, - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "WorkspacePurgeBodyFilters" - } - } - } - } - } - } -}; - -export const WorkspacePurgeBodyFilters: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspacePurgeBodyFilters", - modelProperties: { - column: { - serializedName: "column", - type: { - name: "String" - } - }, - operator: { - serializedName: "operator", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "any" - } - }, - key: { - serializedName: "key", - type: { - name: "String" - } - } - } - } -}; - -export const WorkspacePurgeResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspacePurgeResponse", - modelProperties: { - operationId: { - serializedName: "operationId", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const WorkspacePurgeStatusResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspacePurgeStatusResponse", - modelProperties: { - status: { - serializedName: "status", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const OperationListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "OperationListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } - } - }, - nextLink: { - serializedName: "nextLink", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const Operation: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Operation", - modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - display: { - serializedName: "display", - type: { - name: "Composite", - className: "OperationDisplay" - } - } - } - } -}; - -export const OperationDisplay: coreClient.CompositeMapper = { - 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 TablesListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TablesListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Table" - } - } - } - } - } - } -}; - -export const ClusterListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterListResult", - modelProperties: { - nextLink: { - serializedName: "nextLink", - type: { - name: "String" - } - }, - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Cluster" - } - } - } - } - } - } -}; - -export const Identity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Identity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - tenantId: { - serializedName: "tenantId", - readOnly: true, - type: { - name: "String" - } - }, - type: { - serializedName: "type", - required: true, - type: { - name: "Enum", - allowedValues: ["SystemAssigned", "UserAssigned", "None"] - } - }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", - type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserIdentityProperties" } - } - } - } - } - } -}; - -export const UserIdentityProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "UserIdentityProperties", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, - type: { - name: "String" - } - }, - clientId: { - serializedName: "clientId", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const ClusterSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterSku", - modelProperties: { - capacity: { - serializedName: "capacity", - type: { - name: "Enum", - allowedValues: [500, 1000, 2000, 5000] - } - }, - name: { - serializedName: "name", - type: { - name: "String" - } - } - } - } -}; - -export const KeyVaultProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "KeyVaultProperties", - modelProperties: { - keyVaultUri: { - serializedName: "keyVaultUri", - type: { - name: "String" - } - }, - keyName: { - serializedName: "keyName", - type: { - name: "String" - } - }, - keyVersion: { - serializedName: "keyVersion", - type: { - name: "String" - } - }, - keyRsaSize: { - serializedName: "keyRsaSize", - type: { - name: "Number" - } - } - } - } -}; - -export const AssociatedWorkspace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssociatedWorkspace", - modelProperties: { - workspaceId: { - serializedName: "workspaceId", - readOnly: true, - type: { - name: "String" - } - }, - workspaceName: { - serializedName: "workspaceName", - readOnly: true, - type: { - name: "String" - } - }, - resourceId: { - serializedName: "resourceId", - readOnly: true, - type: { - name: "String" - } - }, - associateDate: { - serializedName: "associateDate", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const CapacityReservationProperties: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "CapacityReservationProperties", - modelProperties: { - lastSkuUpdate: { - serializedName: "lastSkuUpdate", - readOnly: true, - type: { - name: "String" - } - }, - minCapacity: { - serializedName: "minCapacity", - readOnly: true, - type: { - name: "Number" - } - } - } - } -}; - -export const ClusterPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPatch", - modelProperties: { - identity: { - serializedName: "identity", - type: { - name: "Composite", - className: "Identity" - } - }, - sku: { - serializedName: "sku", - type: { - name: "Composite", - className: "ClusterSku" - } - }, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - keyVaultProperties: { - serializedName: "properties.keyVaultProperties", - type: { - name: "Composite", - className: "KeyVaultProperties" - } - }, - billingType: { - serializedName: "properties.billingType", - type: { - name: "String" - } - } - } - } -}; - -export const WorkspaceListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspaceListResult", - modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Workspace" - } - } - } - } - } - } -}; - -export const WorkspaceSku: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspaceSku", - modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, - capacityReservationLevel: { - serializedName: "capacityReservationLevel", - type: { - name: "Enum", - allowedValues: [100, 200, 300, 400, 500, 1000, 2000, 5000] - } - }, - lastSkuUpdate: { - serializedName: "lastSkuUpdate", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const WorkspaceCapping: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspaceCapping", - modelProperties: { - dailyQuotaGb: { - serializedName: "dailyQuotaGb", - type: { - name: "Number" - } - }, - quotaNextResetTime: { - serializedName: "quotaNextResetTime", - readOnly: true, - type: { - name: "String" - } - }, - dataIngestionStatus: { - serializedName: "dataIngestionStatus", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const PrivateLinkScopedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkScopedResource", - modelProperties: { - resourceId: { - serializedName: "resourceId", - type: { - name: "String" - } - }, - scopeId: { - serializedName: "scopeId", - type: { - name: "String" - } - } - } - } -}; - -export const WorkspaceFeatures: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspaceFeatures", - additionalProperties: { type: { name: "Object" } }, - modelProperties: { - enableDataExport: { - serializedName: "enableDataExport", - nullable: true, - type: { - name: "Boolean" - } - }, - immediatePurgeDataOn30Days: { - serializedName: "immediatePurgeDataOn30Days", - nullable: true, - type: { - name: "Boolean" - } - }, - enableLogAccessUsingOnlyResourcePermissions: { - serializedName: "enableLogAccessUsingOnlyResourcePermissions", - nullable: true, - type: { - name: "Boolean" - } - }, - clusterResourceId: { - serializedName: "clusterResourceId", - nullable: true, - type: { - name: "String" - } - }, - disableLocalAuth: { - serializedName: "disableLocalAuth", - nullable: true, - type: { - name: "Boolean" - } - } - } - } -}; - -export const DataSourceFilter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataSourceFilter", - modelProperties: { - kind: { - serializedName: "kind", - type: { - name: "String" - } - } - } - } -}; - -export const ProxyResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ProxyResource", - modelProperties: { - ...Resource.type.modelProperties - } - } -}; - -export const TrackedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "TrackedResource", - modelProperties: { - ...Resource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - location: { - serializedName: "location", - required: true, - type: { - name: "String" - } - } - } - } -}; - -export const AzureEntityResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AzureEntityResource", - modelProperties: { - ...Resource.type.modelProperties, - etag: { - serializedName: "etag", - readOnly: true, - type: { - name: "String" - } - } - } - } -}; - -export const DataExport: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataExport", - modelProperties: { - ...ProxyResource.type.modelProperties, - dataExportId: { - serializedName: "properties.dataExportId", - type: { - name: "String" - } - }, - tableNames: { - serializedName: "properties.tableNames", - type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } - } - }, - enable: { - serializedName: "properties.enable", - type: { - name: "Boolean" - } - }, - createdDate: { - serializedName: "properties.createdDate", - type: { - name: "String" - } - }, - lastModifiedDate: { - serializedName: "properties.lastModifiedDate", - type: { - name: "String" - } - }, - resourceId: { - serializedName: "properties.destination.resourceId", - type: { - name: "String" - } - }, - typePropertiesDestinationType: { - serializedName: "properties.destination.type", - readOnly: true, - type: { - name: "String" - } - }, - eventHubName: { - serializedName: "properties.destination.metaData.eventHubName", - type: { - name: "String" - } - } - } - } -}; - -export const DataSource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataSource", - modelProperties: { - ...ProxyResource.type.modelProperties, - properties: { - serializedName: "properties", - required: true, - type: { - name: "Dictionary", - value: { type: { name: "any" } } - } - }, - etag: { - serializedName: "etag", - type: { - name: "String" - } - }, - kind: { - serializedName: "kind", - required: true, + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - tags: { - serializedName: "tags", + lastModifiedAt: { + serializedName: "lastModifiedAt", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "DateTime" } } } } }; -export const LinkedService: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { - name: "Composite", - className: "LinkedService", - modelProperties: { - ...ProxyResource.type.modelProperties, - tags: { - serializedName: "tags", - type: { - name: "Dictionary", - value: { type: { name: "String" } } - } - }, - resourceId: { - serializedName: "properties.resourceId", + name: "Composite", + className: "Resource", + modelProperties: { + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - writeAccessResourceId: { - serializedName: "properties.writeAccessResourceId", + name: { + serializedName: "name", + readOnly: true, type: { name: "String" } }, - provisioningState: { - serializedName: "properties.provisioningState", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } @@ -1728,27 +558,19 @@ export const LinkedService: coreClient.CompositeMapper = { } }; -export const LinkedStorageAccountsResource: coreClient.CompositeMapper = { +export const WorkspaceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinkedStorageAccountsResource", + className: "WorkspaceListResult", modelProperties: { - ...ProxyResource.type.modelProperties, - dataSourceType: { - serializedName: "properties.dataSourceType", - readOnly: true, - type: { - name: "Enum", - allowedValues: ["CustomLogs", "AzureWatson", "Query", "Alerts"] - } - }, - storageAccountIds: { - serializedName: "properties.storageAccountIds", + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "Workspace" } } } @@ -1757,163 +579,173 @@ export const LinkedStorageAccountsResource: coreClient.CompositeMapper = { } }; -export const StorageInsight: coreClient.CompositeMapper = { +export const WorkspaceSku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageInsight", + className: "WorkspaceSku", modelProperties: { - ...ProxyResource.type.modelProperties, - eTag: { - serializedName: "eTag", + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - tags: { - serializedName: "tags", + capacityReservationLevel: { + serializedName: "capacityReservationLevel", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "Enum", + allowedValues: [100, 200, 300, 400, 500, 1000, 2000, 5000] } }, - containers: { - serializedName: "properties.containers", + lastSkuUpdate: { + serializedName: "lastSkuUpdate", + readOnly: true, type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } - }, - tables: { - serializedName: "properties.tables", + } + } + } +}; + +export const WorkspaceCapping: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkspaceCapping", + modelProperties: { + dailyQuotaGb: { + serializedName: "dailyQuotaGb", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "Number" } }, - storageAccount: { - serializedName: "properties.storageAccount", + quotaNextResetTime: { + serializedName: "quotaNextResetTime", + readOnly: true, type: { - name: "Composite", - className: "StorageAccount" + name: "String" } }, - status: { - serializedName: "properties.status", + dataIngestionStatus: { + serializedName: "dataIngestionStatus", + readOnly: true, type: { - name: "Composite", - className: "StorageInsightStatus" + name: "String" } } } } }; -export const SavedSearch: coreClient.CompositeMapper = { +export const PrivateLinkScopedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SavedSearch", + className: "PrivateLinkScopedResource", modelProperties: { - ...ProxyResource.type.modelProperties, - etag: { - serializedName: "etag", + resourceId: { + serializedName: "resourceId", type: { name: "String" } }, - category: { - serializedName: "properties.category", - required: true, + scopeId: { + serializedName: "scopeId", type: { name: "String" } - }, - displayName: { - serializedName: "properties.displayName", - required: true, + } + } + } +}; + +export const WorkspaceFeatures: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkspaceFeatures", + additionalProperties: { type: { name: "Object" } }, + modelProperties: { + enableDataExport: { + serializedName: "enableDataExport", + nullable: true, type: { - name: "String" + name: "Boolean" } }, - query: { - serializedName: "properties.query", - required: true, + immediatePurgeDataOn30Days: { + serializedName: "immediatePurgeDataOn30Days", + nullable: true, type: { - name: "String" + name: "Boolean" } }, - functionAlias: { - serializedName: "properties.functionAlias", + enableLogAccessUsingOnlyResourcePermissions: { + serializedName: "enableLogAccessUsingOnlyResourcePermissions", + nullable: true, type: { - name: "String" + name: "Boolean" } }, - functionParameters: { - serializedName: "properties.functionParameters", + clusterResourceId: { + serializedName: "clusterResourceId", + nullable: true, type: { name: "String" } }, - version: { - serializedName: "properties.version", - type: { - name: "Number" - } - }, - tags: { - serializedName: "properties.tags", + disableLocalAuth: { + serializedName: "disableLocalAuth", + nullable: true, type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Tag" - } - } + name: "Boolean" } } } } }; -export const Table: coreClient.CompositeMapper = { +export const ProxyResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Table", + className: "ProxyResource", modelProperties: { - ...ProxyResource.type.modelProperties, - retentionInDays: { - constraints: { - InclusiveMaximum: 730, - InclusiveMinimum: 7 - }, - serializedName: "properties.retentionInDays", - type: { - name: "Number" - } - }, - isTroubleshootingAllowed: { - serializedName: "properties.isTroubleshootingAllowed", - readOnly: true, + ...Resource.type.modelProperties + } + } +}; + +export const TrackedResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "TrackedResource", + modelProperties: { + ...Resource.type.modelProperties, + tags: { + serializedName: "tags", type: { - name: "Boolean" + name: "Dictionary", + value: { type: { name: "String" } } } }, - isTroubleshootEnabled: { - serializedName: "properties.isTroubleshootEnabled", + location: { + serializedName: "location", + required: true, type: { - name: "Boolean" + name: "String" } - }, - lastTroubleshootDate: { - serializedName: "properties.lastTroubleshootDate", + } + } + } +}; + +export const AzureEntityResource: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AzureEntityResource", + modelProperties: { + ...Resource.type.modelProperties, + etag: { + serializedName: "etag", readOnly: true, type: { name: "String" @@ -1923,96 +755,92 @@ export const Table: coreClient.CompositeMapper = { } }; -export const Cluster: coreClient.CompositeMapper = { +export const Table: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Cluster", + className: "Table", modelProperties: { - ...TrackedResource.type.modelProperties, - identity: { - serializedName: "identity", + ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", type: { name: "Composite", - className: "Identity" + className: "SystemData" } }, - sku: { - serializedName: "sku", + retentionInDays: { + constraints: { + InclusiveMaximum: 730, + InclusiveMinimum: 4 + }, + serializedName: "properties.retentionInDays", type: { - name: "Composite", - className: "ClusterSku" + name: "Number" } }, - clusterId: { - serializedName: "properties.clusterId", - readOnly: true, + totalRetentionInDays: { + constraints: { + InclusiveMaximum: 2555, + InclusiveMinimum: 4 + }, + serializedName: "properties.totalRetentionInDays", type: { - name: "String" + name: "Number" } }, - provisioningState: { - serializedName: "properties.provisioningState", + archiveRetentionInDays: { + serializedName: "properties.archiveRetentionInDays", readOnly: true, type: { - name: "String" - } - }, - isDoubleEncryptionEnabled: { - serializedName: "properties.isDoubleEncryptionEnabled", - type: { - name: "Boolean" + name: "Number" } }, - isAvailabilityZonesEnabled: { - serializedName: "properties.isAvailabilityZonesEnabled", + searchResults: { + serializedName: "properties.searchResults", type: { - name: "Boolean" + name: "Composite", + className: "SearchResults" } }, - billingType: { - serializedName: "properties.billingType", + restoredLogs: { + serializedName: "properties.restoredLogs", type: { - name: "String" + name: "Composite", + className: "RestoredLogs" } }, - keyVaultProperties: { - serializedName: "properties.keyVaultProperties", + resultStatistics: { + serializedName: "properties.resultStatistics", type: { name: "Composite", - className: "KeyVaultProperties" + className: "ResultStatistics" } }, - lastModifiedDate: { - serializedName: "properties.lastModifiedDate", - readOnly: true, + plan: { + serializedName: "properties.plan", type: { name: "String" } }, - createdDate: { - serializedName: "properties.createdDate", + lastPlanModifiedDate: { + serializedName: "properties.lastPlanModifiedDate", readOnly: true, type: { name: "String" } }, - associatedWorkspaces: { - serializedName: "properties.associatedWorkspaces", + schema: { + serializedName: "properties.schema", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "AssociatedWorkspace" - } - } + name: "Composite", + className: "Schema" } }, - capacityReservationProperties: { - serializedName: "properties.capacityReservationProperties", + provisioningState: { + serializedName: "properties.provisioningState", + readOnly: true, type: { - name: "Composite", - className: "CapacityReservationProperties" + name: "String" } } } @@ -2025,6 +853,13 @@ export const Workspace: coreClient.CompositeMapper = { className: "Workspace", modelProperties: { ...TrackedResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemData" + } + }, eTag: { serializedName: "eTag", type: { @@ -2033,6 +868,7 @@ export const Workspace: coreClient.CompositeMapper = { }, provisioningState: { serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -2118,6 +954,12 @@ export const Workspace: coreClient.CompositeMapper = { name: "Composite", className: "WorkspaceFeatures" } + }, + defaultDataCollectionRuleResourceId: { + serializedName: "properties.defaultDataCollectionRuleResourceId", + type: { + name: "String" + } } } } @@ -2138,6 +980,7 @@ export const WorkspacePatch: coreClient.CompositeMapper = { }, provisioningState: { serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -2223,18 +1066,9 @@ export const WorkspacePatch: coreClient.CompositeMapper = { name: "Composite", className: "WorkspaceFeatures" } - } - } - } -}; - -export const WorkspacePurgePurgeHeaders: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspacePurgePurgeHeaders", - modelProperties: { - xMsStatusLocation: { - serializedName: "x-ms-status-location", + }, + defaultDataCollectionRuleResourceId: { + serializedName: "properties.defaultDataCollectionRuleResourceId", type: { name: "String" } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts index 548a6dfe7049..ebacc0afc3fc 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts @@ -12,16 +12,7 @@ import { OperationQueryParameter } from "@azure/core-client"; import { - DataExport as DataExportMapper, - DataSource as DataSourceMapper, - LinkedService as LinkedServiceMapper, - LinkedStorageAccountsResource as LinkedStorageAccountsResourceMapper, - StorageInsight as StorageInsightMapper, - SavedSearch as SavedSearchMapper, - WorkspacePurgeBody as WorkspacePurgeBodyMapper, Table as TableMapper, - Cluster as ClusterMapper, - ClusterPatch as ClusterPatchMapper, Workspace as WorkspaceMapper, WorkspacePatch as WorkspacePatchMapper } from "../models/mappers"; @@ -50,6 +41,30 @@ export const $host: OperationURLParameter = { skipEncoding: true }; +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2022-02-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { @@ -95,18 +110,6 @@ export const workspaceName: OperationURLParameter = { } }; -export const apiVersion: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2020-08-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - export const contentType: OperationParameter = { parameterPath: ["options", "contentType"], mapper: { @@ -120,236 +123,6 @@ export const contentType: OperationParameter = { }; export const parameters: OperationParameter = { - parameterPath: "parameters", - mapper: DataExportMapper -}; - -export const dataExportName: OperationURLParameter = { - parameterPath: "dataExportName", - mapper: { - constraints: { - Pattern: new RegExp("^[A-Za-z][A-Za-z0-9-]+[A-Za-z0-9]$"), - MaxLength: 63, - MinLength: 4 - }, - serializedName: "dataExportName", - required: true, - type: { - name: "String" - } - } -}; - -export const dataExportName1: OperationURLParameter = { - parameterPath: "dataExportName", - mapper: { - serializedName: "dataExportName", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters1: OperationParameter = { - parameterPath: "parameters", - mapper: DataSourceMapper -}; - -export const dataSourceName: OperationURLParameter = { - parameterPath: "dataSourceName", - mapper: { - serializedName: "dataSourceName", - required: true, - type: { - name: "String" - } - } -}; - -export const filter: OperationQueryParameter = { - parameterPath: "filter", - mapper: { - serializedName: "$filter", - required: true, - type: { - name: "String" - } - } -}; - -export const skiptoken: OperationQueryParameter = { - parameterPath: ["options", "skiptoken"], - mapper: { - serializedName: "$skiptoken", - type: { - name: "String" - } - } -}; - -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - -export const intelligencePackName: OperationURLParameter = { - parameterPath: "intelligencePackName", - mapper: { - serializedName: "intelligencePackName", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters2: OperationParameter = { - parameterPath: "parameters", - mapper: LinkedServiceMapper -}; - -export const linkedServiceName: OperationURLParameter = { - parameterPath: "linkedServiceName", - mapper: { - serializedName: "linkedServiceName", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters3: OperationParameter = { - parameterPath: "parameters", - mapper: LinkedStorageAccountsResourceMapper -}; - -export const dataSourceType: OperationURLParameter = { - parameterPath: "dataSourceType", - mapper: { - serializedName: "dataSourceType", - required: true, - type: { - name: "Enum", - allowedValues: ["CustomLogs", "AzureWatson", "Query", "Alerts"] - } - } -}; - -export const location: OperationURLParameter = { - parameterPath: "location", - mapper: { - serializedName: "location", - required: true, - type: { - name: "String" - } - } -}; - -export const asyncOperationId: OperationURLParameter = { - parameterPath: "asyncOperationId", - mapper: { - serializedName: "asyncOperationId", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters4: OperationParameter = { - parameterPath: "parameters", - mapper: StorageInsightMapper -}; - -export const storageInsightName: OperationURLParameter = { - parameterPath: "storageInsightName", - mapper: { - serializedName: "storageInsightName", - required: true, - type: { - name: "String" - } - } -}; - -export const savedSearchId: OperationURLParameter = { - parameterPath: "savedSearchId", - mapper: { - serializedName: "savedSearchId", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters5: OperationParameter = { - parameterPath: "parameters", - mapper: SavedSearchMapper -}; - -export const gatewayId: OperationURLParameter = { - parameterPath: "gatewayId", - mapper: { - serializedName: "gatewayId", - required: true, - type: { - name: "String" - } - } -}; - -export const body: OperationParameter = { - parameterPath: "body", - mapper: WorkspacePurgeBodyMapper -}; - -export const purgeId: OperationURLParameter = { - parameterPath: "purgeId", - mapper: { - serializedName: "purgeId", - required: true, - type: { - name: "String" - } - } -}; - -export const apiVersion1: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2020-10-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const apiVersion2: OperationQueryParameter = { - parameterPath: "apiVersion", - mapper: { - defaultValue: "2021-06-01", - isConstant: true, - serializedName: "api-version", - type: { - name: "String" - } - } -}; - -export const parameters6: OperationParameter = { parameterPath: "parameters", mapper: TableMapper }; @@ -365,44 +138,7 @@ export const tableName: OperationURLParameter = { } }; -export const parameters7: OperationParameter = { - parameterPath: "parameters", - mapper: ClusterMapper -}; - -export const clusterName: OperationURLParameter = { - parameterPath: "clusterName", - mapper: { - constraints: { - Pattern: new RegExp("^[A-Za-z0-9][A-Za-z0-9-]+[A-Za-z0-9]$"), - MaxLength: 63, - MinLength: 4 - }, - serializedName: "clusterName", - required: true, - type: { - name: "String" - } - } -}; - -export const clusterName1: OperationURLParameter = { - parameterPath: "clusterName", - mapper: { - serializedName: "clusterName", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters8: OperationParameter = { - parameterPath: "parameters", - mapper: ClusterPatchMapper -}; - -export const parameters9: OperationParameter = { +export const parameters1: OperationParameter = { parameterPath: "parameters", mapper: WorkspaceMapper }; @@ -417,7 +153,7 @@ export const force: OperationQueryParameter = { } }; -export const parameters10: OperationParameter = { +export const parameters2: OperationParameter = { parameterPath: "parameters", mapper: WorkspacePatchMapper }; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts index 72993d35f63c..68305bbf5bf9 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts @@ -9,46 +9,14 @@ import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { - DataExportsImpl, - DataSourcesImpl, - IntelligencePacksImpl, - LinkedServicesImpl, - LinkedStorageAccountsImpl, - ManagementGroupsImpl, - OperationStatusesImpl, - SharedKeysOperationsImpl, - UsagesImpl, - StorageInsightConfigsImpl, - SavedSearchesImpl, - AvailableServiceTiersImpl, - GatewaysImpl, - SchemaImpl, - WorkspacePurgeImpl, OperationsImpl, TablesImpl, - ClustersImpl, WorkspacesImpl, DeletedWorkspacesImpl } from "./operations"; import { - DataExports, - DataSources, - IntelligencePacks, - LinkedServices, - LinkedStorageAccounts, - ManagementGroups, - OperationStatuses, - SharedKeysOperations, - Usages, - StorageInsightConfigs, - SavedSearches, - AvailableServiceTiers, - Gateways, - Schema, - WorkspacePurge, Operations, Tables, - Clusters, Workspaces, DeletedWorkspaces } from "./operationsInterfaces"; @@ -56,6 +24,7 @@ import { OperationalInsightsManagementClientOptionalParams } from "./models"; export class OperationalInsightsManagementClient extends coreClient.ServiceClient { $host: string; + apiVersion: string; subscriptionId: string; /** @@ -85,7 +54,7 @@ export class OperationalInsightsManagementClient extends coreClient.ServiceClien credential: credentials }; - const packageDetails = `azsdk-js-arm-operationalinsights/8.0.0`; + const packageDetails = `azsdk-js-arm-operationalinsights/9.0.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -108,46 +77,15 @@ export class OperationalInsightsManagementClient extends coreClient.ServiceClien // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; - this.dataExports = new DataExportsImpl(this); - this.dataSources = new DataSourcesImpl(this); - this.intelligencePacks = new IntelligencePacksImpl(this); - this.linkedServices = new LinkedServicesImpl(this); - this.linkedStorageAccounts = new LinkedStorageAccountsImpl(this); - this.managementGroups = new ManagementGroupsImpl(this); - this.operationStatuses = new OperationStatusesImpl(this); - this.sharedKeysOperations = new SharedKeysOperationsImpl(this); - this.usages = new UsagesImpl(this); - this.storageInsightConfigs = new StorageInsightConfigsImpl(this); - this.savedSearches = new SavedSearchesImpl(this); - this.availableServiceTiers = new AvailableServiceTiersImpl(this); - this.gateways = new GatewaysImpl(this); - this.schema = new SchemaImpl(this); - this.workspacePurge = new WorkspacePurgeImpl(this); + this.apiVersion = options.apiVersion || "2022-02-01"; this.operations = new OperationsImpl(this); this.tables = new TablesImpl(this); - this.clusters = new ClustersImpl(this); this.workspaces = new WorkspacesImpl(this); this.deletedWorkspaces = new DeletedWorkspacesImpl(this); } - dataExports: DataExports; - dataSources: DataSources; - intelligencePacks: IntelligencePacks; - linkedServices: LinkedServices; - linkedStorageAccounts: LinkedStorageAccounts; - managementGroups: ManagementGroups; - operationStatuses: OperationStatuses; - sharedKeysOperations: SharedKeysOperations; - usages: Usages; - storageInsightConfigs: StorageInsightConfigs; - savedSearches: SavedSearches; - availableServiceTiers: AvailableServiceTiers; - gateways: Gateways; - schema: Schema; - workspacePurge: WorkspacePurge; operations: Operations; tables: Tables; - clusters: Clusters; workspaces: Workspaces; deletedWorkspaces: DeletedWorkspaces; } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts deleted file mode 100644 index 628a2c9fed35..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { AvailableServiceTiers } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - AvailableServiceTiersListByWorkspaceOptionalParams, - AvailableServiceTiersListByWorkspaceResponse -} from "../models"; - -/** Class containing AvailableServiceTiers operations. */ -export class AvailableServiceTiersImpl implements AvailableServiceTiers { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class AvailableServiceTiers class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: AvailableServiceTiersListByWorkspaceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - listByWorkspaceOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/availableServiceTiers", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { name: "Composite", className: "AvailableServiceTier" } - } - } - } - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts deleted file mode 100644 index 7bf2ae7be597..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts +++ /dev/null @@ -1,671 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Clusters } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - Cluster, - ClustersListByResourceGroupNextOptionalParams, - ClustersListByResourceGroupOptionalParams, - ClustersListNextOptionalParams, - ClustersListOptionalParams, - ClustersListByResourceGroupResponse, - ClustersListResponse, - ClustersCreateOrUpdateOptionalParams, - ClustersCreateOrUpdateResponse, - ClustersDeleteOptionalParams, - ClustersGetOptionalParams, - ClustersGetResponse, - ClusterPatch, - ClustersUpdateOptionalParams, - ClustersUpdateResponse, - ClustersListByResourceGroupNextResponse, - ClustersListNextResponse -} from "../models"; - -/// -/** Class containing Clusters operations. */ -export class ClustersImpl implements Clusters { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class Clusters class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - public listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByResourceGroupPagingAll(resourceGroupName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByResourceGroupPagingPage(resourceGroupName, options); - } - }; - } - - private async *listByResourceGroupPagingPage( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): AsyncIterableIterator { - let result = await this._listByResourceGroup(resourceGroupName, options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByResourceGroupNext( - resourceGroupName, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByResourceGroupPagingAll( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByResourceGroupPagingPage( - resourceGroupName, - options - )) { - yield* page; - } - } - - /** - * Gets the Log Analytics clusters in a subscription. - * @param options The options parameters. - */ - public list( - options?: ClustersListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(options); - } - }; - } - - private async *listPagingPage( - options?: ClustersListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(options); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listNext(continuationToken, options); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listPagingAll( - options?: ClustersListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage(options)) { - yield* page; - } - } - - /** - * Gets Log Analytics clusters in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - private _listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, options }, - listByResourceGroupOperationSpec - ); - } - - /** - * Gets the Log Analytics clusters in a subscription. - * @param options The options parameters. - */ - private _list( - options?: ClustersListOptionalParams - ): Promise { - return this.client.sendOperationRequest({ options }, listOperationSpec); - } - - /** - * 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 options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - parameters: Cluster, - options?: ClustersCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ClustersCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, parameters, options }, - createOrUpdateOperationSpec - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - } - - /** - * 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 options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - parameters: Cluster, - options?: ClustersCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - clusterName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * 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 options parameters. - */ - async beginDelete( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise, void>> { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, options }, - deleteOperationSpec - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - } - - /** - * 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 options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - clusterName, - options - ); - return poller.pollUntilDone(); - } - - /** - * 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 options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ClustersGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, clusterName, options }, - getOperationSpec - ); - } - - /** - * 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 options parameters. - */ - async beginUpdate( - resourceGroupName: string, - clusterName: string, - parameters: ClusterPatch, - options?: ClustersUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ClustersUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, clusterName, parameters, options }, - updateOperationSpec - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - } - - /** - * 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 options parameters. - */ - async beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - parameters: ClusterPatch, - options?: ClustersUpdateOptionalParams - ): Promise { - const poller = await this.beginUpdate( - resourceGroupName, - clusterName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * ListByResourceGroupNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method. - * @param options The options parameters. - */ - private _listByResourceGroupNext( - resourceGroupName: string, - nextLink: string, - options?: ClustersListByResourceGroupNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, nextLink, options }, - listByResourceGroupNextOperationSpec - ); - } - - /** - * ListNext - * @param nextLink The nextLink from the previous successful call to the List method. - * @param options The options parameters. - */ - private _listNext( - nextLink: string, - options?: ClustersListNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { nextLink, options }, - listNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByResourceGroupOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/clusters", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [Parameters.$host, Parameters.subscriptionId], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.Cluster - }, - 201: { - bodyMapper: Mappers.Cluster - }, - 202: { - bodyMapper: Mappers.Cluster - }, - 204: { - bodyMapper: Mappers.Cluster - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters7, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 201: {}, - 202: {}, - 204: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName1 - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.Cluster - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName1 - ], - headerParameters: [Parameters.accept], - serializer -}; -const updateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/clusters/{clusterName}", - httpMethod: "PATCH", - responses: { - 200: { - bodyMapper: Mappers.Cluster - }, - 201: { - bodyMapper: Mappers.Cluster - }, - 202: { - bodyMapper: Mappers.Cluster - }, - 204: { - bodyMapper: Mappers.Cluster - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters8, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.clusterName1 - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; -const listNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.ClusterListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion2], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts deleted file mode 100644 index 0d03f0a6eced..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts +++ /dev/null @@ -1,272 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { DataExports } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - DataExport, - DataExportsListByWorkspaceOptionalParams, - DataExportsListByWorkspaceResponse, - DataExportsCreateOrUpdateOptionalParams, - DataExportsCreateOrUpdateResponse, - DataExportsGetOptionalParams, - DataExportsGetResponse, - DataExportsDeleteOptionalParams -} from "../models"; - -/// -/** Class containing DataExports operations. */ -export class DataExportsImpl implements DataExports { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class DataExports class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: DataExportsListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - workspaceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - options - ); - } - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - workspaceName: string, - options?: DataExportsListByWorkspaceOptionalParams - ): AsyncIterableIterator { - let result = await this._listByWorkspace( - resourceGroupName, - workspaceName, - options - ); - yield result.value || []; - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - workspaceName: string, - options?: DataExportsListByWorkspaceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: DataExportsListByWorkspaceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - listByWorkspaceOperationSpec - ); - } - - /** - * 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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - dataExportName: string, - parameters: DataExport, - options?: DataExportsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, dataExportName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - dataExportName: string, - options?: DataExportsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, dataExportName, options }, - getOperationSpec - ); - } - - /** - * 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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - dataExportName: string, - options?: DataExportsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, dataExportName, options }, - deleteOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataExportListResult - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DataExport - }, - 201: { - bodyMapper: Mappers.DataExport - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.dataExportName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataExport - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.dataExportName1 - ], - headerParameters: [Parameters.accept], - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", - httpMethod: "DELETE", - responses: { - 200: {}, - 404: {}, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.dataExportName1 - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts deleted file mode 100644 index c269b3312140..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts +++ /dev/null @@ -1,328 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { DataSources } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - DataSource, - DataSourcesListByWorkspaceNextOptionalParams, - DataSourcesListByWorkspaceOptionalParams, - DataSourcesCreateOrUpdateOptionalParams, - DataSourcesCreateOrUpdateResponse, - DataSourcesDeleteOptionalParams, - DataSourcesGetOptionalParams, - DataSourcesGetResponse, - DataSourcesListByWorkspaceResponse, - DataSourcesListByWorkspaceNextResponse -} from "../models"; - -/// -/** Class containing DataSources operations. */ -export class DataSourcesImpl implements DataSources { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class DataSources class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - this.client = client; - } - - /** - * 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. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - workspaceName: string, - filter: string, - options?: DataSourcesListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - workspaceName, - filter, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - filter, - options - ); - } - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - workspaceName: string, - filter: string, - options?: DataSourcesListByWorkspaceOptionalParams - ): AsyncIterableIterator { - let result = await this._listByWorkspace( - resourceGroupName, - workspaceName, - filter, - options - ); - yield result.value || []; - let continuationToken = result.nextLink; - while (continuationToken) { - result = await this._listByWorkspaceNext( - resourceGroupName, - workspaceName, - filter, - continuationToken, - options - ); - continuationToken = result.nextLink; - yield result.value || []; - } - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - workspaceName: string, - filter: string, - options?: DataSourcesListByWorkspaceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - filter, - options - )) { - yield* page; - } - } - - /** - * Create or update a data source. - * @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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - dataSourceName: string, - parameters: DataSource, - options?: DataSourcesCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, dataSourceName, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * Deletes a data source instance. - * @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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - dataSourceName: string, - options?: DataSourcesDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, dataSourceName, options }, - deleteOperationSpec - ); - } - - /** - * Gets a datasource instance. - * @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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - dataSourceName: string, - options?: DataSourcesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, dataSourceName, options }, - getOperationSpec - ); - } - - /** - * 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. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - workspaceName: string, - filter: string, - options?: DataSourcesListByWorkspaceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, filter, options }, - listByWorkspaceOperationSpec - ); - } - - /** - * ListByWorkspaceNext - * @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 nextLink The nextLink from the previous successful call to the ListByWorkspace method. - * @param options The options parameters. - */ - private _listByWorkspaceNext( - resourceGroupName: string, - workspaceName: string, - filter: string, - nextLink: string, - options?: DataSourcesListByWorkspaceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, filter, nextLink, options }, - listByWorkspaceNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.DataSource - }, - 201: { - bodyMapper: Mappers.DataSource - } - }, - requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.dataSourceName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", - httpMethod: "DELETE", - responses: { 200: {}, 204: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.dataSourceName - ], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataSource - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.dataSourceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataSourceListResult - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.skiptoken - ], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.DataSourceListResult - } - }, - queryParameters: [ - Parameters.apiVersion, - Parameters.filter, - Parameters.skiptoken - ], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts index 6c434492e680..bafc569ce048 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/deletedWorkspaces.ts @@ -152,7 +152,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -169,7 +169,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts deleted file mode 100644 index d1fb688745cd..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { Gateways } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { GatewaysDeleteOptionalParams } from "../models"; - -/** Class containing Gateways operations. */ -export class GatewaysImpl implements Gateways { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class Gateways class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - gatewayId: string, - options?: GatewaysDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, gatewayId, options }, - deleteOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/gateways/{gatewayId}", - httpMethod: "DELETE", - responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.gatewayId - ], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts index c35fd126bd82..31ab0ed6274e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts @@ -6,23 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./dataExports"; -export * from "./dataSources"; -export * from "./intelligencePacks"; -export * from "./linkedServices"; -export * from "./linkedStorageAccounts"; -export * from "./managementGroups"; -export * from "./operationStatuses"; -export * from "./sharedKeysOperations"; -export * from "./usages"; -export * from "./storageInsightConfigs"; -export * from "./savedSearches"; -export * from "./availableServiceTiers"; -export * from "./gateways"; -export * from "./schema"; -export * from "./workspacePurge"; export * from "./operations"; export * from "./tables"; -export * from "./clusters"; export * from "./workspaces"; export * from "./deletedWorkspaces"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts deleted file mode 100644 index b6d5335d0a7e..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { IntelligencePacks } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - IntelligencePacksDisableOptionalParams, - IntelligencePacksEnableOptionalParams, - IntelligencePacksListOptionalParams, - IntelligencePacksListResponse -} from "../models"; - -/** Class containing IntelligencePacks operations. */ -export class IntelligencePacksImpl implements IntelligencePacks { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class IntelligencePacks class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - disable( - resourceGroupName: string, - workspaceName: string, - intelligencePackName: string, - options?: IntelligencePacksDisableOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, intelligencePackName, options }, - disableOperationSpec - ); - } - - /** - * 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 options parameters. - */ - enable( - resourceGroupName: string, - workspaceName: string, - intelligencePackName: string, - options?: IntelligencePacksEnableOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, intelligencePackName, options }, - enableOperationSpec - ); - } - - /** - * 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 options parameters. - */ - list( - resourceGroupName: string, - workspaceName: string, - options?: IntelligencePacksListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const disableOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable", - httpMethod: "POST", - responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.intelligencePackName - ], - serializer -}; -const enableOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable", - httpMethod: "POST", - responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.intelligencePackName - ], - serializer -}; -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: { - type: { - name: "Sequence", - element: { - type: { name: "Composite", className: "IntelligencePack" } - } - } - } - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts deleted file mode 100644 index 1b5bcde3fb21..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts +++ /dev/null @@ -1,430 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { LinkedServices } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; -import { LroImpl } from "../lroImpl"; -import { - LinkedService, - LinkedServicesListByWorkspaceOptionalParams, - LinkedServicesCreateOrUpdateOptionalParams, - LinkedServicesCreateOrUpdateResponse, - LinkedServicesDeleteOptionalParams, - LinkedServicesDeleteResponse, - LinkedServicesGetOptionalParams, - LinkedServicesGetResponse, - LinkedServicesListByWorkspaceResponse -} from "../models"; - -/// -/** Class containing LinkedServices operations. */ -export class LinkedServicesImpl implements LinkedServices { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class LinkedServices class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - this.client = client; - } - - /** - * Gets the linked services instances in 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 options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: LinkedServicesListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - workspaceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - options - ); - } - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - workspaceName: string, - options?: LinkedServicesListByWorkspaceOptionalParams - ): AsyncIterableIterator { - let result = await this._listByWorkspace( - resourceGroupName, - workspaceName, - options - ); - yield result.value || []; - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - workspaceName: string, - options?: LinkedServicesListByWorkspaceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - async beginCreateOrUpdate( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - parameters: LinkedService, - options?: LinkedServicesCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkedServicesCreateOrUpdateResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { - resourceGroupName, - workspaceName, - linkedServiceName, - parameters, - options - }, - createOrUpdateOperationSpec - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - } - - /** - * 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 options parameters. - */ - async beginCreateOrUpdateAndWait( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - parameters: LinkedService, - options?: LinkedServicesCreateOrUpdateOptionalParams - ): Promise { - const poller = await this.beginCreateOrUpdate( - resourceGroupName, - workspaceName, - linkedServiceName, - parameters, - options - ); - return poller.pollUntilDone(); - } - - /** - * 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 options parameters. - */ - async beginDelete( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - options?: LinkedServicesDeleteOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkedServicesDeleteResponse - > - > { - const directSendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ): Promise => { - return this.client.sendOperationRequest(args, spec); - }; - const sendOperation = async ( - args: coreClient.OperationArguments, - spec: coreClient.OperationSpec - ) => { - let currentRawResponse: - | coreClient.FullOperationResponse - | undefined = undefined; - const providedCallback = args.options?.onResponse; - const callback: coreClient.RawResponseCallback = ( - rawResponse: coreClient.FullOperationResponse, - flatResponse: unknown - ) => { - currentRawResponse = rawResponse; - providedCallback?.(rawResponse, flatResponse); - }; - const updatedArgs = { - ...args, - options: { - ...args.options, - onResponse: callback - } - }; - const flatResponse = await directSendOperation(updatedArgs, spec); - return { - flatResponse, - rawResponse: { - statusCode: currentRawResponse!.status, - body: currentRawResponse!.parsedBody, - headers: currentRawResponse!.headers.toJSON() - } - }; - }; - - const lro = new LroImpl( - sendOperation, - { resourceGroupName, workspaceName, linkedServiceName, options }, - deleteOperationSpec - ); - return new LroEngine(lro, { - resumeFrom: options?.resumeFrom, - intervalInMs: options?.updateIntervalInMs - }); - } - - /** - * 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 options parameters. - */ - async beginDeleteAndWait( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - options?: LinkedServicesDeleteOptionalParams - ): Promise { - const poller = await this.beginDelete( - resourceGroupName, - workspaceName, - linkedServiceName, - options - ); - return poller.pollUntilDone(); - } - - /** - * Gets 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - options?: LinkedServicesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, linkedServiceName, options }, - getOperationSpec - ); - } - - /** - * Gets the linked services instances in 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 options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: LinkedServicesListByWorkspaceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - listByWorkspaceOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LinkedService - }, - 201: { - bodyMapper: Mappers.LinkedService - }, - 202: { - bodyMapper: Mappers.LinkedService - }, - 204: { - bodyMapper: Mappers.LinkedService - } - }, - requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.linkedServiceName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", - httpMethod: "DELETE", - responses: { - 200: { - bodyMapper: Mappers.LinkedService - }, - 201: { - bodyMapper: Mappers.LinkedService - }, - 202: { - bodyMapper: Mappers.LinkedService - }, - 204: { - bodyMapper: Mappers.LinkedService - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.linkedServiceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices/{linkedServiceName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LinkedService - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.linkedServiceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedServices", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LinkedServiceListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts deleted file mode 100644 index 1cc9823090f0..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { LinkedStorageAccounts } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - LinkedStorageAccountsResource, - LinkedStorageAccountsListByWorkspaceOptionalParams, - DataSourceType, - LinkedStorageAccountsCreateOrUpdateOptionalParams, - LinkedStorageAccountsCreateOrUpdateResponse, - LinkedStorageAccountsDeleteOptionalParams, - LinkedStorageAccountsGetOptionalParams, - LinkedStorageAccountsGetResponse, - LinkedStorageAccountsListByWorkspaceResponse -} from "../models"; - -/// -/** Class containing LinkedStorageAccounts operations. */ -export class LinkedStorageAccountsImpl implements LinkedStorageAccounts { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class LinkedStorageAccounts class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: LinkedStorageAccountsListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - workspaceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - options - ); - } - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - workspaceName: string, - options?: LinkedStorageAccountsListByWorkspaceOptionalParams - ): AsyncIterableIterator { - let result = await this._listByWorkspace( - resourceGroupName, - workspaceName, - options - ); - yield result.value || []; - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - workspaceName: string, - options?: LinkedStorageAccountsListByWorkspaceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - options - )) { - yield* page; - } - } - - /** - * 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. - * @param parameters The parameters required to create or update linked storage accounts. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - dataSourceType: DataSourceType, - parameters: LinkedStorageAccountsResource, - options?: LinkedStorageAccountsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, dataSourceType, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * 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. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - dataSourceType: DataSourceType, - options?: LinkedStorageAccountsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, dataSourceType, options }, - deleteOperationSpec - ); - } - - /** - * 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. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - dataSourceType: DataSourceType, - options?: LinkedStorageAccountsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, dataSourceType, options }, - getOperationSpec - ); - } - - /** - * 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 options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: LinkedStorageAccountsListByWorkspaceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - listByWorkspaceOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.LinkedStorageAccountsResource - } - }, - requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.dataSourceType - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", - httpMethod: "DELETE", - responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.dataSourceType - ], - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LinkedStorageAccountsResource - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.dataSourceType - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.LinkedStorageAccountsListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts deleted file mode 100644 index 4bc8ff3c2d27..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ManagementGroups } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - ManagementGroup, - ManagementGroupsListOptionalParams, - ManagementGroupsListResponse -} from "../models"; - -/// -/** Class containing ManagementGroups operations. */ -export class ManagementGroupsImpl implements ManagementGroups { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class ManagementGroups class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - public list( - resourceGroupName: string, - workspaceName: string, - options?: ManagementGroupsListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, workspaceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(resourceGroupName, workspaceName, options); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - workspaceName: string, - options?: ManagementGroupsListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(resourceGroupName, workspaceName, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceGroupName: string, - workspaceName: string, - options?: ManagementGroupsListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - workspaceName, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - private _list( - resourceGroupName: string, - workspaceName: string, - options?: ManagementGroupsListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/managementGroups", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkspaceListManagementGroupsResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts deleted file mode 100644 index dd0df6c485e8..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { OperationStatuses } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - OperationStatusesGetOptionalParams, - OperationStatusesGetResponse -} from "../models"; - -/** Class containing OperationStatuses operations. */ -export class OperationStatusesImpl implements OperationStatuses { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class OperationStatuses class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - get( - location: string, - asyncOperationId: string, - options?: OperationStatusesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { location, asyncOperationId, options }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.OperationStatus - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.location, - Parameters.asyncOperationId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/operations.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/operations.ts index 6e78b7bce1f9..54b4c34f2f1f 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/operations.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/operations.ts @@ -114,7 +114,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], serializer @@ -130,7 +130,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts deleted file mode 100644 index b89eaf219501..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SavedSearches } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - SavedSearchesDeleteOptionalParams, - SavedSearch, - SavedSearchesCreateOrUpdateOptionalParams, - SavedSearchesCreateOrUpdateResponse, - SavedSearchesGetOptionalParams, - SavedSearchesGetResponse, - SavedSearchesListByWorkspaceOptionalParams, - SavedSearchesListByWorkspaceResponse -} from "../models"; - -/** Class containing SavedSearches operations. */ -export class SavedSearchesImpl implements SavedSearches { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class SavedSearches class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - savedSearchId: string, - options?: SavedSearchesDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, savedSearchId, options }, - deleteOperationSpec - ); - } - - /** - * 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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - savedSearchId: string, - parameters: SavedSearch, - options?: SavedSearchesCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, savedSearchId, parameters, options }, - createOrUpdateOperationSpec - ); - } - - /** - * 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - savedSearchId: string, - options?: SavedSearchesGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, savedSearchId, options }, - getOperationSpec - ); - } - - /** - * 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 options parameters. - */ - listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: SavedSearchesListByWorkspaceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - listByWorkspaceOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", - httpMethod: "DELETE", - responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.savedSearchId - ], - serializer -}; -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.SavedSearch - } - }, - requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.savedSearchId - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SavedSearch - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.savedSearchId - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.SavedSearchesListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts deleted file mode 100644 index 8eeaf89350ef..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { Schema } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { SchemaGetOptionalParams, SchemaGetResponse } from "../models"; - -/** Class containing Schema operations. */ -export class SchemaImpl implements Schema { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class Schema class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - options?: SchemaGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - getOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/schema", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SearchGetSchemaResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts deleted file mode 100644 index a6543cd1cd92..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SharedKeysOperations } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - SharedKeysGetSharedKeysOptionalParams, - SharedKeysGetSharedKeysResponse, - SharedKeysRegenerateOptionalParams, - SharedKeysRegenerateResponse -} from "../models"; - -/** Class containing SharedKeysOperations operations. */ -export class SharedKeysOperationsImpl implements SharedKeysOperations { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class SharedKeysOperations class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - getSharedKeys( - resourceGroupName: string, - workspaceName: string, - options?: SharedKeysGetSharedKeysOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - getSharedKeysOperationSpec - ); - } - - /** - * 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 options parameters. - */ - regenerate( - resourceGroupName: string, - workspaceName: string, - options?: SharedKeysRegenerateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - regenerateOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const getSharedKeysOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/sharedKeys", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SharedKeys - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const regenerateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/regenerateSharedKey", - httpMethod: "POST", - responses: { - 200: { - bodyMapper: Mappers.SharedKeys - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts deleted file mode 100644 index ff2e9fec9169..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { StorageInsightConfigs } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - StorageInsight, - StorageInsightConfigsListByWorkspaceNextOptionalParams, - StorageInsightConfigsListByWorkspaceOptionalParams, - StorageInsightConfigsCreateOrUpdateOptionalParams, - StorageInsightConfigsCreateOrUpdateResponse, - StorageInsightConfigsGetOptionalParams, - StorageInsightConfigsGetResponse, - StorageInsightConfigsDeleteOptionalParams, - StorageInsightConfigsListByWorkspaceResponse, - StorageInsightConfigsListByWorkspaceNextResponse -} from "../models"; - -/// -/** Class containing StorageInsightConfigs operations. */ -export class StorageInsightConfigsImpl implements StorageInsightConfigs { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class StorageInsightConfigs class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - this.client = client; - } - - /** - * 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 options parameters. - */ - public listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: StorageInsightConfigsListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listByWorkspacePagingAll( - resourceGroupName, - workspaceName, - options - ); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - options - ); - } - }; - } - - private async *listByWorkspacePagingPage( - resourceGroupName: string, - workspaceName: string, - options?: StorageInsightConfigsListByWorkspaceOptionalParams - ): AsyncIterableIterator { - let result = await this._listByWorkspace( - resourceGroupName, - workspaceName, - options - ); - yield result.value || []; - let continuationToken = result.odataNextLink; - while (continuationToken) { - result = await this._listByWorkspaceNext( - resourceGroupName, - workspaceName, - continuationToken, - options - ); - continuationToken = result.odataNextLink; - yield result.value || []; - } - } - - private async *listByWorkspacePagingAll( - resourceGroupName: string, - workspaceName: string, - options?: StorageInsightConfigsListByWorkspaceOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listByWorkspacePagingPage( - resourceGroupName, - workspaceName, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - storageInsightName: string, - parameters: StorageInsight, - options?: StorageInsightConfigsCreateOrUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { - resourceGroupName, - workspaceName, - storageInsightName, - parameters, - options - }, - createOrUpdateOperationSpec - ); - } - - /** - * 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - storageInsightName: string, - options?: StorageInsightConfigsGetOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, storageInsightName, options }, - getOperationSpec - ); - } - - /** - * 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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - storageInsightName: string, - options?: StorageInsightConfigsDeleteOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, storageInsightName, options }, - deleteOperationSpec - ); - } - - /** - * 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 options parameters. - */ - private _listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: StorageInsightConfigsListByWorkspaceOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - listByWorkspaceOperationSpec - ); - } - - /** - * ListByWorkspaceNext - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param nextLink The nextLink from the previous successful call to the ListByWorkspace method. - * @param options The options parameters. - */ - private _listByWorkspaceNext( - resourceGroupName: string, - workspaceName: string, - nextLink: string, - options?: StorageInsightConfigsListByWorkspaceNextOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, nextLink, options }, - listByWorkspaceNextOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const createOrUpdateOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", - httpMethod: "PUT", - responses: { - 200: { - bodyMapper: Mappers.StorageInsight - }, - 201: { - bodyMapper: Mappers.StorageInsight - } - }, - requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.storageInsightName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageInsight - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.storageInsightName - ], - headerParameters: [Parameters.accept], - serializer -}; -const deleteOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", - httpMethod: "DELETE", - responses: { 200: {}, 204: {} }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.storageInsightName - ], - serializer -}; -const listByWorkspaceOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageInsightListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; -const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { - path: "{nextLink}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.StorageInsightListResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.nextLink - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts index 7055f36ebb92..4984d8758c95 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/tables.ts @@ -12,16 +12,20 @@ import * as coreClient from "@azure/core-client"; import * as Mappers from "../models/mappers"; import * as Parameters from "../models/parameters"; import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; +import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro"; +import { LroImpl } from "../lroImpl"; import { Table, TablesListByWorkspaceOptionalParams, TablesListByWorkspaceResponse, + TablesCreateOrUpdateOptionalParams, + TablesCreateOrUpdateResponse, TablesUpdateOptionalParams, TablesUpdateResponse, - TablesCreateOptionalParams, - TablesCreateResponse, TablesGetOptionalParams, - TablesGetResponse + TablesGetResponse, + TablesDeleteOptionalParams, + TablesMigrateOptionalParams } from "../models"; /// @@ -115,45 +119,192 @@ export class TablesImpl implements Tables { } /** - * Updates a Log Analytics workspace table properties. + * Update or Create a Log Analytics workspace table. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param tableName The name of the table. * @param parameters The parameters required to update table properties. * @param options The options parameters. */ - update( + async beginCreateOrUpdate( + resourceGroupName: string, + workspaceName: string, + tableName: string, + parameters: Table, + options?: TablesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + TablesCreateOrUpdateResponse + > + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, workspaceName, tableName, parameters, options }, + createOrUpdateOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Update or Create a Log Analytics workspace table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param parameters The parameters required to update table properties. + * @param options The options parameters. + */ + async beginCreateOrUpdateAndWait( + resourceGroupName: string, + workspaceName: string, + tableName: string, + parameters: Table, + options?: TablesCreateOrUpdateOptionalParams + ): Promise { + const poller = await this.beginCreateOrUpdate( + resourceGroupName, + workspaceName, + tableName, + parameters, + options + ); + return poller.pollUntilDone(); + } + + /** + * Update a Log Analytics workspace table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param parameters The parameters required to update table properties. + * @param options The options parameters. + */ + async beginUpdate( resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesUpdateOptionalParams - ): Promise { - return this.client.sendOperationRequest( + ): Promise< + PollerLike, TablesUpdateResponse> + > { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, { resourceGroupName, workspaceName, tableName, parameters, options }, updateOperationSpec ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); } /** - * Updates a Log Analytics workspace table properties. + * Update a Log Analytics workspace table. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param tableName The name of the table. * @param parameters The parameters required to update table properties. * @param options The options parameters. */ - create( + async beginUpdateAndWait( resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, - options?: TablesCreateOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, tableName, parameters, options }, - createOperationSpec + options?: TablesUpdateOptionalParams + ): Promise { + const poller = await this.beginUpdate( + resourceGroupName, + workspaceName, + tableName, + parameters, + options ); + return poller.pollUntilDone(); } /** @@ -174,6 +325,112 @@ export class TablesImpl implements Tables { getOperationSpec ); } + + /** + * Delete a Log Analytics workspace table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param options The options parameters. + */ + async beginDelete( + resourceGroupName: string, + workspaceName: string, + tableName: string, + options?: TablesDeleteOptionalParams + ): Promise, void>> { + const directSendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ): Promise => { + return this.client.sendOperationRequest(args, spec); + }; + const sendOperation = async ( + args: coreClient.OperationArguments, + spec: coreClient.OperationSpec + ) => { + let currentRawResponse: + | coreClient.FullOperationResponse + | undefined = undefined; + const providedCallback = args.options?.onResponse; + const callback: coreClient.RawResponseCallback = ( + rawResponse: coreClient.FullOperationResponse, + flatResponse: unknown + ) => { + currentRawResponse = rawResponse; + providedCallback?.(rawResponse, flatResponse); + }; + const updatedArgs = { + ...args, + options: { + ...args.options, + onResponse: callback + } + }; + const flatResponse = await directSendOperation(updatedArgs, spec); + return { + flatResponse, + rawResponse: { + statusCode: currentRawResponse!.status, + body: currentRawResponse!.parsedBody, + headers: currentRawResponse!.headers.toJSON() + } + }; + }; + + const lro = new LroImpl( + sendOperation, + { resourceGroupName, workspaceName, tableName, options }, + deleteOperationSpec + ); + return new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + } + + /** + * Delete a Log Analytics workspace table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param options The options parameters. + */ + async beginDeleteAndWait( + resourceGroupName: string, + workspaceName: string, + tableName: string, + options?: TablesDeleteOptionalParams + ): Promise { + const poller = await this.beginDelete( + resourceGroupName, + workspaceName, + tableName, + options + ); + return poller.pollUntilDone(); + } + + /** + * Migrate a Log Analytics table from support of the Data Collector API and Custom Fields features to + * support of Data Collection Rule-based Custom Logs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param options The options parameters. + */ + migrate( + resourceGroupName: string, + workspaceName: string, + tableName: string, + options?: TablesMigrateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, workspaceName, tableName, options }, + migrateOperationSpec + ); + } } // Operation Specifications const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); @@ -190,7 +447,7 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -200,20 +457,29 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { headerParameters: [Parameters.accept], serializer }; -const updateOperationSpec: coreClient.OperationSpec = { +const createOrUpdateOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}", - httpMethod: "PATCH", + httpMethod: "PUT", responses: { 200: { bodyMapper: Mappers.Table }, + 201: { + bodyMapper: Mappers.Table + }, + 202: { + bodyMapper: Mappers.Table + }, + 204: { + bodyMapper: Mappers.Table + }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -225,20 +491,29 @@ const updateOperationSpec: coreClient.OperationSpec = { mediaType: "json", serializer }; -const createOperationSpec: coreClient.OperationSpec = { +const updateOperationSpec: coreClient.OperationSpec = { path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}", - httpMethod: "PUT", + httpMethod: "PATCH", responses: { 200: { bodyMapper: Mappers.Table }, + 201: { + bodyMapper: Mappers.Table + }, + 202: { + bodyMapper: Mappers.Table + }, + 204: { + bodyMapper: Mappers.Table + }, default: { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters6, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -262,7 +537,52 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.tableName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 201: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.workspaceName, + Parameters.tableName + ], + headerParameters: [Parameters.accept], + serializer +}; +const migrateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/tables/{tableName}/migrate", + httpMethod: "POST", + responses: { + 200: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts deleted file mode 100644 index f67f1dac76db..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { Usages } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - UsageMetric, - UsagesListOptionalParams, - UsagesListResponse -} from "../models"; - -/// -/** Class containing Usages operations. */ -export class UsagesImpl implements Usages { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class Usages class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - public list( - resourceGroupName: string, - workspaceName: string, - options?: UsagesListOptionalParams - ): PagedAsyncIterableIterator { - const iter = this.listPagingAll(resourceGroupName, workspaceName, options); - return { - next() { - return iter.next(); - }, - [Symbol.asyncIterator]() { - return this; - }, - byPage: () => { - return this.listPagingPage(resourceGroupName, workspaceName, options); - } - }; - } - - private async *listPagingPage( - resourceGroupName: string, - workspaceName: string, - options?: UsagesListOptionalParams - ): AsyncIterableIterator { - let result = await this._list(resourceGroupName, workspaceName, options); - yield result.value || []; - } - - private async *listPagingAll( - resourceGroupName: string, - workspaceName: string, - options?: UsagesListOptionalParams - ): AsyncIterableIterator { - for await (const page of this.listPagingPage( - resourceGroupName, - workspaceName, - options - )) { - yield* page; - } - } - - /** - * 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 options parameters. - */ - private _list( - resourceGroupName: string, - workspaceName: string, - options?: UsagesListOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, options }, - listOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const listOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/usages", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkspaceListUsagesResult - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts deleted file mode 100644 index a4bf96299ccc..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { WorkspacePurge } from "../operationsInterfaces"; -import * as coreClient from "@azure/core-client"; -import * as Mappers from "../models/mappers"; -import * as Parameters from "../models/parameters"; -import { OperationalInsightsManagementClient } from "../operationalInsightsManagementClient"; -import { - WorkspacePurgeBody, - WorkspacePurgePurgeOptionalParams, - WorkspacePurgePurgeResponse, - WorkspacePurgeGetPurgeStatusOptionalParams, - WorkspacePurgeGetPurgeStatusResponse -} from "../models"; - -/** Class containing WorkspacePurge operations. */ -export class WorkspacePurgeImpl implements WorkspacePurge { - private readonly client: OperationalInsightsManagementClient; - - /** - * Initialize a new instance of the class WorkspacePurge class. - * @param client Reference to the service client - */ - constructor(client: OperationalInsightsManagementClient) { - 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 options parameters. - */ - purge( - resourceGroupName: string, - workspaceName: string, - body: WorkspacePurgeBody, - options?: WorkspacePurgePurgeOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, body, options }, - purgeOperationSpec - ); - } - - /** - * 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 options parameters. - */ - getPurgeStatus( - resourceGroupName: string, - workspaceName: string, - purgeId: string, - options?: WorkspacePurgeGetPurgeStatusOptionalParams - ): Promise { - return this.client.sendOperationRequest( - { resourceGroupName, workspaceName, purgeId, options }, - getPurgeStatusOperationSpec - ); - } -} -// Operation Specifications -const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); - -const purgeOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/purge", - httpMethod: "POST", - responses: { - 202: { - bodyMapper: Mappers.WorkspacePurgeResponse, - headersMapper: Mappers.WorkspacePurgePurgeHeaders - } - }, - requestBody: Parameters.body, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName - ], - headerParameters: [Parameters.accept, Parameters.contentType], - mediaType: "json", - serializer -}; -const getPurgeStatusOperationSpec: coreClient.OperationSpec = { - path: - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/operations/{purgeId}", - httpMethod: "GET", - responses: { - 200: { - bodyMapper: Mappers.WorkspacePurgeStatusResponse - } - }, - queryParameters: [Parameters.apiVersion], - urlParameters: [ - Parameters.$host, - Parameters.subscriptionId, - Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.purgeId - ], - headerParameters: [Parameters.accept], - serializer -}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts index 1984b54b8aed..5deee2208d56 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts @@ -372,7 +372,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -389,7 +389,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -419,8 +419,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters1, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -444,7 +444,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2, Parameters.force], + queryParameters: [Parameters.apiVersion, Parameters.force], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -466,7 +466,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -488,8 +488,8 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters2, + queryParameters: [Parameters.apiVersion], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/availableServiceTiers.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/availableServiceTiers.ts deleted file mode 100644 index acf75ce73d23..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/availableServiceTiers.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - AvailableServiceTiersListByWorkspaceOptionalParams, - AvailableServiceTiersListByWorkspaceResponse -} from "../models"; - -/** Interface representing a AvailableServiceTiers. */ -export interface AvailableServiceTiers { - /** - * 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 options parameters. - */ - listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: AvailableServiceTiersListByWorkspaceOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/clusters.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/clusters.ts deleted file mode 100644 index b83f2160fb22..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/clusters.ts +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - Cluster, - ClustersListByResourceGroupOptionalParams, - ClustersListOptionalParams, - ClustersCreateOrUpdateOptionalParams, - ClustersCreateOrUpdateResponse, - ClustersDeleteOptionalParams, - ClustersGetOptionalParams, - ClustersGetResponse, - ClusterPatch, - ClustersUpdateOptionalParams, - ClustersUpdateResponse -} from "../models"; - -/// -/** Interface representing a Clusters. */ -export interface Clusters { - /** - * Gets Log Analytics clusters in a resource group. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param options The options parameters. - */ - listByResourceGroup( - resourceGroupName: string, - options?: ClustersListByResourceGroupOptionalParams - ): PagedAsyncIterableIterator; - /** - * Gets the Log Analytics clusters in a subscription. - * @param options The options parameters. - */ - list( - options?: ClustersListOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - clusterName: string, - parameters: Cluster, - options?: ClustersCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ClustersCreateOrUpdateResponse - > - >; - /** - * 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 options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - clusterName: string, - parameters: Cluster, - options?: ClustersCreateOrUpdateOptionalParams - ): 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 options parameters. - */ - beginDelete( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise, void>>; - /** - * 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 options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - clusterName: string, - options?: ClustersDeleteOptionalParams - ): Promise; - /** - * 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 options parameters. - */ - get( - resourceGroupName: string, - clusterName: string, - options?: ClustersGetOptionalParams - ): 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 options parameters. - */ - beginUpdate( - resourceGroupName: string, - clusterName: string, - parameters: ClusterPatch, - options?: ClustersUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - ClustersUpdateResponse - > - >; - /** - * 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 options parameters. - */ - beginUpdateAndWait( - resourceGroupName: string, - clusterName: string, - parameters: ClusterPatch, - options?: ClustersUpdateOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/dataExports.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/dataExports.ts deleted file mode 100644 index ba9f15aa2a48..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/dataExports.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DataExport, - DataExportsListByWorkspaceOptionalParams, - DataExportsCreateOrUpdateOptionalParams, - DataExportsCreateOrUpdateResponse, - DataExportsGetOptionalParams, - DataExportsGetResponse, - DataExportsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a DataExports. */ -export interface DataExports { - /** - * 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 options parameters. - */ - listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: DataExportsListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - dataExportName: string, - parameters: DataExport, - options?: DataExportsCreateOrUpdateOptionalParams - ): 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - dataExportName: string, - options?: DataExportsGetOptionalParams - ): 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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - dataExportName: string, - options?: DataExportsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/dataSources.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/dataSources.ts deleted file mode 100644 index 9cd2b4b649f5..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/dataSources.ts +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - DataSource, - DataSourcesListByWorkspaceOptionalParams, - DataSourcesCreateOrUpdateOptionalParams, - DataSourcesCreateOrUpdateResponse, - DataSourcesDeleteOptionalParams, - DataSourcesGetOptionalParams, - DataSourcesGetResponse -} from "../models"; - -/// -/** Interface representing a DataSources. */ -export interface 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. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param filter The filter to apply on the operation. - * @param options The options parameters. - */ - listByWorkspace( - resourceGroupName: string, - workspaceName: string, - filter: string, - options?: DataSourcesListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator; - /** - * Create or update a data source. - * @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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - dataSourceName: string, - parameters: DataSource, - options?: DataSourcesCreateOrUpdateOptionalParams - ): Promise; - /** - * Deletes a data source instance. - * @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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - dataSourceName: string, - options?: DataSourcesDeleteOptionalParams - ): Promise; - /** - * Gets a datasource instance. - * @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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - dataSourceName: string, - options?: DataSourcesGetOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/gateways.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/gateways.ts deleted file mode 100644 index 21cd449ef202..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/gateways.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { GatewaysDeleteOptionalParams } from "../models"; - -/** Interface representing a Gateways. */ -export interface Gateways { - /** - * 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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - gatewayId: string, - options?: GatewaysDeleteOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/index.ts index c35fd126bd82..31ab0ed6274e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/index.ts @@ -6,23 +6,7 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -export * from "./dataExports"; -export * from "./dataSources"; -export * from "./intelligencePacks"; -export * from "./linkedServices"; -export * from "./linkedStorageAccounts"; -export * from "./managementGroups"; -export * from "./operationStatuses"; -export * from "./sharedKeysOperations"; -export * from "./usages"; -export * from "./storageInsightConfigs"; -export * from "./savedSearches"; -export * from "./availableServiceTiers"; -export * from "./gateways"; -export * from "./schema"; -export * from "./workspacePurge"; export * from "./operations"; export * from "./tables"; -export * from "./clusters"; export * from "./workspaces"; export * from "./deletedWorkspaces"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/intelligencePacks.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/intelligencePacks.ts deleted file mode 100644 index 5c75acf45f44..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/intelligencePacks.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - IntelligencePacksDisableOptionalParams, - IntelligencePacksEnableOptionalParams, - IntelligencePacksListOptionalParams, - IntelligencePacksListResponse -} from "../models"; - -/** Interface representing a IntelligencePacks. */ -export interface IntelligencePacks { - /** - * 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 options parameters. - */ - disable( - resourceGroupName: string, - workspaceName: string, - intelligencePackName: string, - options?: IntelligencePacksDisableOptionalParams - ): Promise; - /** - * 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 options parameters. - */ - enable( - resourceGroupName: string, - workspaceName: string, - intelligencePackName: string, - options?: IntelligencePacksEnableOptionalParams - ): Promise; - /** - * 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 options parameters. - */ - list( - resourceGroupName: string, - workspaceName: string, - options?: IntelligencePacksListOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedServices.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedServices.ts deleted file mode 100644 index af9aafa9234b..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedServices.ts +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { PollerLike, PollOperationState } from "@azure/core-lro"; -import { - LinkedService, - LinkedServicesListByWorkspaceOptionalParams, - LinkedServicesCreateOrUpdateOptionalParams, - LinkedServicesCreateOrUpdateResponse, - LinkedServicesDeleteOptionalParams, - LinkedServicesDeleteResponse, - LinkedServicesGetOptionalParams, - LinkedServicesGetResponse -} from "../models"; - -/// -/** Interface representing a LinkedServices. */ -export interface LinkedServices { - /** - * Gets the linked services instances in 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 options parameters. - */ - listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: LinkedServicesListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 options parameters. - */ - beginCreateOrUpdate( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - parameters: LinkedService, - options?: LinkedServicesCreateOrUpdateOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkedServicesCreateOrUpdateResponse - > - >; - /** - * 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 options parameters. - */ - beginCreateOrUpdateAndWait( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - parameters: LinkedService, - options?: LinkedServicesCreateOrUpdateOptionalParams - ): Promise; - /** - * 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 options parameters. - */ - beginDelete( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - options?: LinkedServicesDeleteOptionalParams - ): Promise< - PollerLike< - PollOperationState, - LinkedServicesDeleteResponse - > - >; - /** - * 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 options parameters. - */ - beginDeleteAndWait( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - options?: LinkedServicesDeleteOptionalParams - ): Promise; - /** - * Gets 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - linkedServiceName: string, - options?: LinkedServicesGetOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedStorageAccounts.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedStorageAccounts.ts deleted file mode 100644 index 8fd3c77715c2..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/linkedStorageAccounts.ts +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - LinkedStorageAccountsResource, - LinkedStorageAccountsListByWorkspaceOptionalParams, - DataSourceType, - LinkedStorageAccountsCreateOrUpdateOptionalParams, - LinkedStorageAccountsCreateOrUpdateResponse, - LinkedStorageAccountsDeleteOptionalParams, - LinkedStorageAccountsGetOptionalParams, - LinkedStorageAccountsGetResponse -} from "../models"; - -/// -/** Interface representing a LinkedStorageAccounts. */ -export interface LinkedStorageAccounts { - /** - * 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 options parameters. - */ - listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: LinkedStorageAccountsListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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. - * @param parameters The parameters required to create or update linked storage accounts. - * @param options The options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - dataSourceType: DataSourceType, - parameters: LinkedStorageAccountsResource, - options?: LinkedStorageAccountsCreateOrUpdateOptionalParams - ): 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. - * @param options The options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - dataSourceType: DataSourceType, - options?: LinkedStorageAccountsDeleteOptionalParams - ): Promise; - /** - * 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. - * @param options The options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - dataSourceType: DataSourceType, - options?: LinkedStorageAccountsGetOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/managementGroups.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/managementGroups.ts deleted file mode 100644 index 57ee649c45bf..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/managementGroups.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { ManagementGroup, ManagementGroupsListOptionalParams } from "../models"; - -/// -/** Interface representing a ManagementGroups. */ -export interface ManagementGroups { - /** - * 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 options parameters. - */ - list( - resourceGroupName: string, - workspaceName: string, - options?: ManagementGroupsListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/operationStatuses.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/operationStatuses.ts deleted file mode 100644 index 10c482497419..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/operationStatuses.ts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - OperationStatusesGetOptionalParams, - OperationStatusesGetResponse -} from "../models"; - -/** Interface representing a OperationStatuses. */ -export interface OperationStatuses { - /** - * 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 options parameters. - */ - get( - location: string, - asyncOperationId: string, - options?: OperationStatusesGetOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/savedSearches.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/savedSearches.ts deleted file mode 100644 index dfb1ad74d6c3..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/savedSearches.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - SavedSearchesDeleteOptionalParams, - SavedSearch, - SavedSearchesCreateOrUpdateOptionalParams, - SavedSearchesCreateOrUpdateResponse, - SavedSearchesGetOptionalParams, - SavedSearchesGetResponse, - SavedSearchesListByWorkspaceOptionalParams, - SavedSearchesListByWorkspaceResponse -} from "../models"; - -/** Interface representing a SavedSearches. */ -export interface SavedSearches { - /** - * 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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - savedSearchId: string, - options?: SavedSearchesDeleteOptionalParams - ): Promise; - /** - * 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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - savedSearchId: string, - parameters: SavedSearch, - options?: SavedSearchesCreateOrUpdateOptionalParams - ): 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - savedSearchId: string, - options?: SavedSearchesGetOptionalParams - ): 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 options parameters. - */ - listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: SavedSearchesListByWorkspaceOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/schema.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/schema.ts deleted file mode 100644 index 389270add2cb..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/schema.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { SchemaGetOptionalParams, SchemaGetResponse } from "../models"; - -/** Interface representing a Schema. */ -export interface Schema { - /** - * 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - options?: SchemaGetOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/sharedKeysOperations.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/sharedKeysOperations.ts deleted file mode 100644 index 0e1b57bb8d99..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/sharedKeysOperations.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - SharedKeysGetSharedKeysOptionalParams, - SharedKeysGetSharedKeysResponse, - SharedKeysRegenerateOptionalParams, - SharedKeysRegenerateResponse -} from "../models"; - -/** Interface representing a SharedKeysOperations. */ -export interface SharedKeysOperations { - /** - * 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 options parameters. - */ - getSharedKeys( - resourceGroupName: string, - workspaceName: string, - options?: SharedKeysGetSharedKeysOptionalParams - ): 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 options parameters. - */ - regenerate( - resourceGroupName: string, - workspaceName: string, - options?: SharedKeysRegenerateOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/storageInsightConfigs.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/storageInsightConfigs.ts deleted file mode 100644 index a4210e9f4994..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/storageInsightConfigs.ts +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { - StorageInsight, - StorageInsightConfigsListByWorkspaceOptionalParams, - StorageInsightConfigsCreateOrUpdateOptionalParams, - StorageInsightConfigsCreateOrUpdateResponse, - StorageInsightConfigsGetOptionalParams, - StorageInsightConfigsGetResponse, - StorageInsightConfigsDeleteOptionalParams -} from "../models"; - -/// -/** Interface representing a StorageInsightConfigs. */ -export interface StorageInsightConfigs { - /** - * 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 options parameters. - */ - listByWorkspace( - resourceGroupName: string, - workspaceName: string, - options?: StorageInsightConfigsListByWorkspaceOptionalParams - ): PagedAsyncIterableIterator; - /** - * 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 options parameters. - */ - createOrUpdate( - resourceGroupName: string, - workspaceName: string, - storageInsightName: string, - parameters: StorageInsight, - options?: StorageInsightConfigsCreateOrUpdateOptionalParams - ): 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 options parameters. - */ - get( - resourceGroupName: string, - workspaceName: string, - storageInsightName: string, - options?: StorageInsightConfigsGetOptionalParams - ): 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 options parameters. - */ - delete( - resourceGroupName: string, - workspaceName: string, - storageInsightName: string, - options?: StorageInsightConfigsDeleteOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/tables.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/tables.ts index a4bc04c610ee..9d616867770b 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/tables.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/tables.ts @@ -7,15 +7,18 @@ */ import { PagedAsyncIterableIterator } from "@azure/core-paging"; +import { PollerLike, PollOperationState } from "@azure/core-lro"; import { Table, TablesListByWorkspaceOptionalParams, + TablesCreateOrUpdateOptionalParams, + TablesCreateOrUpdateResponse, TablesUpdateOptionalParams, TablesUpdateResponse, - TablesCreateOptionalParams, - TablesCreateResponse, TablesGetOptionalParams, - TablesGetResponse + TablesGetResponse, + TablesDeleteOptionalParams, + TablesMigrateOptionalParams } from "../models"; /// @@ -33,35 +36,72 @@ export interface Tables { options?: TablesListByWorkspaceOptionalParams ): PagedAsyncIterableIterator
; /** - * Updates a Log Analytics workspace table properties. + * Update or Create a Log Analytics workspace table. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param tableName The name of the table. * @param parameters The parameters required to update table properties. * @param options The options parameters. */ - update( + beginCreateOrUpdate( + resourceGroupName: string, + workspaceName: string, + tableName: string, + parameters: Table, + options?: TablesCreateOrUpdateOptionalParams + ): Promise< + PollerLike< + PollOperationState, + TablesCreateOrUpdateResponse + > + >; + /** + * Update or Create a Log Analytics workspace table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param parameters The parameters required to update table properties. + * @param options The options parameters. + */ + beginCreateOrUpdateAndWait( + resourceGroupName: string, + workspaceName: string, + tableName: string, + parameters: Table, + options?: TablesCreateOrUpdateOptionalParams + ): Promise; + /** + * Update a Log Analytics workspace table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param parameters The parameters required to update table properties. + * @param options The options parameters. + */ + beginUpdate( resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, options?: TablesUpdateOptionalParams - ): Promise; + ): Promise< + PollerLike, TablesUpdateResponse> + >; /** - * Updates a Log Analytics workspace table properties. + * Update a Log Analytics workspace table. * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param tableName The name of the table. * @param parameters The parameters required to update table properties. * @param options The options parameters. */ - create( + beginUpdateAndWait( resourceGroupName: string, workspaceName: string, tableName: string, parameters: Table, - options?: TablesCreateOptionalParams - ): Promise; + options?: TablesUpdateOptionalParams + ): Promise; /** * Gets a Log Analytics workspace table. * @param resourceGroupName The name of the resource group. The name is case insensitive. @@ -75,4 +115,44 @@ export interface Tables { tableName: string, options?: TablesGetOptionalParams ): Promise; + /** + * Delete a Log Analytics workspace table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param options The options parameters. + */ + beginDelete( + resourceGroupName: string, + workspaceName: string, + tableName: string, + options?: TablesDeleteOptionalParams + ): Promise, void>>; + /** + * Delete a Log Analytics workspace table. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param options The options parameters. + */ + beginDeleteAndWait( + resourceGroupName: string, + workspaceName: string, + tableName: string, + options?: TablesDeleteOptionalParams + ): Promise; + /** + * Migrate a Log Analytics table from support of the Data Collector API and Custom Fields features to + * support of Data Collection Rule-based Custom Logs. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param tableName The name of the table. + * @param options The options parameters. + */ + migrate( + resourceGroupName: string, + workspaceName: string, + tableName: string, + options?: TablesMigrateOptionalParams + ): Promise; } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/usages.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/usages.ts deleted file mode 100644 index 8f185fd19382..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/usages.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { PagedAsyncIterableIterator } from "@azure/core-paging"; -import { UsageMetric, UsagesListOptionalParams } from "../models"; - -/// -/** Interface representing a Usages. */ -export interface Usages { - /** - * 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 options parameters. - */ - list( - resourceGroupName: string, - workspaceName: string, - options?: UsagesListOptionalParams - ): PagedAsyncIterableIterator; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/workspacePurge.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/workspacePurge.ts deleted file mode 100644 index 6ef05b2fd144..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/workspacePurge.ts +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) Microsoft Corporation. - * Licensed under the MIT License. - * - * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is regenerated. - */ - -import { - WorkspacePurgeBody, - WorkspacePurgePurgeOptionalParams, - WorkspacePurgePurgeResponse, - WorkspacePurgeGetPurgeStatusOptionalParams, - WorkspacePurgeGetPurgeStatusResponse -} from "../models"; - -/** Interface representing a WorkspacePurge. */ -export interface WorkspacePurge { - /** - * 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 options parameters. - */ - purge( - resourceGroupName: string, - workspaceName: string, - body: WorkspacePurgeBody, - options?: WorkspacePurgePurgeOptionalParams - ): 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 options parameters. - */ - getPurgeStatus( - resourceGroupName: string, - workspaceName: string, - purgeId: string, - options?: WorkspacePurgeGetPurgeStatusOptionalParams - ): Promise; -} diff --git a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json index 6e3251194117..3e6ae96443f3 100644 --- a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json +++ b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json @@ -9,11 +9,19 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6", "dom"], + "lib": [ + "es6", + "dom" + ], "declaration": true, "outDir": "./dist-esm", "importHelpers": true }, - "include": ["./src/**/*.ts", "./test/**/*.ts"], - "exclude": ["node_modules"] -} + "include": [ + "./src/**/*.ts", + "./test/**/*.ts" + ], + "exclude": [ + "node_modules" + ] +} \ No newline at end of file diff --git a/sdk/operationalinsights/ci.mgmt.yml b/sdk/operationalinsights/ci.mgmt.yml index f547faf6e4ec..92f95f57de6b 100644 --- a/sdk/operationalinsights/ci.mgmt.yml +++ b/sdk/operationalinsights/ci.mgmt.yml @@ -1,5 +1,5 @@ # NOTE: Please refer to https://aka.ms/azsdk/engsys/ci-yaml before editing this file. - + trigger: branches: include: @@ -10,6 +10,7 @@ trigger: include: - sdk/operationalinsights/ci.mgmt.yml - sdk/operationalinsights/arm-operationalinsights/ + - sdk/operationalinsights/arm-operationalinsights pr: branches: include: @@ -23,11 +24,11 @@ pr: include: - sdk/operationalinsights/ci.mgmt.yml - sdk/operationalinsights/arm-operationalinsights/ - + - sdk/operationalinsights/arm-operationalinsights extends: template: /eng/pipelines/templates/stages/archetype-sdk-client.yml parameters: ServiceDirectory: operationalinsights Artifacts: - name: azure-arm-operationalinsights - safeName: azurearmoperationalinsights \ No newline at end of file + safeName: azurearmoperationalinsights