From 56e77e9e50a8830044b7a47a04c297ad80c7c719 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 8 Apr 2022 05:47:12 +0000 Subject: [PATCH] CodeGen from PR 18615 in Azure/azure-rest-api-specs Merge f8bc6f9ca7a9abaa3f12da0fc5a75ca7d700c3d6 into 14007e94fb70fa6b401deba1c4b16f9fba71340b --- common/config/rush/pnpm-lock.yaml | 36 +- .../arm-operationalinsights/CHANGELOG.md | 118 +- .../arm-operationalinsights/LICENSE | 2 +- .../arm-operationalinsights/README.md | 2 +- .../arm-operationalinsights/_meta.json | 7 +- .../api-extractor.json | 25 +- .../arm-operationalinsights/package.json | 8 +- .../review/arm-operationalinsights.api.md | 466 +++- .../src/models/index.ts | 900 ++++++- .../src/models/mappers.ts | 2152 ++++++++++++----- .../src/models/parameters.ts | 204 +- .../operationalInsightsManagementClient.ts | 38 +- .../src/operations/availableServiceTiers.ts | 2 +- .../src/operations/clusters.ts | 4 +- .../src/operations/dataExports.ts | 8 +- .../src/operations/dataSources.ts | 14 +- .../src/operations/deletedWorkspaces.ts | 4 +- .../src/operations/gateways.ts | 2 +- .../src/operations/index.ts | 8 +- .../src/operations/intelligencePacks.ts | 6 +- .../src/operations/linkedServices.ts | 8 +- .../src/operations/linkedStorageAccounts.ts | 8 +- .../src/operations/managementGroups.ts | 2 +- .../src/operations/operationStatuses.ts | 2 +- .../src/operations/operations.ts | 4 +- .../src/operations/queries.ts | 564 +++++ .../src/operations/queryPacks.ts | 451 ++++ .../src/operations/savedSearches.ts | 8 +- .../{schema.ts => schemaOperations.ts} | 10 +- .../src/operations/sharedKeysOperations.ts | 4 +- .../src/operations/storageInsightConfigs.ts | 14 +- .../src/operations/tables.ts | 368 ++- .../src/operations/usages.ts | 2 +- .../src/operations/workspacePurge.ts | 4 +- .../src/operations/workspaces.ts | 16 +- .../src/operationsInterfaces/index.ts | 8 +- .../src/operationsInterfaces/queries.ts | 111 + .../src/operationsInterfaces/queryPacks.ts | 93 + .../{schema.ts => schemaOperations.ts} | 4 +- .../src/operationsInterfaces/tables.ts | 100 +- .../arm-operationalinsights/tsconfig.json | 16 +- sdk/operationalinsights/ci.mgmt.yml | 7 +- 42 files changed, 4814 insertions(+), 996 deletions(-) create mode 100644 sdk/operationalinsights/arm-operationalinsights/src/operations/queries.ts create mode 100644 sdk/operationalinsights/arm-operationalinsights/src/operations/queryPacks.ts rename sdk/operationalinsights/arm-operationalinsights/src/operations/{schema.ts => schemaOperations.ts} (86%) create mode 100644 sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/queries.ts create mode 100644 sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/queryPacks.ts rename sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/{schema.ts => schemaOperations.ts} (88%) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index f10690b25978..89b6dc15aaae 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -657,6 +657,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'} @@ -11720,11 +11735,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 @@ -11967,23 +11983,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 @@ -16529,7 +16545,7 @@ packages: dev: false file:projects/schema-registry-avro.tgz: - resolution: {integrity: sha512-ADG9wO8rIljoktGdVnP+v8jdrxc43TL0hQgHi7cSXkrJxFGGB6M8XqcDhuT8hYCLfLkRzCwpwH7VSnsjBDVdpg==, tarball: file:projects/schema-registry-avro.tgz} + resolution: {integrity: sha512-9TumFphoGCJiaHQVfz2Z9AsSbhal4ZtZWx7L9fG19JdfEZKJT5uUykYq81plFNWAReFMs83oFPUO//K+BhRuLQ==, tarball: file:projects/schema-registry-avro.tgz} name: '@rush-temp/schema-registry-avro' version: 0.0.0 dependencies: @@ -17674,7 +17690,7 @@ packages: dev: false file:projects/web-pubsub.tgz: - resolution: {integrity: sha512-7qvVc3+mTZX3L5BoserPH04Nwu7kDUUNR5KCtK+ugSa+uTQ5jM0uPXJ3sxgajKuLX+a63eftQtMg2Zcf9K3HZw==, tarball: file:projects/web-pubsub.tgz} + resolution: {integrity: sha512-vAYE6Sk0Olihti+uB+3ac0P3Y+d/XtBXwF2rq0PblaciuLhY/J/3+Y9dpOYDpgTiTyZuAmm+7DDRAq8AYkSETQ==, tarball: file:projects/web-pubsub.tgz} name: '@rush-temp/web-pubsub' version: 0.0.0 dependencies: diff --git a/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md b/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md index 241df1494951..c447e220fe47 100644 --- a/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md +++ b/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md @@ -1,15 +1,117 @@ # Release History + +## 9.0.0-beta.1 (2022-04-08) + +**Features** -## 8.0.1 (Unreleased) + - Added operation group Queries + - Added operation group QueryPacks + - Added operation group SchemaOperations + - 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 AzureResourceProperties + - Added Interface Column + - Added Interface LogAnalyticsQueryPackListResult + - Added Interface LogAnalyticsQueryPackQueryListResult + - Added Interface LogAnalyticsQueryPackQueryPropertiesRelated + - Added Interface LogAnalyticsQueryPackQuerySearchProperties + - Added Interface LogAnalyticsQueryPackQuerySearchPropertiesRelated + - Added Interface QueriesDeleteOptionalParams + - Added Interface QueriesGetOptionalParams + - Added Interface QueriesListNextOptionalParams + - Added Interface QueriesListOptionalParams + - Added Interface QueriesPutOptionalParams + - Added Interface QueriesSearchNextOptionalParams + - Added Interface QueriesSearchOptionalParams + - Added Interface QueriesUpdateOptionalParams + - Added Interface QueryPacksCreateOrUpdateOptionalParams + - Added Interface QueryPacksDeleteOptionalParams + - Added Interface QueryPacksGetOptionalParams + - Added Interface QueryPacksListByResourceGroupNextOptionalParams + - Added Interface QueryPacksListByResourceGroupOptionalParams + - Added Interface QueryPacksListNextOptionalParams + - Added Interface QueryPacksListOptionalParams + - Added Interface QueryPacksResource + - Added Interface QueryPacksUpdateTagsOptionalParams + - Added Interface RestoredLogs + - Added Interface ResultStatistics + - Added Interface Schema + - Added Interface SearchResults + - Added Interface SystemData + - Added Interface SystemDataAutoGenerated + - Added Interface TablesCreateOrUpdateOptionalParams + - Added Interface TablesDeleteOptionalParams + - Added Interface TablesMigrateOptionalParams + - Added Interface TagsResource + - Added Type Alias ColumnDataTypeHintEnum + - Added Type Alias ColumnTypeEnum + - Added Type Alias CreatedByType + - Added Type Alias LogAnalyticsQueryPack + - Added Type Alias LogAnalyticsQueryPackQuery + - Added Type Alias ProvisioningStateEnum + - Added Type Alias QueriesGetResponse + - Added Type Alias QueriesListNextResponse + - Added Type Alias QueriesListResponse + - Added Type Alias QueriesPutResponse + - Added Type Alias QueriesSearchNextResponse + - Added Type Alias QueriesSearchResponse + - Added Type Alias QueriesUpdateResponse + - Added Type Alias QueryPacksCreateOrUpdateResponse + - Added Type Alias QueryPacksGetResponse + - Added Type Alias QueryPacksListByResourceGroupNextResponse + - Added Type Alias QueryPacksListByResourceGroupResponse + - Added Type Alias QueryPacksListNextResponse + - Added Type Alias QueryPacksListResponse + - Added Type Alias QueryPacksUpdateTagsResponse + - Added Type Alias SourceEnum + - Added Type Alias TablePlanEnum + - Added Type Alias TablesCreateOrUpdateResponse + - Added Type Alias TableSubTypeEnum + - Added Type Alias TableTypeEnum + - Interface TablesUpdateOptionalParams has a new optional parameter resumeFrom + - Interface TablesUpdateOptionalParams has a new optional parameter updateIntervalInMs + - Class OperationalInsightsManagementClient has a new parameter queries + - Class OperationalInsightsManagementClient has a new parameter queryPacks + - Class OperationalInsightsManagementClient has a new parameter schemaOperations + - 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 KnownIdentityType + - 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 Schema + - Removed operation Tables.create + - Removed operation Tables.update + - Class OperationalInsightsManagementClient no longer has parameter schema + - Type Alias Table no longer has parameter isTroubleshootingAllowed + - Type Alias Table no longer has parameter isTroubleshootEnabled + - Type Alias Table no longer has parameter lastTroubleshootDate + + ## 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/README.md b/sdk/operationalinsights/arm-operationalinsights/README.md index 92b533096dd9..ef60c84fbe53 100644 --- a/sdk/operationalinsights/arm-operationalinsights/README.md +++ b/sdk/operationalinsights/arm-operationalinsights/README.md @@ -6,7 +6,7 @@ Operational Insights Client [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationalinsights/arm-operationalinsights) | [Package (NPM)](https://www.npmjs.com/package/@azure/arm-operationalinsights) | -[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-operationalinsights) | +[API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-operationalinsights?view=azure-node-preview) | [Samples](https://github.com/Azure-Samples/azure-samples-js-management) ## Getting started diff --git a/sdk/operationalinsights/arm-operationalinsights/_meta.json b/sdk/operationalinsights/arm-operationalinsights/_meta.json index bee68d8804c8..ffa5ae8bdd50 100644 --- a/sdk/operationalinsights/arm-operationalinsights/_meta.json +++ b/sdk/operationalinsights/arm-operationalinsights/_meta.json @@ -1,7 +1,8 @@ { - "commit": "ea0f7b072ad3aaff203ea9003246b9e584b819ff", + "commit": "627c6e50437e88f99a6c89b34361dd2fabd69980", "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=/mnt/vss/_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.2.6", + "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..0435a1b580fe 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-beta.1", "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..425311775ffa 100644 --- a/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md +++ b/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md @@ -46,6 +46,14 @@ export type AzureEntityResource = Resource & { readonly etag?: string; }; +// @public +export interface AzureResourceProperties { + readonly id?: string; + readonly name?: string; + readonly systemData?: SystemData; + readonly type?: string; +} + // @public export type BillingType = string; @@ -178,12 +186,32 @@ export interface ClustersUpdateOptionalParams extends coreClient.OperationOption // @public export type ClustersUpdateResponse = Cluster; +// @public +export interface Column { + dataTypeHint?: ColumnDataTypeHintEnum; + description?: string; + displayName?: string; + readonly isDefaultDisplay?: boolean; + readonly isHidden?: boolean; + name?: string; + type?: ColumnTypeEnum; +} + +// @public +export type ColumnDataTypeHintEnum = string; + +// @public +export type ColumnTypeEnum = string; + // @public export interface CoreSummary { numberOfDocuments: number; status?: string; } +// @public +export type CreatedByType = string; + // @public export type DataExport = ProxyResource & { dataExportId?: string; @@ -366,7 +394,7 @@ export interface Identity { } // @public -export type IdentityType = "SystemAssigned" | "UserAssigned" | "None"; +export type IdentityType = string; // @public export interface IntelligencePack { @@ -437,6 +465,46 @@ export enum KnownClusterSkuNameEnum { CapacityReservation = "CapacityReservation" } +// @public +export enum KnownColumnDataTypeHintEnum { + ArmPath = "armPath", + Guid = "guid", + Ip = "ip", + Uri = "uri" +} + +// @public +export enum KnownColumnTypeEnum { + // (undocumented) + Boolean = "boolean", + // (undocumented) + DateTime = "dateTime", + // (undocumented) + Dynamic = "dynamic", + // (undocumented) + Guid = "guid", + // (undocumented) + Int = "int", + // (undocumented) + Long = "long", + // (undocumented) + Real = "real", + // (undocumented) + String = "string" +} + +// @public +export enum KnownCreatedByType { + // (undocumented) + Application = "Application", + // (undocumented) + Key = "Key", + // (undocumented) + ManagedIdentity = "ManagedIdentity", + // (undocumented) + User = "User" +} + // @public export enum KnownDataIngestionStatus { ApproachingQuota = "ApproachingQuota", @@ -517,6 +585,24 @@ export enum KnownDataSourceKind { WindowsTelemetry = "WindowsTelemetry" } +// @public +export enum KnownIdentityType { + // (undocumented) + Application = "application", + // (undocumented) + Key = "key", + // (undocumented) + ManagedIdentity = "managedIdentity", + // (undocumented) + None = "None", + // (undocumented) + SystemAssigned = "SystemAssigned", + // (undocumented) + User = "user", + // (undocumented) + UserAssigned = "UserAssigned" +} + // @public export enum KnownLinkedServiceEntityStatus { // (undocumented) @@ -529,6 +615,13 @@ export enum KnownLinkedServiceEntityStatus { Updating = "Updating" } +// @public +export enum KnownProvisioningStateEnum { + InProgress = "InProgress", + Succeeded = "Succeeded", + Updating = "Updating" +} + // @public export enum KnownPublicNetworkAccessType { Disabled = "Disabled", @@ -569,6 +662,12 @@ export enum KnownSkuNameEnum { Standard = "Standard" } +// @public +export enum KnownSourceEnum { + Customer = "customer", + Microsoft = "microsoft" +} + // @public export enum KnownStorageInsightState { // (undocumented) @@ -577,6 +676,27 @@ export enum KnownStorageInsightState { OK = "OK" } +// @public +export enum KnownTablePlanEnum { + Analytics = "Analytics", + Basic = "Basic" +} + +// @public +export enum KnownTableSubTypeEnum { + Any = "Any", + Classic = "Classic", + DataCollectionRuleBased = "DataCollectionRuleBased" +} + +// @public +export enum KnownTableTypeEnum { + CustomLog = "CustomLog", + Microsoft = "Microsoft", + RestoredLogs = "RestoredLogs", + SearchResults = "SearchResults" +} + // @public export enum KnownType { // (undocumented) @@ -727,6 +847,64 @@ export type LinkedStorageAccountsResource = ProxyResource & { storageAccountIds?: string[]; }; +// @public +export type LogAnalyticsQueryPack = QueryPacksResource & { + readonly queryPackId?: string; + readonly timeCreated?: Date; + readonly timeModified?: Date; + readonly provisioningState?: string; +}; + +// @public +export interface LogAnalyticsQueryPackListResult { + nextLink?: string; + value: LogAnalyticsQueryPack[]; +} + +// @public +export type LogAnalyticsQueryPackQuery = AzureResourceProperties & { + readonly idPropertiesId?: string; + displayName?: string; + readonly timeCreated?: Date; + readonly timeModified?: Date; + readonly author?: string; + description?: string; + body?: string; + related?: LogAnalyticsQueryPackQueryPropertiesRelated; + tags?: { + [propertyName: string]: string[]; + }; + properties?: Record; +}; + +// @public +export interface LogAnalyticsQueryPackQueryListResult { + nextLink?: string; + value: LogAnalyticsQueryPackQuery[]; +} + +// @public +export interface LogAnalyticsQueryPackQueryPropertiesRelated { + categories?: string[]; + resourceTypes?: string[]; + solutions?: string[]; +} + +// @public +export interface LogAnalyticsQueryPackQuerySearchProperties { + related?: LogAnalyticsQueryPackQuerySearchPropertiesRelated; + tags?: { + [propertyName: string]: string[]; + }; +} + +// @public +export interface LogAnalyticsQueryPackQuerySearchPropertiesRelated { + categories?: string[]; + resourceTypes?: string[]; + solutions?: string[]; +} + // @public export interface ManagementGroup { created?: Date; @@ -793,9 +971,13 @@ export class OperationalInsightsManagementClient extends coreClient.ServiceClien // (undocumented) operationStatuses: OperationStatuses; // (undocumented) + queries: Queries; + // (undocumented) + queryPacks: QueryPacks; + // (undocumented) savedSearches: SavedSearches; // (undocumented) - schema: Schema; + schemaOperations: SchemaOperations; // (undocumented) sharedKeysOperations: SharedKeysOperations; // (undocumented) @@ -879,6 +1061,9 @@ export interface PrivateLinkScopedResource { scopeId?: string; } +// @public +export type ProvisioningStateEnum = string; + // @public export type ProxyResource = Resource & {}; @@ -888,6 +1073,155 @@ export type PublicNetworkAccessType = string; // @public export type PurgeState = string; +// @public +export interface Queries { + delete(resourceGroupName: string, queryPackName: string, id: string, options?: QueriesDeleteOptionalParams): Promise; + get(resourceGroupName: string, queryPackName: string, id: string, options?: QueriesGetOptionalParams): Promise; + list(resourceGroupName: string, queryPackName: string, options?: QueriesListOptionalParams): PagedAsyncIterableIterator; + listSearch(resourceGroupName: string, queryPackName: string, querySearchProperties: LogAnalyticsQueryPackQuerySearchProperties, options?: QueriesSearchOptionalParams): PagedAsyncIterableIterator; + put(resourceGroupName: string, queryPackName: string, id: string, queryPayload: LogAnalyticsQueryPackQuery, options?: QueriesPutOptionalParams): Promise; + update(resourceGroupName: string, queryPackName: string, id: string, queryPayload: LogAnalyticsQueryPackQuery, options?: QueriesUpdateOptionalParams): Promise; +} + +// @public +export interface QueriesDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface QueriesGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueriesGetResponse = LogAnalyticsQueryPackQuery; + +// @public +export interface QueriesListNextOptionalParams extends coreClient.OperationOptions { + includeBody?: boolean; + skipToken?: string; + top?: number; +} + +// @public +export type QueriesListNextResponse = LogAnalyticsQueryPackQueryListResult; + +// @public +export interface QueriesListOptionalParams extends coreClient.OperationOptions { + includeBody?: boolean; + skipToken?: string; + top?: number; +} + +// @public +export type QueriesListResponse = LogAnalyticsQueryPackQueryListResult; + +// @public +export interface QueriesPutOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueriesPutResponse = LogAnalyticsQueryPackQuery; + +// @public +export interface QueriesSearchNextOptionalParams extends coreClient.OperationOptions { + includeBody?: boolean; + skipToken?: string; + top?: number; +} + +// @public +export type QueriesSearchNextResponse = LogAnalyticsQueryPackQueryListResult; + +// @public +export interface QueriesSearchOptionalParams extends coreClient.OperationOptions { + includeBody?: boolean; + skipToken?: string; + top?: number; +} + +// @public +export type QueriesSearchResponse = LogAnalyticsQueryPackQueryListResult; + +// @public +export interface QueriesUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueriesUpdateResponse = LogAnalyticsQueryPackQuery; + +// @public +export interface QueryPacks { + createOrUpdate(resourceGroupName: string, queryPackName: string, logAnalyticsQueryPackPayload: LogAnalyticsQueryPack, options?: QueryPacksCreateOrUpdateOptionalParams): Promise; + delete(resourceGroupName: string, queryPackName: string, options?: QueryPacksDeleteOptionalParams): Promise; + get(resourceGroupName: string, queryPackName: string, options?: QueryPacksGetOptionalParams): Promise; + list(options?: QueryPacksListOptionalParams): PagedAsyncIterableIterator; + listByResourceGroup(resourceGroupName: string, options?: QueryPacksListByResourceGroupOptionalParams): PagedAsyncIterableIterator; + updateTags(resourceGroupName: string, queryPackName: string, queryPackTags: TagsResource, options?: QueryPacksUpdateTagsOptionalParams): Promise; +} + +// @public +export interface QueryPacksCreateOrUpdateOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueryPacksCreateOrUpdateResponse = LogAnalyticsQueryPack; + +// @public +export interface QueryPacksDeleteOptionalParams extends coreClient.OperationOptions { +} + +// @public +export interface QueryPacksGetOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueryPacksGetResponse = LogAnalyticsQueryPack; + +// @public +export interface QueryPacksListByResourceGroupNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueryPacksListByResourceGroupNextResponse = LogAnalyticsQueryPackListResult; + +// @public +export interface QueryPacksListByResourceGroupOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueryPacksListByResourceGroupResponse = LogAnalyticsQueryPackListResult; + +// @public +export interface QueryPacksListNextOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueryPacksListNextResponse = LogAnalyticsQueryPackListResult; + +// @public +export interface QueryPacksListOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueryPacksListResponse = LogAnalyticsQueryPackListResult; + +// @public +export interface QueryPacksResource { + readonly id?: string; + location: string; + readonly name?: string; + tags?: { + [propertyName: string]: string; + }; + readonly type?: string; +} + +// @public +export interface QueryPacksUpdateTagsOptionalParams extends coreClient.OperationOptions { +} + +// @public +export type QueryPacksUpdateTagsResponse = LogAnalyticsQueryPack; + // @public export interface Resource { readonly id?: string; @@ -895,6 +1229,19 @@ export interface Resource { readonly type?: string; } +// @public +export interface RestoredLogs { + endRestoreTime?: Date; + sourceTable?: string; + startRestoreTime?: Date; +} + +// @public +export interface ResultStatistics { + readonly ingestedRecords?: number; + readonly progress?: number; +} + // @public export type SavedSearch = ProxyResource & { etag?: string; @@ -947,7 +1294,19 @@ export interface SavedSearchesListResult { // @public export interface Schema { - get(resourceGroupName: string, workspaceName: string, options?: SchemaGetOptionalParams): Promise; + readonly categories?: string[]; + columns?: Column[]; + description?: string; + displayName?: string; + readonly labels?: string[]; + name?: string; + readonly restoredLogs?: RestoredLogs; + readonly searchResults?: SearchResults; + readonly solutions?: string[]; + readonly source?: SourceEnum; + readonly standardColumns?: Column[]; + readonly tableSubType?: TableSubTypeEnum; + readonly tableType?: TableTypeEnum; } // @public @@ -957,6 +1316,11 @@ export interface SchemaGetOptionalParams extends coreClient.OperationOptions { // @public export type SchemaGetResponse = SearchGetSchemaResponse; +// @public +export interface SchemaOperations { + get(resourceGroupName: string, workspaceName: string, options?: SchemaGetOptionalParams): Promise; +} + // @public export interface SearchGetSchemaResponse { metadata?: SearchMetadata; @@ -990,6 +1354,16 @@ export interface SearchMetadataSchema { version?: number; } +// @public +export interface SearchResults { + description?: string; + endSearchTime?: Date; + limit?: number; + query?: string; + readonly sourceTable?: string; + startSearchTime?: Date; +} + // @public export interface SearchSchemaValue { displayName?: string; @@ -1039,6 +1413,9 @@ export type SharedKeysRegenerateResponse = SharedKeys; // @public export type SkuNameEnum = string; +// @public +export type SourceEnum = string; + // @public export interface StorageAccount { id: string; @@ -1112,28 +1489,71 @@ export interface StorageInsightStatus { state: StorageInsightState; } +// @public +export interface SystemData { + createdAt?: Date; + createdBy?: string; + createdByType?: IdentityType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: IdentityType; +} + +// @public +export interface SystemDataAutoGenerated { + createdAt?: Date; + createdBy?: string; + createdByType?: CreatedByType; + lastModifiedAt?: Date; + lastModifiedBy?: string; + lastModifiedByType?: CreatedByType; +} + // @public export type Table = ProxyResource & { + readonly systemData?: SystemDataAutoGenerated; 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,19 +1574,38 @@ 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 type TableTypeEnum = string; + // @public export interface Tag { name: string; value: string; } +// @public +export interface TagsResource { + tags?: { + [propertyName: string]: string; + }; +} + // @public export type TrackedResource = Resource & { tags?: { @@ -1208,8 +1647,9 @@ export interface UserIdentityProperties { // @public export type Workspace = TrackedResource & { + readonly systemData?: SystemDataAutoGenerated; eTag?: string; - provisioningState?: WorkspaceEntityStatus; + readonly provisioningState?: WorkspaceEntityStatus; readonly customerId?: string; sku?: WorkspaceSku; retentionInDays?: number; @@ -1221,6 +1661,7 @@ export type Workspace = TrackedResource & { forceCmkForQuery?: boolean; readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; features?: WorkspaceFeatures; + defaultDataCollectionRuleResourceId?: string; }; // @public @@ -1263,7 +1704,7 @@ export type WorkspacePatch = AzureEntityResource & { tags?: { [propertyName: string]: string; }; - provisioningState?: WorkspaceEntityStatus; + readonly provisioningState?: WorkspaceEntityStatus; readonly customerId?: string; sku?: WorkspaceSku; retentionInDays?: number; @@ -1275,6 +1716,7 @@ export type WorkspacePatch = AzureEntityResource & { forceCmkForQuery?: boolean; readonly privateLinkScopedResources?: PrivateLinkScopedResource[]; features?: WorkspaceFeatures; + defaultDataCollectionRuleResourceId?: string; }; // @public diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts index 1c2538c724e2..7f346af4dfc2 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[]; +/** Describes the list of Log Analytics QueryPack resources. */ +export interface LogAnalyticsQueryPackListResult { + /** List of Log Analytics QueryPack definitions. */ + value: LogAnalyticsQueryPack[]; + /** The URI to get the next set of Log Analytics QueryPack definitions if too many QueryPacks where returned in the result set. */ + nextLink?: string; } -/** Common fields that are returned in the response for all Azure Resource Manager resources */ -export interface Resource { +/** An azure resource object */ +export interface QueryPacksResource { /** - * Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + * Azure resource Id * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly id?: string; /** - * The name of the resource + * Azure resource name * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly name?: string; /** - * The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + * Azure resource type * NOTE: This property will not be serialized. It can only be populated by the server. */ readonly type?: string; + /** Resource location */ + location: string; + /** Resource tags */ + tags?: { [propertyName: string]: 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,6 +88,113 @@ export interface ErrorAdditionalInfo { readonly info?: Record; } +/** A container holding only the Tags for a resource, allowing the user to update the tags on a QueryPack instance. */ +export interface TagsResource { + /** Resource tags */ + tags?: { [propertyName: string]: string }; +} + +/** Describes the list of Log Analytics QueryPack-Query resources. */ +export interface LogAnalyticsQueryPackQueryListResult { + /** List of Log Analytics QueryPack Query definitions. */ + value: LogAnalyticsQueryPackQuery[]; + /** The URI to get the next set of Log Analytics QueryPack definitions if too many QueryPack-Queries where returned in the result set. */ + nextLink?: string; +} + +/** The related metadata items for the function. */ +export interface LogAnalyticsQueryPackQueryPropertiesRelated { + /** The related categories for the function. */ + categories?: string[]; + /** The related resource types for the function. */ + resourceTypes?: string[]; + /** The related Log Analytics solutions for the function. */ + solutions?: string[]; +} + +/** An Azure resource QueryPack-Query object */ +export interface AzureResourceProperties { + /** + * Azure resource Id + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly id?: string; + /** + * Azure resource name + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly name?: string; + /** + * Azure resource type + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly type?: string; + /** + * Read only system data + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly systemData?: SystemData; +} + +/** Read only system data */ +export interface SystemData { + /** An identifier for the identity that created the resource */ + createdBy?: string; + /** The type of identity that created the resource */ + createdByType?: IdentityType; + /** The timestamp of resource creation (UTC) */ + createdAt?: Date; + /** An identifier for the identity that last modified the resource */ + lastModifiedBy?: string; + /** The type of identity that last modified the resource */ + lastModifiedByType?: IdentityType; + /** The timestamp of resource last modification (UTC) */ + lastModifiedAt?: Date; +} + +/** Properties that define an Log Analytics QueryPack-Query search properties. */ +export interface LogAnalyticsQueryPackQuerySearchProperties { + /** The related metadata items for the function. */ + related?: LogAnalyticsQueryPackQuerySearchPropertiesRelated; + /** Tags associated with the query. */ + tags?: { [propertyName: string]: string[] }; +} + +/** The related metadata items for the function. */ +export interface LogAnalyticsQueryPackQuerySearchPropertiesRelated { + /** The related categories for the function. */ + categories?: string[]; + /** The related resource types for the function. */ + resourceTypes?: string[]; + /** The related Log Analytics solutions for the function. */ + solutions?: string[]; +} + +/** 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; + /** + * 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 type?: string; +} + /** The list data source by workspace operation response. */ export interface DataSourceListResult { /** A list of datasources. */ @@ -389,43 +502,6 @@ export interface WorkspacePurgeStatusResponse { 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[]; - /** - * URL to get the next set of operation list results if there are any. - * NOTE: This property will not be serialized. It can only be populated by the server. - */ - readonly nextLink?: string; -} - -/** 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. */ @@ -538,6 +614,37 @@ export interface ClusterPatch { billingType?: BillingType; } +/** Result of the request to list solution operations. */ +export interface OperationListResult { + /** List of solution operations supported by the OperationsManagement resource provider. */ + value?: Operation[]; + /** + * URL to get the next set of operation list results if there are any. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly nextLink?: string; +} + +/** 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 workspaces operation response. */ export interface WorkspaceListResult { /** A list of workspaces. */ @@ -597,12 +704,218 @@ export interface WorkspaceFeatures { disableLocalAuth?: boolean; } +/** Metadata pertaining to creation and last modification of the resource. */ +export interface SystemDataAutoGenerated { + /** 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 tables operation response. */ +export interface TablesListResult { + /** A list of data tables. */ + value?: Table[]; +} + +/** 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; +} + +/** 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; +} + +/** Search job execution statistics. */ +export interface ResultStatistics { + /** + * Search job completion percentage. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly progress?: number; + /** + * 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 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[]; + /** + * A list of table standard columns. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly standardColumns?: Column[]; + /** + * Table category. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly categories?: string[]; + /** + * Table labels. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly labels?: string[]; + /** + * Table's creator. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly source?: SourceEnum; + /** + * Table's creator. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly tableType?: TableTypeEnum; + /** + * 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 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[]; + /** + * 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 searchResults?: SearchResults; + /** + * 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 restoredLogs?: RestoredLogs; +} + +/** 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; + /** + * Is displayed by default. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isDefaultDisplay?: boolean; + /** + * Is column hidden. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly isHidden?: boolean; +} + /** DataSource filter. Right now, only filter by kind is supported. */ export interface DataSourceFilter { /** The kind of the DataSource. */ kind?: DataSourceKind; } +/** An Log Analytics QueryPack definition. */ +export type LogAnalyticsQueryPack = QueryPacksResource & { + /** + * The unique ID of your application. This field cannot be changed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly queryPackId?: string; + /** + * Creation Date for the Log Analytics QueryPack, in ISO 8601 format. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeCreated?: Date; + /** + * Last modified date of the Log Analytics QueryPack, in ISO 8601 format. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeModified?: Date; + /** + * Current state of this QueryPack: whether or not is has been provisioned within the resource group it is defined. Users cannot change this value but are able to read from it. Values will include Succeeded, Deploying, Canceled, and Failed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly provisioningState?: string; +}; + +/** A Log Analytics QueryPack-Query definition. */ +export type LogAnalyticsQueryPackQuery = AzureResourceProperties & { + /** + * The unique ID of your application. This field cannot be changed. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly idPropertiesId?: string; + /** Unique display name for your query within the Query Pack. */ + displayName?: string; + /** + * Creation Date for the Log Analytics Query, in ISO 8601 format. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeCreated?: Date; + /** + * Last modified date of the Log Analytics Query, in ISO 8601 format. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly timeModified?: Date; + /** + * Object Id of user creating the query. + * NOTE: This property will not be serialized. It can only be populated by the server. + */ + readonly author?: string; + /** Description of the query. */ + description?: string; + /** Body of the query. */ + body?: string; + /** The related metadata items for the function. */ + related?: LogAnalyticsQueryPackQueryPropertiesRelated; + /** Tags associated with the query. */ + tags?: { [propertyName: string]: string[] }; + /** Additional properties that can be set for the query. */ + properties?: Record; +}; + /** The resource model definition for a Azure Resource Manager proxy resource. It will not have tags and a location */ export type ProxyResource = Resource & {}; @@ -722,20 +1035,40 @@ export type SavedSearch = ProxyResource & { /** 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. */ + /** + * 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?: SystemDataAutoGenerated; + /** 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 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 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; /** - * Specifies if IsTroubleshootingEnabled property can be set for this table. + * 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 isTroubleshootingAllowed?: boolean; - /** Enable or disable troubleshoot for this table. */ - isTroubleshootEnabled?: boolean; + readonly lastPlanModifiedDate?: string; + /** Table schema. */ + schema?: Schema; /** - * Last time when troubleshooting was set for this table. + * 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 lastTroubleshootDate?: string; + readonly provisioningState?: ProvisioningStateEnum; }; /** The top level Log Analytics cluster resource container. */ @@ -780,10 +1113,18 @@ export type Cluster = TrackedResource & { /** 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?: SystemDataAutoGenerated; /** 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 +1159,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,6 +1206,8 @@ 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. */ @@ -868,6 +1216,32 @@ export interface WorkspacePurgePurgeHeaders { xMsStatusLocation?: string; } +/** Known values of {@link IdentityType} that the service accepts. */ +export enum KnownIdentityType { + User = "user", + Application = "application", + ManagedIdentity = "managedIdentity", + Key = "key", + SystemAssigned = "SystemAssigned", + UserAssigned = "UserAssigned", + None = "None" +} + +/** + * Defines values for IdentityType. \ + * {@link KnownIdentityType} can be used interchangeably with IdentityType, + * this enum contains the known values that the service supports. + * ### Known values supported by the service + * **user** \ + * **application** \ + * **managedIdentity** \ + * **key** \ + * **SystemAssigned** \ + * **UserAssigned** \ + * **None** + */ +export type IdentityType = string; + /** Known values of {@link Type} that the service accepts. */ export enum KnownType { StorageAccount = "StorageAccount", @@ -1213,10 +1587,182 @@ export enum KnownPublicNetworkAccessType { * **Disabled**: Disables public connectivity to Log Analytics through public DNS. */ export type PublicNetworkAccessType = string; + +/** Known values of {@link CreatedByType} that the service accepts. */ +export enum KnownCreatedByType { + User = "User", + Application = "Application", + ManagedIdentity = "ManagedIdentity", + Key = "Key" +} + +/** + * 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 + * **User** \ + * **Application** \ + * **ManagedIdentity** \ + * **Key** + */ +export type CreatedByType = string; + +/** 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 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 + * **Basic**: Logs that are adjusted to support high volume low value verbose logs. \ + * **Analytics**: Logs that allow monitoring and analytics. + */ +export type TablePlanEnum = string; + +/** 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 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 + * **string** \ + * **int** \ + * **long** \ + * **real** \ + * **boolean** \ + * **dateTime** \ + * **guid** \ + * **dynamic** + */ +export type ColumnTypeEnum = string; + +/** 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 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 + * **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 ColumnDataTypeHintEnum = string; + +/** 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 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 + * **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 SourceEnum = string; + +/** 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 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 + * **Microsoft**: Standard data collected by Azure Monitor. \ + * **CustomLog**: Custom log table. \ + * **RestoredLogs**: Restored data. \ + * **SearchResults**: Data collected by a search job. + */ +export type TableTypeEnum = string; + +/** 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 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 + * **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 TableSubTypeEnum = string; + +/** 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 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 + * **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 ProvisioningStateEnum = 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. */ @@ -1230,6 +1776,137 @@ export type CapacityReservationLevel = | 2000 | 5000; +/** Optional parameters. */ +export interface QueryPacksListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type QueryPacksListResponse = LogAnalyticsQueryPackListResult; + +/** Optional parameters. */ +export interface QueryPacksListByResourceGroupOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroup operation. */ +export type QueryPacksListByResourceGroupResponse = LogAnalyticsQueryPackListResult; + +/** Optional parameters. */ +export interface QueryPacksDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface QueryPacksGetOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type QueryPacksGetResponse = LogAnalyticsQueryPack; + +/** Optional parameters. */ +export interface QueryPacksCreateOrUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the createOrUpdate operation. */ +export type QueryPacksCreateOrUpdateResponse = LogAnalyticsQueryPack; + +/** Optional parameters. */ +export interface QueryPacksUpdateTagsOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the updateTags operation. */ +export type QueryPacksUpdateTagsResponse = LogAnalyticsQueryPack; + +/** Optional parameters. */ +export interface QueryPacksListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type QueryPacksListNextResponse = LogAnalyticsQueryPackListResult; + +/** Optional parameters. */ +export interface QueryPacksListByResourceGroupNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByResourceGroupNext operation. */ +export type QueryPacksListByResourceGroupNextResponse = LogAnalyticsQueryPackListResult; + +/** Optional parameters. */ +export interface QueriesListOptionalParams extends coreClient.OperationOptions { + /** Maximum items returned in page. */ + top?: number; + /** Flag indicating whether or not to return the body of each applicable query. If false, only return the query information. */ + includeBody?: boolean; + /** Base64 encoded token used to fetch the next page of items. Default is null. */ + skipToken?: string; +} + +/** Contains response data for the list operation. */ +export type QueriesListResponse = LogAnalyticsQueryPackQueryListResult; + +/** Optional parameters. */ +export interface QueriesSearchOptionalParams + extends coreClient.OperationOptions { + /** Maximum items returned in page. */ + top?: number; + /** Flag indicating whether or not to return the body of each applicable query. If false, only return the query information. */ + includeBody?: boolean; + /** Base64 encoded token used to fetch the next page of items. Default is null. */ + skipToken?: string; +} + +/** Contains response data for the search operation. */ +export type QueriesSearchResponse = LogAnalyticsQueryPackQueryListResult; + +/** Optional parameters. */ +export interface QueriesGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type QueriesGetResponse = LogAnalyticsQueryPackQuery; + +/** Optional parameters. */ +export interface QueriesPutOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the put operation. */ +export type QueriesPutResponse = LogAnalyticsQueryPackQuery; + +/** Optional parameters. */ +export interface QueriesUpdateOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the update operation. */ +export type QueriesUpdateResponse = LogAnalyticsQueryPackQuery; + +/** Optional parameters. */ +export interface QueriesDeleteOptionalParams + extends coreClient.OperationOptions {} + +/** Optional parameters. */ +export interface QueriesListNextOptionalParams + extends coreClient.OperationOptions { + /** Maximum items returned in page. */ + top?: number; + /** Flag indicating whether or not to return the body of each applicable query. If false, only return the query information. */ + includeBody?: boolean; + /** Base64 encoded token used to fetch the next page of items. Default is null. */ + skipToken?: string; +} + +/** Contains response data for the listNext operation. */ +export type QueriesListNextResponse = LogAnalyticsQueryPackQueryListResult; + +/** Optional parameters. */ +export interface QueriesSearchNextOptionalParams + extends coreClient.OperationOptions { + /** Maximum items returned in page. */ + top?: number; + /** Flag indicating whether or not to return the body of each applicable query. If false, only return the query information. */ + includeBody?: boolean; + /** Base64 encoded token used to fetch the next page of items. Default is null. */ + skipToken?: string; +} + +/** Contains response data for the searchNext operation. */ +export type QueriesSearchNextResponse = LogAnalyticsQueryPackQueryListResult; + /** Optional parameters. */ export interface DataExportsListByWorkspaceOptionalParams extends coreClient.OperationOptions {} @@ -1494,47 +2171,6 @@ export interface WorkspacePurgeGetPurgeStatusOptionalParams /** Contains response data for the getPurgeStatus operation. */ export type WorkspacePurgeGetPurgeStatusResponse = WorkspacePurgeStatusResponse; -/** Optional parameters. */ -export interface OperationsListOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the list operation. */ -export type OperationsListResponse = OperationListResult; - -/** Optional parameters. */ -export interface OperationsListNextOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listNext operation. */ -export type OperationsListNextResponse = OperationListResult; - -/** Optional parameters. */ -export interface TablesListByWorkspaceOptionalParams - extends coreClient.OperationOptions {} - -/** Contains response data for the listByWorkspace operation. */ -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 {} @@ -1603,6 +2239,20 @@ export interface ClustersListNextOptionalParams /** Contains response data for the listNext operation. */ export type ClustersListNextResponse = ClusterListResult; +/** Optional parameters. */ +export interface OperationsListOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the list operation. */ +export type OperationsListResponse = OperationListResult; + +/** Optional parameters. */ +export interface OperationsListNextOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listNext operation. */ +export type OperationsListNextResponse = OperationListResult; + /** Optional parameters. */ export interface WorkspacesListOptionalParams extends coreClient.OperationOptions {} @@ -1668,6 +2318,56 @@ export interface DeletedWorkspacesListByResourceGroupOptionalParams /** Contains response data for the listByResourceGroup operation. */ export type DeletedWorkspacesListByResourceGroupResponse = WorkspaceListResult; +/** Optional parameters. */ +export interface TablesListByWorkspaceOptionalParams + extends coreClient.OperationOptions {} + +/** Contains response data for the listByWorkspace operation. */ +export type TablesListByWorkspaceResponse = TablesListResult; + +/** Optional parameters. */ +export interface TablesCreateOrUpdateOptionalParams + 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 TablesCreateOrUpdateResponse = Table; + +/** Optional parameters. */ +export interface TablesUpdateOptionalParams + 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 update operation. */ +export type TablesUpdateResponse = Table; + +/** Optional parameters. */ +export interface TablesGetOptionalParams extends coreClient.OperationOptions {} + +/** Contains response data for the get operation. */ +export type TablesGetResponse = Table; + +/** Optional parameters. */ +export interface TablesDeleteOptionalParams + 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; +} + +/** Optional parameters. */ +export interface TablesMigrateOptionalParams + extends coreClient.OperationOptions {} + /** Optional parameters. */ export interface OperationalInsightsManagementClientOptionalParams extends coreClient.ServiceClientOptions { diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts index 1520ed6514cd..0b777417c081 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts @@ -8,31 +8,38 @@ import * as coreClient from "@azure/core-client"; -export const DataExportListResult: coreClient.CompositeMapper = { +export const LogAnalyticsQueryPackListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataExportListResult", + className: "LogAnalyticsQueryPackListResult", modelProperties: { value: { serializedName: "value", + required: true, type: { name: "Sequence", element: { type: { name: "Composite", - className: "DataExport" + className: "LogAnalyticsQueryPack" } } } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } } } } }; -export const Resource: coreClient.CompositeMapper = { +export const QueryPacksResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Resource", + className: "QueryPacksResource", modelProperties: { id: { serializedName: "id", @@ -54,6 +61,20 @@ export const Resource: coreClient.CompositeMapper = { type: { name: "String" } + }, + location: { + serializedName: "location", + required: true, + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { type: { name: "String" } } + } } } } @@ -155,52 +176,42 @@ export const ErrorAdditionalInfo: coreClient.CompositeMapper = { } }; -export const DataSourceListResult: coreClient.CompositeMapper = { +export const TagsResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "DataSourceListResult", + className: "TagsResource", modelProperties: { - value: { - serializedName: "value", - type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "DataSource" - } - } - } - }, - nextLink: { - serializedName: "nextLink", + tags: { + serializedName: "tags", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "String" } } } } } } }; -export const IntelligencePack: coreClient.CompositeMapper = { +export const LogAnalyticsQueryPackQueryListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "IntelligencePack", + className: "LogAnalyticsQueryPackQueryListResult", modelProperties: { - name: { - serializedName: "name", - type: { - name: "String" - } - }, - enabled: { - serializedName: "enabled", + value: { + serializedName: "value", + required: true, type: { - name: "Boolean" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LogAnalyticsQueryPackQuery" + } + } } }, - displayName: { - serializedName: "displayName", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -209,61 +220,40 @@ export const IntelligencePack: coreClient.CompositeMapper = { } }; -export const LinkedServiceListResult: coreClient.CompositeMapper = { +export const LogAnalyticsQueryPackQueryPropertiesRelated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "LinkedServiceListResult", + className: "LogAnalyticsQueryPackQueryPropertiesRelated", modelProperties: { - value: { - serializedName: "value", + categories: { + serializedName: "categories", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "LinkedService" + name: "String" } } } - } - } - } -}; - -export const LinkedStorageAccountsListResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "LinkedStorageAccountsListResult", - modelProperties: { - value: { - serializedName: "value", + }, + resourceTypes: { + serializedName: "resourceTypes", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "LinkedStorageAccountsResource" + name: "String" } } } - } - } - } -}; - -export const WorkspaceListManagementGroupsResult: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspaceListManagementGroupsResult", - modelProperties: { - value: { - serializedName: "value", + }, + solutions: { + serializedName: "solutions", type: { name: "Sequence", element: { type: { - name: "Composite", - className: "ManagementGroup" + name: "String" } } } @@ -272,134 +262,159 @@ export const WorkspaceListManagementGroupsResult: coreClient.CompositeMapper = { } }; -export const ManagementGroup: coreClient.CompositeMapper = { +export const AzureResourceProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ManagementGroup", + className: "AzureResourceProperties", modelProperties: { - serverCount: { - serializedName: "properties.serverCount", - type: { - name: "Number" - } - }, - isGateway: { - serializedName: "properties.isGateway", - type: { - name: "Boolean" - } - }, - name: { - serializedName: "properties.name", - type: { - name: "String" - } - }, id: { - serializedName: "properties.id", + serializedName: "id", + readOnly: true, type: { name: "String" } }, - created: { - serializedName: "properties.created", - type: { - name: "DateTime" - } - }, - dataReceived: { - serializedName: "properties.dataReceived", + name: { + serializedName: "name", + readOnly: true, type: { - name: "DateTime" + name: "String" } }, - version: { - serializedName: "properties.version", + type: { + serializedName: "type", + readOnly: true, type: { name: "String" } }, - sku: { - serializedName: "properties.sku", + systemData: { + serializedName: "systemData", type: { - name: "String" + name: "Composite", + className: "SystemData" } } } } }; -export const OperationStatus: coreClient.CompositeMapper = { +export const SystemData: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationStatus", + className: "SystemData", modelProperties: { - id: { - serializedName: "id", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - name: { - serializedName: "name", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - startTime: { - serializedName: "startTime", + createdAt: { + serializedName: "createdAt", type: { - name: "String" + name: "DateTime" } }, - endTime: { - serializedName: "endTime", + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - status: { - serializedName: "status", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } }, - error: { - serializedName: "error", + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } + } + } + } +}; + +export const LogAnalyticsQueryPackQuerySearchProperties: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "LogAnalyticsQueryPackQuerySearchProperties", + modelProperties: { + related: { + serializedName: "related", type: { name: "Composite", - className: "ErrorResponse" + className: "LogAnalyticsQueryPackQuerySearchPropertiesRelated" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { name: "Sequence", element: { type: { name: "String" } } } + } } } } } }; -export const SharedKeys: coreClient.CompositeMapper = { +export const LogAnalyticsQueryPackQuerySearchPropertiesRelated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SharedKeys", + className: "LogAnalyticsQueryPackQuerySearchPropertiesRelated", modelProperties: { - primarySharedKey: { - serializedName: "primarySharedKey", + categories: { + serializedName: "categories", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - secondarySharedKey: { - serializedName: "secondarySharedKey", + resourceTypes: { + serializedName: "resourceTypes", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + solutions: { + serializedName: "solutions", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } } } } } }; -export const WorkspaceListUsagesResult: coreClient.CompositeMapper = { +export const DataExportListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkspaceListUsagesResult", + className: "DataExportListResult", modelProperties: { value: { serializedName: "value", @@ -408,7 +423,7 @@ export const WorkspaceListUsagesResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "UsageMetric" + className: "DataExport" } } } @@ -417,65 +432,55 @@ export const WorkspaceListUsagesResult: coreClient.CompositeMapper = { } }; -export const UsageMetric: coreClient.CompositeMapper = { +export const Resource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UsageMetric", + className: "Resource", modelProperties: { - name: { - serializedName: "name", - type: { - name: "Composite", - className: "MetricName" - } - }, - unit: { - serializedName: "unit", + id: { + serializedName: "id", + readOnly: true, type: { name: "String" } }, - currentValue: { - serializedName: "currentValue", + name: { + serializedName: "name", + readOnly: true, type: { - name: "Number" + name: "String" } }, - limit: { - serializedName: "limit", + type: { + serializedName: "type", + readOnly: true, type: { - name: "Number" - } - }, - nextResetTime: { - serializedName: "nextResetTime", - type: { - name: "DateTime" - } - }, - quotaPeriod: { - serializedName: "quotaPeriod", - type: { - name: "String" + name: "String" } } } } }; -export const MetricName: coreClient.CompositeMapper = { +export const DataSourceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "MetricName", + className: "DataSourceListResult", modelProperties: { value: { serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "DataSource" + } + } } }, - localizedValue: { - serializedName: "localizedValue", + nextLink: { + serializedName: "nextLink", type: { name: "String" } @@ -484,43 +489,25 @@ export const MetricName: coreClient.CompositeMapper = { } }; -export const StorageAccount: coreClient.CompositeMapper = { +export const IntelligencePack: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageAccount", + className: "IntelligencePack", modelProperties: { - id: { - serializedName: "id", - required: true, + name: { + serializedName: "name", 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, + enabled: { + serializedName: "enabled", type: { - name: "String" + name: "Boolean" } }, - description: { - serializedName: "description", + displayName: { + serializedName: "displayName", type: { name: "String" } @@ -529,10 +516,10 @@ export const StorageInsightStatus: coreClient.CompositeMapper = { } }; -export const StorageInsightListResult: coreClient.CompositeMapper = { +export const LinkedServiceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "StorageInsightListResult", + className: "LinkedServiceListResult", modelProperties: { value: { serializedName: "value", @@ -541,48 +528,40 @@ export const StorageInsightListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "StorageInsight" + className: "LinkedService" } } } - }, - odataNextLink: { - serializedName: "@odata\\.nextLink", - type: { - name: "String" - } } } } }; -export const Tag: coreClient.CompositeMapper = { +export const LinkedStorageAccountsListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Tag", + className: "LinkedStorageAccountsListResult", modelProperties: { - name: { - serializedName: "name", - required: true, - type: { - name: "String" - } - }, value: { serializedName: "value", - required: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "LinkedStorageAccountsResource" + } + } } } } } }; -export const SavedSearchesListResult: coreClient.CompositeMapper = { +export const WorkspaceListManagementGroupsResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SavedSearchesListResult", + className: "WorkspaceListManagementGroupsResult", modelProperties: { value: { serializedName: "value", @@ -591,7 +570,7 @@ export const SavedSearchesListResult: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SavedSearch" + className: "ManagementGroup" } } } @@ -600,56 +579,55 @@ export const SavedSearchesListResult: coreClient.CompositeMapper = { } }; -export const AvailableServiceTier: coreClient.CompositeMapper = { +export const ManagementGroup: coreClient.CompositeMapper = { type: { name: "Composite", - className: "AvailableServiceTier", + className: "ManagementGroup", modelProperties: { - serviceTier: { - serializedName: "serviceTier", - readOnly: true, + serverCount: { + serializedName: "properties.serverCount", type: { - name: "String" + name: "Number" } }, - enabled: { - serializedName: "enabled", - readOnly: true, + isGateway: { + serializedName: "properties.isGateway", type: { name: "Boolean" } }, - minimumRetention: { - serializedName: "minimumRetention", - readOnly: true, + name: { + serializedName: "properties.name", type: { - name: "Number" + name: "String" } }, - maximumRetention: { - serializedName: "maximumRetention", - readOnly: true, + id: { + serializedName: "properties.id", type: { - name: "Number" + name: "String" } }, - defaultRetention: { - serializedName: "defaultRetention", - readOnly: true, + created: { + serializedName: "properties.created", type: { - name: "Number" + name: "DateTime" } }, - capacityReservationLevel: { - serializedName: "capacityReservationLevel", - readOnly: true, + dataReceived: { + serializedName: "properties.dataReceived", type: { - name: "Number" + name: "DateTime" } }, - lastSkuUpdate: { - serializedName: "lastSkuUpdate", - readOnly: true, + version: { + serializedName: "properties.version", + type: { + name: "String" + } + }, + sku: { + serializedName: "properties.sku", type: { name: "String" } @@ -658,18 +636,78 @@ export const AvailableServiceTier: coreClient.CompositeMapper = { } }; -export const SearchGetSchemaResponse: coreClient.CompositeMapper = { +export const OperationStatus: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SearchGetSchemaResponse", + className: "OperationStatus", modelProperties: { - metadata: { - serializedName: "metadata", + id: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", type: { name: "Composite", - className: "SearchMetadata" + className: "ErrorResponse" + } + } + } + } +}; + +export const SharedKeys: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "SharedKeys", + modelProperties: { + primarySharedKey: { + serializedName: "primarySharedKey", + type: { + name: "String" } }, + secondarySharedKey: { + serializedName: "secondarySharedKey", + type: { + name: "String" + } + } + } + } +}; + +export const WorkspaceListUsagesResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "WorkspaceListUsagesResult", + modelProperties: { value: { serializedName: "value", type: { @@ -677,7 +715,7 @@ export const SearchGetSchemaResponse: coreClient.CompositeMapper = { element: { type: { name: "Composite", - className: "SearchSchemaValue" + className: "UsageMetric" } } } @@ -686,144 +724,812 @@ export const SearchGetSchemaResponse: coreClient.CompositeMapper = { } }; -export const SearchMetadata: coreClient.CompositeMapper = { +export const UsageMetric: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SearchMetadata", + className: "UsageMetric", modelProperties: { - searchId: { - serializedName: "requestId", + name: { + serializedName: "name", type: { - name: "String" + name: "Composite", + className: "MetricName" } }, - resultType: { - serializedName: "resultType", + unit: { + serializedName: "unit", type: { name: "String" } }, - total: { - serializedName: "total", + currentValue: { + serializedName: "currentValue", type: { name: "Number" } }, - top: { - serializedName: "top", + limit: { + serializedName: "limit", type: { name: "Number" } }, - id: { - serializedName: "id", + 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" } }, - coreSummaries: { - serializedName: "coreSummaries", + 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: "CoreSummary" + 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 ClusterListResult: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "ClusterListResult", + modelProperties: { + nextLink: { + serializedName: "nextLink", type: { name: "String" } }, - startTime: { - serializedName: "startTime", + value: { + serializedName: "value", type: { - name: "DateTime" + 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" } }, - lastUpdated: { - serializedName: "lastUpdated", + tenantId: { + serializedName: "tenantId", + readOnly: true, + type: { + name: "String" + } + }, + type: { + serializedName: "type", + required: true, + type: { + name: "String" + } + }, + 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: "DateTime" + name: "String" } }, - eTag: { - serializedName: "eTag", + keyName: { + serializedName: "keyName", type: { name: "String" } }, - sort: { - serializedName: "sort", + keyVersion: { + serializedName: "keyVersion", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "SearchSort" - } - } + name: "String" } }, - requestTime: { - serializedName: "requestTime", + keyRsaSize: { + serializedName: "keyRsaSize", type: { name: "Number" } - }, - aggregatedValueField: { - serializedName: "aggregatedValueField", + } + } + } +}; + +export const AssociatedWorkspace: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "AssociatedWorkspace", + modelProperties: { + workspaceId: { + serializedName: "workspaceId", + readOnly: true, type: { name: "String" } }, - aggregatedGroupingFields: { - serializedName: "aggregatedGroupingFields", + workspaceName: { + serializedName: "workspaceName", + readOnly: true, type: { name: "String" } }, - sum: { - serializedName: "sum", - type: { - name: "Number" - } - }, - max: { - serializedName: "max", + resourceId: { + serializedName: "resourceId", + readOnly: true, type: { - name: "Number" + name: "String" } }, - schema: { - serializedName: "schema", + associateDate: { + serializedName: "associateDate", + readOnly: true, type: { - name: "Composite", - className: "SearchMetadataSchema" + name: "String" } } } } }; -export const CoreSummary: coreClient.CompositeMapper = { +export const CapacityReservationProperties: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CoreSummary", + className: "CapacityReservationProperties", modelProperties: { - status: { - serializedName: "status", + lastSkuUpdate: { + serializedName: "lastSkuUpdate", + readOnly: true, type: { name: "String" } }, - numberOfDocuments: { - serializedName: "numberOfDocuments", - required: true, + minCapacity: { + serializedName: "minCapacity", + readOnly: true, type: { name: "Number" } @@ -832,19 +1538,41 @@ export const CoreSummary: coreClient.CompositeMapper = { } }; -export const SearchSort: coreClient.CompositeMapper = { +export const ClusterPatch: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SearchSort", + className: "ClusterPatch", modelProperties: { - name: { - serializedName: "name", + identity: { + serializedName: "identity", type: { - name: "String" + name: "Composite", + className: "Identity" } }, - order: { - serializedName: "order", + 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" } @@ -853,31 +1581,38 @@ export const SearchSort: coreClient.CompositeMapper = { } }; -export const SearchMetadataSchema: coreClient.CompositeMapper = { +export const OperationListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SearchMetadataSchema", + className: "OperationListResult", modelProperties: { - name: { - serializedName: "name", + value: { + serializedName: "value", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Operation" + } + } } }, - version: { - serializedName: "version", + nextLink: { + serializedName: "nextLink", + readOnly: true, type: { - name: "Number" + name: "String" } } } } }; -export const SearchSchemaValue: coreClient.CompositeMapper = { +export const Operation: coreClient.CompositeMapper = { type: { name: "Composite", - className: "SearchSchemaValue", + className: "Operation", modelProperties: { name: { serializedName: "name", @@ -885,75 +1620,63 @@ export const SearchSchemaValue: coreClient.CompositeMapper = { name: "String" } }, - displayName: { - serializedName: "displayName", + display: { + serializedName: "display", type: { - name: "String" + name: "Composite", + className: "OperationDisplay" } - }, - type: { - serializedName: "type", + } + } + } +}; + +export const OperationDisplay: coreClient.CompositeMapper = { + type: { + name: "Composite", + className: "OperationDisplay", + modelProperties: { + provider: { + serializedName: "provider", type: { name: "String" } }, - indexed: { - serializedName: "indexed", - required: true, - type: { - name: "Boolean" - } - }, - stored: { - serializedName: "stored", - required: true, + resource: { + serializedName: "resource", type: { - name: "Boolean" + name: "String" } }, - facet: { - serializedName: "facet", - required: true, + operation: { + serializedName: "operation", type: { - name: "Boolean" + name: "String" } }, - ownerType: { - serializedName: "ownerType", + description: { + serializedName: "description", type: { - name: "Sequence", - element: { - type: { - name: "String" - } - } + name: "String" } } } } }; -export const WorkspacePurgeBody: coreClient.CompositeMapper = { +export const WorkspaceListResult: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkspacePurgeBody", + className: "WorkspaceListResult", modelProperties: { - table: { - serializedName: "table", - required: true, - type: { - name: "String" - } - }, - filters: { - serializedName: "filters", - required: true, + value: { + serializedName: "value", type: { name: "Sequence", element: { type: { name: "Composite", - className: "WorkspacePurgeBodyFilters" + className: "Workspace" } } } @@ -962,31 +1685,28 @@ export const WorkspacePurgeBody: coreClient.CompositeMapper = { } }; -export const WorkspacePurgeBodyFilters: coreClient.CompositeMapper = { +export const WorkspaceSku: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkspacePurgeBodyFilters", + className: "WorkspaceSku", modelProperties: { - column: { - serializedName: "column", - type: { - name: "String" - } - }, - operator: { - serializedName: "operator", + name: { + serializedName: "name", + required: true, type: { name: "String" } }, - value: { - serializedName: "value", + capacityReservationLevel: { + serializedName: "capacityReservationLevel", type: { - name: "any" + name: "Enum", + allowedValues: [100, 200, 300, 400, 500, 1000, 2000, 5000] } }, - key: { - serializedName: "key", + lastSkuUpdate: { + serializedName: "lastSkuUpdate", + readOnly: true, type: { name: "String" } @@ -995,30 +1715,27 @@ export const WorkspacePurgeBodyFilters: coreClient.CompositeMapper = { } }; -export const WorkspacePurgeResponse: coreClient.CompositeMapper = { +export const WorkspaceCapping: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkspacePurgeResponse", + className: "WorkspaceCapping", modelProperties: { - operationId: { - serializedName: "operationId", - required: true, + dailyQuotaGb: { + serializedName: "dailyQuotaGb", + type: { + name: "Number" + } + }, + quotaNextResetTime: { + serializedName: "quotaNextResetTime", + readOnly: true, type: { name: "String" } - } - } - } -}; - -export const WorkspacePurgeStatusResponse: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "WorkspacePurgeStatusResponse", - modelProperties: { - status: { - serializedName: "status", - required: true, + }, + dataIngestionStatus: { + serializedName: "dataIngestionStatus", + readOnly: true, type: { name: "String" } @@ -1027,26 +1744,19 @@ export const WorkspacePurgeStatusResponse: coreClient.CompositeMapper = { } }; -export const OperationListResult: coreClient.CompositeMapper = { +export const PrivateLinkScopedResource: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationListResult", + className: "PrivateLinkScopedResource", modelProperties: { - value: { - serializedName: "value", + resourceId: { + serializedName: "resourceId", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Operation" - } - } + name: "String" } }, - nextLink: { - serializedName: "nextLink", - readOnly: true, + scopeId: { + serializedName: "scopeId", type: { name: "String" } @@ -1055,56 +1765,91 @@ export const OperationListResult: coreClient.CompositeMapper = { } }; -export const Operation: coreClient.CompositeMapper = { +export const WorkspaceFeatures: coreClient.CompositeMapper = { type: { name: "Composite", - className: "Operation", + className: "WorkspaceFeatures", + additionalProperties: { type: { name: "Object" } }, modelProperties: { - name: { - serializedName: "name", + 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" } }, - display: { - serializedName: "display", + disableLocalAuth: { + serializedName: "disableLocalAuth", + nullable: true, type: { - name: "Composite", - className: "OperationDisplay" + name: "Boolean" } } } } }; -export const OperationDisplay: coreClient.CompositeMapper = { +export const SystemDataAutoGenerated: coreClient.CompositeMapper = { type: { name: "Composite", - className: "OperationDisplay", + className: "SystemDataAutoGenerated", modelProperties: { - provider: { - serializedName: "provider", + createdBy: { + serializedName: "createdBy", type: { name: "String" } }, - resource: { - serializedName: "resource", + createdByType: { + serializedName: "createdByType", type: { name: "String" } }, - operation: { - serializedName: "operation", + createdAt: { + serializedName: "createdAt", + type: { + name: "DateTime" + } + }, + lastModifiedBy: { + serializedName: "lastModifiedBy", type: { name: "String" } }, - description: { - serializedName: "description", + lastModifiedByType: { + serializedName: "lastModifiedByType", type: { name: "String" } + }, + lastModifiedAt: { + serializedName: "lastModifiedAt", + type: { + name: "DateTime" + } } } } @@ -1131,88 +1876,71 @@ export const TablesListResult: coreClient.CompositeMapper = { } }; -export const ClusterListResult: coreClient.CompositeMapper = { +export const SearchResults: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterListResult", + className: "SearchResults", modelProperties: { - nextLink: { - serializedName: "nextLink", + query: { + serializedName: "query", type: { name: "String" } }, - value: { - serializedName: "value", + description: { + serializedName: "description", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Cluster" - } - } + name: "String" } - } - } - } -}; - -export const Identity: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "Identity", - modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, + }, + limit: { + serializedName: "limit", type: { - name: "String" + name: "Number" } }, - tenantId: { - serializedName: "tenantId", - readOnly: true, + startSearchTime: { + serializedName: "startSearchTime", type: { - name: "String" + name: "DateTime" } }, - type: { - serializedName: "type", - required: true, + endSearchTime: { + serializedName: "endSearchTime", type: { - name: "Enum", - allowedValues: ["SystemAssigned", "UserAssigned", "None"] + name: "DateTime" } }, - userAssignedIdentities: { - serializedName: "userAssignedIdentities", + sourceTable: { + serializedName: "sourceTable", + readOnly: true, type: { - name: "Dictionary", - value: { - type: { name: "Composite", className: "UserIdentityProperties" } - } + name: "String" } } } } }; -export const UserIdentityProperties: coreClient.CompositeMapper = { +export const RestoredLogs: coreClient.CompositeMapper = { type: { name: "Composite", - className: "UserIdentityProperties", + className: "RestoredLogs", modelProperties: { - principalId: { - serializedName: "principalId", - readOnly: true, + startRestoreTime: { + serializedName: "startRestoreTime", type: { - name: "String" + name: "DateTime" } }, - clientId: { - serializedName: "clientId", - readOnly: true, + endRestoreTime: { + serializedName: "endRestoreTime", + type: { + name: "DateTime" + } + }, + sourceTable: { + serializedName: "sourceTable", type: { name: "String" } @@ -1221,206 +1949,252 @@ export const UserIdentityProperties: coreClient.CompositeMapper = { } }; -export const ClusterSku: coreClient.CompositeMapper = { +export const ResultStatistics: coreClient.CompositeMapper = { type: { name: "Composite", - className: "ClusterSku", + className: "ResultStatistics", modelProperties: { - capacity: { - serializedName: "capacity", + progress: { + constraints: { + MultipleOf: 0.01 + }, + serializedName: "progress", + readOnly: true, type: { - name: "Enum", - allowedValues: [500, 1000, 2000, 5000] + name: "Number" } }, - name: { - serializedName: "name", + ingestedRecords: { + serializedName: "ingestedRecords", + readOnly: true, type: { - name: "String" + name: "Number" } } } } }; -export const KeyVaultProperties: coreClient.CompositeMapper = { +export const Schema: coreClient.CompositeMapper = { type: { name: "Composite", - className: "KeyVaultProperties", + className: "Schema", modelProperties: { - keyVaultUri: { - serializedName: "keyVaultUri", + name: { + serializedName: "name", type: { name: "String" } }, - keyName: { - serializedName: "keyName", + displayName: { + serializedName: "displayName", type: { name: "String" } }, - keyVersion: { - serializedName: "keyVersion", + description: { + serializedName: "description", type: { name: "String" } }, - keyRsaSize: { - serializedName: "keyRsaSize", + columns: { + serializedName: "columns", type: { - name: "Number" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Column" + } + } } - } - } - } -}; - -export const AssociatedWorkspace: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "AssociatedWorkspace", - modelProperties: { - workspaceId: { - serializedName: "workspaceId", + }, + standardColumns: { + serializedName: "standardColumns", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "Column" + } + } + } + }, + categories: { + serializedName: "categories", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + labels: { + serializedName: "labels", + readOnly: true, + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + }, + source: { + serializedName: "source", readOnly: true, type: { name: "String" } }, - workspaceName: { - serializedName: "workspaceName", + tableType: { + serializedName: "tableType", + readOnly: true, + type: { + name: "String" + } + }, + tableSubType: { + serializedName: "tableSubType", + readOnly: true, + type: { + name: "String" + } + }, + solutions: { + serializedName: "solutions", readOnly: true, type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "String" + } + } } }, - resourceId: { - serializedName: "resourceId", - readOnly: true, + searchResults: { + serializedName: "searchResults", type: { - name: "String" + name: "Composite", + className: "SearchResults" } }, - associateDate: { - serializedName: "associateDate", - readOnly: true, + restoredLogs: { + serializedName: "restoredLogs", type: { - name: "String" + name: "Composite", + className: "RestoredLogs" } } } } }; -export const CapacityReservationProperties: coreClient.CompositeMapper = { +export const Column: coreClient.CompositeMapper = { type: { name: "Composite", - className: "CapacityReservationProperties", + className: "Column", modelProperties: { - lastSkuUpdate: { - serializedName: "lastSkuUpdate", - readOnly: true, + name: { + serializedName: "name", type: { name: "String" } }, - minCapacity: { - serializedName: "minCapacity", - readOnly: true, + type: { + serializedName: "type", type: { - name: "Number" + name: "String" } - } - } - } -}; - -export const ClusterPatch: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "ClusterPatch", - modelProperties: { - identity: { - serializedName: "identity", + }, + dataTypeHint: { + serializedName: "dataTypeHint", type: { - name: "Composite", - className: "Identity" + name: "String" } }, - sku: { - serializedName: "sku", + displayName: { + serializedName: "displayName", type: { - name: "Composite", - className: "ClusterSku" + name: "String" } }, - tags: { - serializedName: "tags", + description: { + serializedName: "description", type: { - name: "Dictionary", - value: { type: { name: "String" } } + name: "String" } }, - keyVaultProperties: { - serializedName: "properties.keyVaultProperties", + isDefaultDisplay: { + serializedName: "isDefaultDisplay", + readOnly: true, type: { - name: "Composite", - className: "KeyVaultProperties" + name: "Boolean" } }, - billingType: { - serializedName: "properties.billingType", + isHidden: { + serializedName: "isHidden", + readOnly: true, type: { - name: "String" + name: "Boolean" } } } } }; -export const WorkspaceListResult: coreClient.CompositeMapper = { +export const DataSourceFilter: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkspaceListResult", + className: "DataSourceFilter", modelProperties: { - value: { - serializedName: "value", + kind: { + serializedName: "kind", type: { - name: "Sequence", - element: { - type: { - name: "Composite", - className: "Workspace" - } - } + name: "String" } } } } }; -export const WorkspaceSku: coreClient.CompositeMapper = { +export const LogAnalyticsQueryPack: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkspaceSku", + className: "LogAnalyticsQueryPack", modelProperties: { - name: { - serializedName: "name", - required: true, + ...QueryPacksResource.type.modelProperties, + queryPackId: { + serializedName: "properties.queryPackId", + readOnly: true, type: { name: "String" } }, - capacityReservationLevel: { - serializedName: "capacityReservationLevel", + timeCreated: { + serializedName: "properties.timeCreated", + readOnly: true, type: { - name: "Enum", - allowedValues: [100, 200, 300, 400, 500, 1000, 2000, 5000] + name: "DateTime" } }, - lastSkuUpdate: { - serializedName: "lastSkuUpdate", + timeModified: { + serializedName: "properties.timeModified", + readOnly: true, + type: { + name: "DateTime" + } + }, + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" @@ -1430,110 +2204,79 @@ export const WorkspaceSku: coreClient.CompositeMapper = { } }; -export const WorkspaceCapping: coreClient.CompositeMapper = { +export const LogAnalyticsQueryPackQuery: coreClient.CompositeMapper = { type: { name: "Composite", - className: "WorkspaceCapping", + className: "LogAnalyticsQueryPackQuery", modelProperties: { - dailyQuotaGb: { - serializedName: "dailyQuotaGb", + ...AzureResourceProperties.type.modelProperties, + idPropertiesId: { + serializedName: "properties.id", + readOnly: true, type: { - name: "Number" + name: "String" } }, - quotaNextResetTime: { - serializedName: "quotaNextResetTime", - readOnly: true, + displayName: { + serializedName: "properties.displayName", type: { name: "String" } }, - dataIngestionStatus: { - serializedName: "dataIngestionStatus", + timeCreated: { + serializedName: "properties.timeCreated", readOnly: true, type: { - name: "String" + name: "DateTime" } - } - } - } -}; - -export const PrivateLinkScopedResource: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "PrivateLinkScopedResource", - modelProperties: { - resourceId: { - serializedName: "resourceId", + }, + timeModified: { + serializedName: "properties.timeModified", + readOnly: true, type: { - name: "String" + name: "DateTime" } }, - scopeId: { - serializedName: "scopeId", + author: { + serializedName: "properties.author", + readOnly: true, 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, + description: { + serializedName: "properties.description", type: { - name: "Boolean" + name: "String" } }, - enableLogAccessUsingOnlyResourcePermissions: { - serializedName: "enableLogAccessUsingOnlyResourcePermissions", - nullable: true, + body: { + serializedName: "properties.body", type: { - name: "Boolean" + name: "String" } }, - clusterResourceId: { - serializedName: "clusterResourceId", - nullable: true, + related: { + serializedName: "properties.related", type: { - name: "String" + name: "Composite", + className: "LogAnalyticsQueryPackQueryPropertiesRelated" } }, - disableLocalAuth: { - serializedName: "disableLocalAuth", - nullable: true, + tags: { + serializedName: "properties.tags", type: { - name: "Boolean" + name: "Dictionary", + value: { + type: { name: "Sequence", element: { type: { name: "String" } } } + } } - } - } - } -}; - -export const DataSourceFilter: coreClient.CompositeMapper = { - type: { - name: "Composite", - className: "DataSourceFilter", - modelProperties: { - kind: { - serializedName: "kind", + }, + properties: { + serializedName: "properties.properties", type: { - name: "String" + name: "Dictionary", + value: { type: { name: "any" } } } } } @@ -1889,31 +2632,83 @@ export const Table: coreClient.CompositeMapper = { className: "Table", modelProperties: { ...ProxyResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemDataAutoGenerated" + } + }, retentionInDays: { constraints: { InclusiveMaximum: 730, - InclusiveMinimum: 7 + InclusiveMinimum: 4 }, serializedName: "properties.retentionInDays", type: { name: "Number" } }, - isTroubleshootingAllowed: { - serializedName: "properties.isTroubleshootingAllowed", + totalRetentionInDays: { + constraints: { + InclusiveMaximum: 2555, + InclusiveMinimum: 4 + }, + serializedName: "properties.totalRetentionInDays", + type: { + name: "Number" + } + }, + archiveRetentionInDays: { + serializedName: "properties.archiveRetentionInDays", readOnly: true, type: { - name: "Boolean" + name: "Number" } }, - isTroubleshootEnabled: { - serializedName: "properties.isTroubleshootEnabled", + searchResults: { + serializedName: "properties.searchResults", type: { - name: "Boolean" + name: "Composite", + className: "SearchResults" + } + }, + restoredLogs: { + serializedName: "properties.restoredLogs", + type: { + name: "Composite", + className: "RestoredLogs" + } + }, + resultStatistics: { + serializedName: "properties.resultStatistics", + type: { + name: "Composite", + className: "ResultStatistics" + } + }, + plan: { + serializedName: "properties.plan", + type: { + name: "String" + } + }, + lastPlanModifiedDate: { + serializedName: "properties.lastPlanModifiedDate", + readOnly: true, + type: { + name: "String" + } + }, + schema: { + serializedName: "properties.schema", + type: { + name: "Composite", + className: "Schema" } }, - lastTroubleshootDate: { - serializedName: "properties.lastTroubleshootDate", + provisioningState: { + serializedName: "properties.provisioningState", readOnly: true, type: { name: "String" @@ -2025,6 +2820,13 @@ export const Workspace: coreClient.CompositeMapper = { className: "Workspace", modelProperties: { ...TrackedResource.type.modelProperties, + systemData: { + serializedName: "systemData", + type: { + name: "Composite", + className: "SystemDataAutoGenerated" + } + }, eTag: { serializedName: "eTag", type: { @@ -2033,6 +2835,7 @@ export const Workspace: coreClient.CompositeMapper = { }, provisioningState: { serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -2118,6 +2921,12 @@ export const Workspace: coreClient.CompositeMapper = { name: "Composite", className: "WorkspaceFeatures" } + }, + defaultDataCollectionRuleResourceId: { + serializedName: "properties.defaultDataCollectionRuleResourceId", + type: { + name: "String" + } } } } @@ -2138,6 +2947,7 @@ export const WorkspacePatch: coreClient.CompositeMapper = { }, provisioningState: { serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -2223,6 +3033,12 @@ export const WorkspacePatch: coreClient.CompositeMapper = { name: "Composite", className: "WorkspaceFeatures" } + }, + 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..84c9f0dfcfa1 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts @@ -12,6 +12,10 @@ import { OperationQueryParameter } from "@azure/core-client"; import { + LogAnalyticsQueryPack as LogAnalyticsQueryPackMapper, + TagsResource as TagsResourceMapper, + LogAnalyticsQueryPackQuerySearchProperties as LogAnalyticsQueryPackQuerySearchPropertiesMapper, + LogAnalyticsQueryPackQuery as LogAnalyticsQueryPackQueryMapper, DataExport as DataExportMapper, DataSource as DataSourceMapper, LinkedService as LinkedServiceMapper, @@ -19,11 +23,11 @@ import { StorageInsight as StorageInsightMapper, SavedSearch as SavedSearchMapper, WorkspacePurgeBody as WorkspacePurgeBodyMapper, - Table as TableMapper, Cluster as ClusterMapper, ClusterPatch as ClusterPatchMapper, Workspace as WorkspaceMapper, - WorkspacePatch as WorkspacePatchMapper + WorkspacePatch as WorkspacePatchMapper, + Table as TableMapper } from "../models/mappers"; export const accept: OperationParameter = { @@ -50,6 +54,18 @@ export const $host: OperationURLParameter = { skipEncoding: true }; +export const apiVersion: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2019-09-01", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + export const subscriptionId: OperationURLParameter = { parameterPath: "subscriptionId", mapper: { @@ -79,6 +95,102 @@ export const resourceGroupName: OperationURLParameter = { } }; +export const queryPackName: OperationURLParameter = { + parameterPath: "queryPackName", + mapper: { + serializedName: "queryPackName", + required: true, + type: { + name: "String" + } + } +}; + +export const contentType: OperationParameter = { + parameterPath: ["options", "contentType"], + mapper: { + defaultValue: "application/json", + isConstant: true, + serializedName: "Content-Type", + type: { + name: "String" + } + } +}; + +export const logAnalyticsQueryPackPayload: OperationParameter = { + parameterPath: "logAnalyticsQueryPackPayload", + mapper: LogAnalyticsQueryPackMapper +}; + +export const queryPackTags: OperationParameter = { + parameterPath: "queryPackTags", + mapper: TagsResourceMapper +}; + +export const nextLink: OperationURLParameter = { + parameterPath: "nextLink", + mapper: { + serializedName: "nextLink", + required: true, + type: { + name: "String" + } + }, + skipEncoding: true +}; + +export const top: OperationQueryParameter = { + parameterPath: ["options", "top"], + mapper: { + serializedName: "$top", + type: { + name: "Number" + } + } +}; + +export const includeBody: OperationQueryParameter = { + parameterPath: ["options", "includeBody"], + mapper: { + serializedName: "includeBody", + type: { + name: "Boolean" + } + } +}; + +export const skipToken: OperationQueryParameter = { + parameterPath: ["options", "skipToken"], + mapper: { + serializedName: "$skipToken", + type: { + name: "String" + } + } +}; + +export const querySearchProperties: OperationParameter = { + parameterPath: "querySearchProperties", + mapper: LogAnalyticsQueryPackQuerySearchPropertiesMapper +}; + +export const id: OperationURLParameter = { + parameterPath: "id", + mapper: { + serializedName: "id", + required: true, + type: { + name: "String" + } + } +}; + +export const queryPayload: OperationParameter = { + parameterPath: "queryPayload", + mapper: LogAnalyticsQueryPackQueryMapper +}; + export const workspaceName: OperationURLParameter = { parameterPath: "workspaceName", mapper: { @@ -95,7 +207,7 @@ export const workspaceName: OperationURLParameter = { } }; -export const apiVersion: OperationQueryParameter = { +export const apiVersion1: OperationQueryParameter = { parameterPath: "apiVersion", mapper: { defaultValue: "2020-08-01", @@ -107,18 +219,6 @@ export const apiVersion: OperationQueryParameter = { } }; -export const contentType: OperationParameter = { - parameterPath: ["options", "contentType"], - mapper: { - defaultValue: "application/json", - isConstant: true, - serializedName: "Content-Type", - type: { - name: "String" - } - } -}; - export const parameters: OperationParameter = { parameterPath: "parameters", mapper: DataExportMapper @@ -188,18 +288,6 @@ export const skiptoken: OperationQueryParameter = { } }; -export const nextLink: OperationURLParameter = { - parameterPath: "nextLink", - mapper: { - serializedName: "nextLink", - required: true, - type: { - name: "String" - } - }, - skipEncoding: true -}; - export const intelligencePackName: OperationURLParameter = { parameterPath: "intelligencePackName", mapper: { @@ -325,18 +413,6 @@ export const purgeId: OperationURLParameter = { } }; -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: { @@ -350,22 +426,6 @@ export const apiVersion2: OperationQueryParameter = { }; export const parameters6: OperationParameter = { - parameterPath: "parameters", - mapper: TableMapper -}; - -export const tableName: OperationURLParameter = { - parameterPath: "tableName", - mapper: { - serializedName: "tableName", - required: true, - type: { - name: "String" - } - } -}; - -export const parameters7: OperationParameter = { parameterPath: "parameters", mapper: ClusterMapper }; @@ -397,12 +457,24 @@ export const clusterName1: OperationURLParameter = { } }; -export const parameters8: OperationParameter = { +export const parameters7: OperationParameter = { parameterPath: "parameters", mapper: ClusterPatchMapper }; -export const parameters9: OperationParameter = { +export const apiVersion3: OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + defaultValue: "2021-12-01-preview", + isConstant: true, + serializedName: "api-version", + type: { + name: "String" + } + } +}; + +export const parameters8: OperationParameter = { parameterPath: "parameters", mapper: WorkspaceMapper }; @@ -417,7 +489,23 @@ export const force: OperationQueryParameter = { } }; -export const parameters10: OperationParameter = { +export const parameters9: OperationParameter = { parameterPath: "parameters", mapper: WorkspacePatchMapper }; + +export const parameters10: OperationParameter = { + parameterPath: "parameters", + mapper: TableMapper +}; + +export const tableName: OperationURLParameter = { + parameterPath: "tableName", + mapper: { + serializedName: "tableName", + required: true, + type: { + name: "String" + } + } +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts index 72993d35f63c..1bf4b3e1f72c 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts @@ -9,6 +9,8 @@ import * as coreClient from "@azure/core-client"; import * as coreAuth from "@azure/core-auth"; import { + QueryPacksImpl, + QueriesImpl, DataExportsImpl, DataSourcesImpl, IntelligencePacksImpl, @@ -22,15 +24,17 @@ import { SavedSearchesImpl, AvailableServiceTiersImpl, GatewaysImpl, - SchemaImpl, + SchemaOperationsImpl, WorkspacePurgeImpl, - OperationsImpl, - TablesImpl, ClustersImpl, + OperationsImpl, WorkspacesImpl, - DeletedWorkspacesImpl + DeletedWorkspacesImpl, + TablesImpl } from "./operations"; import { + QueryPacks, + Queries, DataExports, DataSources, IntelligencePacks, @@ -44,13 +48,13 @@ import { SavedSearches, AvailableServiceTiers, Gateways, - Schema, + SchemaOperations, WorkspacePurge, - Operations, - Tables, Clusters, + Operations, Workspaces, - DeletedWorkspaces + DeletedWorkspaces, + Tables } from "./operationsInterfaces"; import { OperationalInsightsManagementClientOptionalParams } from "./models"; @@ -85,7 +89,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-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -108,6 +112,8 @@ export class OperationalInsightsManagementClient extends coreClient.ServiceClien // Assigning values to Constant parameters this.$host = options.$host || "https://management.azure.com"; + this.queryPacks = new QueryPacksImpl(this); + this.queries = new QueriesImpl(this); this.dataExports = new DataExportsImpl(this); this.dataSources = new DataSourcesImpl(this); this.intelligencePacks = new IntelligencePacksImpl(this); @@ -121,15 +127,17 @@ export class OperationalInsightsManagementClient extends coreClient.ServiceClien this.savedSearches = new SavedSearchesImpl(this); this.availableServiceTiers = new AvailableServiceTiersImpl(this); this.gateways = new GatewaysImpl(this); - this.schema = new SchemaImpl(this); + this.schemaOperations = new SchemaOperationsImpl(this); this.workspacePurge = new WorkspacePurgeImpl(this); - this.operations = new OperationsImpl(this); - this.tables = new TablesImpl(this); this.clusters = new ClustersImpl(this); + this.operations = new OperationsImpl(this); this.workspaces = new WorkspacesImpl(this); this.deletedWorkspaces = new DeletedWorkspacesImpl(this); + this.tables = new TablesImpl(this); } + queryPacks: QueryPacks; + queries: Queries; dataExports: DataExports; dataSources: DataSources; intelligencePacks: IntelligencePacks; @@ -143,11 +151,11 @@ export class OperationalInsightsManagementClient extends coreClient.ServiceClien savedSearches: SavedSearches; availableServiceTiers: AvailableServiceTiers; gateways: Gateways; - schema: Schema; + schemaOperations: SchemaOperations; workspacePurge: WorkspacePurge; - operations: Operations; - tables: Tables; clusters: Clusters; + operations: Operations; workspaces: Workspaces; deletedWorkspaces: DeletedWorkspaces; + tables: Tables; } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts index 628a2c9fed35..bc9dbc06f8c9 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/availableServiceTiers.ts @@ -64,7 +64,7 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { } } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts index 7bf2ae7be597..b3417fde6378 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts @@ -538,7 +538,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion2], urlParameters: [ Parameters.$host, @@ -616,7 +616,7 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters8, + requestBody: Parameters.parameters7, queryParameters: [Parameters.apiVersion2], urlParameters: [ Parameters.$host, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts index 0d03f0a6eced..c273eb2edd92 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts @@ -187,7 +187,7 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -213,7 +213,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -237,7 +237,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -259,7 +259,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts index c269b3312140..3ca15790f1f9 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataSources.ts @@ -233,7 +233,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters1, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -250,7 +250,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataSources/{dataSourceName}", httpMethod: "DELETE", responses: { 200: {}, 204: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -269,7 +269,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.DataSource } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -290,7 +290,7 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion1, Parameters.filter, Parameters.skiptoken ], @@ -312,7 +312,7 @@ const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { } }, queryParameters: [ - Parameters.apiVersion, + Parameters.apiVersion1, Parameters.filter, Parameters.skiptoken ], @@ -320,8 +320,8 @@ const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.nextLink + Parameters.nextLink, + Parameters.workspaceName ], 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..7736fa9c1efd 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.apiVersion3], 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.apiVersion3], 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 index d1fb688745cd..79f973d04d8a 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/gateways.ts @@ -52,7 +52,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/gateways/{gatewayId}", httpMethod: "DELETE", responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts index c35fd126bd82..1b8f178586b9 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts @@ -6,6 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./queryPacks"; +export * from "./queries"; export * from "./dataExports"; export * from "./dataSources"; export * from "./intelligencePacks"; @@ -19,10 +21,10 @@ export * from "./storageInsightConfigs"; export * from "./savedSearches"; export * from "./availableServiceTiers"; export * from "./gateways"; -export * from "./schema"; +export * from "./schemaOperations"; export * from "./workspacePurge"; -export * from "./operations"; -export * from "./tables"; export * from "./clusters"; +export * from "./operations"; export * from "./workspaces"; export * from "./deletedWorkspaces"; +export * from "./tables"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts index b6d5335d0a7e..bad141e3b891 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/intelligencePacks.ts @@ -94,7 +94,7 @@ const disableOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Disable", httpMethod: "POST", responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -109,7 +109,7 @@ const enableOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/intelligencePacks/{intelligencePackName}/Enable", httpMethod: "POST", responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -135,7 +135,7 @@ const listOperationSpec: coreClient.OperationSpec = { } } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts index 1b5bcde3fb21..f9b823d69c08 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts @@ -348,7 +348,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -378,7 +378,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.LinkedService } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -398,7 +398,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.LinkedService } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -418,7 +418,7 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.LinkedServiceListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts index 1cc9823090f0..97782d5bf490 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts @@ -191,7 +191,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters3, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -208,7 +208,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/linkedStorageAccounts/{dataSourceType}", httpMethod: "DELETE", responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -227,7 +227,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.LinkedStorageAccountsResource } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -247,7 +247,7 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.LinkedStorageAccountsListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts index 4bc8ff3c2d27..f290e2fa17d0 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/managementGroups.ts @@ -108,7 +108,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkspaceListManagementGroupsResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts index dd0df6c485e8..fc2a28825eb2 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/operationStatuses.ts @@ -57,7 +57,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.OperationStatus } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/operations.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/operations.ts index 6e78b7bce1f9..3ff074f1f8d5 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.apiVersion3], urlParameters: [Parameters.$host], headerParameters: [Parameters.accept], serializer @@ -130,7 +130,7 @@ const listNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion1], + queryParameters: [Parameters.apiVersion3], urlParameters: [Parameters.$host, Parameters.nextLink], headerParameters: [Parameters.accept], serializer diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/queries.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/queries.ts new file mode 100644 index 000000000000..9cee29773b36 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/queries.ts @@ -0,0 +1,564 @@ +/* + * 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 { Queries } 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 { + LogAnalyticsQueryPackQuery, + QueriesListNextOptionalParams, + QueriesListOptionalParams, + LogAnalyticsQueryPackQuerySearchProperties, + QueriesSearchNextOptionalParams, + QueriesSearchOptionalParams, + QueriesListResponse, + QueriesSearchResponse, + QueriesGetOptionalParams, + QueriesGetResponse, + QueriesPutOptionalParams, + QueriesPutResponse, + QueriesUpdateOptionalParams, + QueriesUpdateResponse, + QueriesDeleteOptionalParams, + QueriesListNextResponse, + QueriesSearchNextResponse +} from "../models"; + +/// +/** Class containing Queries operations. */ +export class QueriesImpl implements Queries { + private readonly client: OperationalInsightsManagementClient; + + /** + * Initialize a new instance of the class Queries class. + * @param client Reference to the service client + */ + constructor(client: OperationalInsightsManagementClient) { + this.client = client; + } + + /** + * Gets a list of Queries defined within a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param options The options parameters. + */ + public list( + resourceGroupName: string, + queryPackName: string, + options?: QueriesListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(resourceGroupName, queryPackName, options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(resourceGroupName, queryPackName, options); + } + }; + } + + private async *listPagingPage( + resourceGroupName: string, + queryPackName: string, + options?: QueriesListOptionalParams + ): AsyncIterableIterator { + let result = await this._list(resourceGroupName, queryPackName, options); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._listNext( + resourceGroupName, + queryPackName, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *listPagingAll( + resourceGroupName: string, + queryPackName: string, + options?: QueriesListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage( + resourceGroupName, + queryPackName, + options + )) { + yield* page; + } + } + + /** + * Search a list of Queries defined within a Log Analytics QueryPack according to given search + * properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param querySearchProperties Properties by which to search queries in the given Log Analytics + * QueryPack. + * @param options The options parameters. + */ + public listSearch( + resourceGroupName: string, + queryPackName: string, + querySearchProperties: LogAnalyticsQueryPackQuerySearchProperties, + options?: QueriesSearchOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.searchPagingAll( + resourceGroupName, + queryPackName, + querySearchProperties, + options + ); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.searchPagingPage( + resourceGroupName, + queryPackName, + querySearchProperties, + options + ); + } + }; + } + + private async *searchPagingPage( + resourceGroupName: string, + queryPackName: string, + querySearchProperties: LogAnalyticsQueryPackQuerySearchProperties, + options?: QueriesSearchOptionalParams + ): AsyncIterableIterator { + let result = await this._search( + resourceGroupName, + queryPackName, + querySearchProperties, + options + ); + yield result.value || []; + let continuationToken = result.nextLink; + while (continuationToken) { + result = await this._searchNext( + resourceGroupName, + queryPackName, + querySearchProperties, + continuationToken, + options + ); + continuationToken = result.nextLink; + yield result.value || []; + } + } + + private async *searchPagingAll( + resourceGroupName: string, + queryPackName: string, + querySearchProperties: LogAnalyticsQueryPackQuerySearchProperties, + options?: QueriesSearchOptionalParams + ): AsyncIterableIterator { + for await (const page of this.searchPagingPage( + resourceGroupName, + queryPackName, + querySearchProperties, + options + )) { + yield* page; + } + } + + /** + * Gets a list of Queries defined within a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param options The options parameters. + */ + private _list( + resourceGroupName: string, + queryPackName: string, + options?: QueriesListOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, options }, + listOperationSpec + ); + } + + /** + * Search a list of Queries defined within a Log Analytics QueryPack according to given search + * properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param querySearchProperties Properties by which to search queries in the given Log Analytics + * QueryPack. + * @param options The options parameters. + */ + private _search( + resourceGroupName: string, + queryPackName: string, + querySearchProperties: LogAnalyticsQueryPackQuerySearchProperties, + options?: QueriesSearchOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, querySearchProperties, options }, + searchOperationSpec + ); + } + + /** + * Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param id The id of a specific query defined in the Log Analytics QueryPack + * @param options The options parameters. + */ + get( + resourceGroupName: string, + queryPackName: string, + id: string, + options?: QueriesGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, id, options }, + getOperationSpec + ); + } + + /** + * Adds or Updates a specific Query within a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param id The id of a specific query defined in the Log Analytics QueryPack + * @param queryPayload Properties that need to be specified to create a new query and add it to a Log + * Analytics QueryPack. + * @param options The options parameters. + */ + put( + resourceGroupName: string, + queryPackName: string, + id: string, + queryPayload: LogAnalyticsQueryPackQuery, + options?: QueriesPutOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, id, queryPayload, options }, + putOperationSpec + ); + } + + /** + * Adds or Updates a specific Query within a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param id The id of a specific query defined in the Log Analytics QueryPack + * @param queryPayload Properties that need to be specified to create a new query and add it to a Log + * Analytics QueryPack. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + queryPackName: string, + id: string, + queryPayload: LogAnalyticsQueryPackQuery, + options?: QueriesUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, id, queryPayload, options }, + updateOperationSpec + ); + } + + /** + * Deletes a specific Query defined within an Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param id The id of a specific query defined in the Log Analytics QueryPack + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + queryPackName: string, + id: string, + options?: QueriesDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, id, options }, + deleteOperationSpec + ); + } + + /** + * ListNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + resourceGroupName: string, + queryPackName: string, + nextLink: string, + options?: QueriesListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, nextLink, options }, + listNextOperationSpec + ); + } + + /** + * SearchNext + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param querySearchProperties Properties by which to search queries in the given Log Analytics + * QueryPack. + * @param nextLink The nextLink from the previous successful call to the Search method. + * @param options The options parameters. + */ + private _searchNext( + resourceGroupName: string, + queryPackName: string, + querySearchProperties: LogAnalyticsQueryPackQuerySearchProperties, + nextLink: string, + options?: QueriesSearchNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + queryPackName, + querySearchProperties, + nextLink, + options + }, + searchNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackQueryListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.top, + Parameters.includeBody, + Parameters.skipToken + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const searchOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries/search", + httpMethod: "POST", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackQueryListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.querySearchProperties, + queryParameters: [ + Parameters.apiVersion, + Parameters.top, + Parameters.includeBody, + Parameters.skipToken + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries/{id}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackQuery + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName, + Parameters.id + ], + headerParameters: [Parameters.accept], + serializer +}; +const putOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries/{id}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackQuery + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.queryPayload, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName, + Parameters.id + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries/{id}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackQuery + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.queryPayload, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName, + Parameters.id + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}/queries/{id}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName, + Parameters.id + ], + headerParameters: [Parameters.accept], + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackQueryListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.top, + Parameters.includeBody, + Parameters.skipToken + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const searchNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackQueryListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [ + Parameters.apiVersion, + Parameters.top, + Parameters.includeBody, + Parameters.skipToken + ], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName, + Parameters.nextLink + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/queryPacks.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/queryPacks.ts new file mode 100644 index 000000000000..78270d7fecf4 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/queryPacks.ts @@ -0,0 +1,451 @@ +/* + * 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 { QueryPacks } 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 { + LogAnalyticsQueryPack, + QueryPacksListNextOptionalParams, + QueryPacksListOptionalParams, + QueryPacksListByResourceGroupNextOptionalParams, + QueryPacksListByResourceGroupOptionalParams, + QueryPacksListResponse, + QueryPacksListByResourceGroupResponse, + QueryPacksDeleteOptionalParams, + QueryPacksGetOptionalParams, + QueryPacksGetResponse, + QueryPacksCreateOrUpdateOptionalParams, + QueryPacksCreateOrUpdateResponse, + TagsResource, + QueryPacksUpdateTagsOptionalParams, + QueryPacksUpdateTagsResponse, + QueryPacksListNextResponse, + QueryPacksListByResourceGroupNextResponse +} from "../models"; + +/// +/** Class containing QueryPacks operations. */ +export class QueryPacksImpl implements QueryPacks { + private readonly client: OperationalInsightsManagementClient; + + /** + * Initialize a new instance of the class QueryPacks class. + * @param client Reference to the service client + */ + constructor(client: OperationalInsightsManagementClient) { + this.client = client; + } + + /** + * Gets a list of all Log Analytics QueryPacks within a subscription. + * @param options The options parameters. + */ + public list( + options?: QueryPacksListOptionalParams + ): PagedAsyncIterableIterator { + const iter = this.listPagingAll(options); + return { + next() { + return iter.next(); + }, + [Symbol.asyncIterator]() { + return this; + }, + byPage: () => { + return this.listPagingPage(options); + } + }; + } + + private async *listPagingPage( + options?: QueryPacksListOptionalParams + ): 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?: QueryPacksListOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listPagingPage(options)) { + yield* page; + } + } + + /** + * Gets a list of Log Analytics QueryPacks within 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?: QueryPacksListByResourceGroupOptionalParams + ): 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?: QueryPacksListByResourceGroupOptionalParams + ): 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?: QueryPacksListByResourceGroupOptionalParams + ): AsyncIterableIterator { + for await (const page of this.listByResourceGroupPagingPage( + resourceGroupName, + options + )) { + yield* page; + } + } + + /** + * Gets a list of all Log Analytics QueryPacks within a subscription. + * @param options The options parameters. + */ + private _list( + options?: QueryPacksListOptionalParams + ): Promise { + return this.client.sendOperationRequest({ options }, listOperationSpec); + } + + /** + * Gets a list of Log Analytics QueryPacks within 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?: QueryPacksListByResourceGroupOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, options }, + listByResourceGroupOperationSpec + ); + } + + /** + * Deletes a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + queryPackName: string, + options?: QueryPacksDeleteOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, options }, + deleteOperationSpec + ); + } + + /** + * Returns a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + queryPackName: string, + options?: QueryPacksGetOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, options }, + getOperationSpec + ); + } + + /** + * Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log + * Analytics QueryPack. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + queryPackName: string, + logAnalyticsQueryPackPayload: LogAnalyticsQueryPack, + options?: QueryPacksCreateOrUpdateOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + queryPackName, + logAnalyticsQueryPackPayload, + options + }, + createOrUpdateOperationSpec + ); + } + + /** + * Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param queryPackTags Updated tag information to set into the QueryPack instance. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + queryPackName: string, + queryPackTags: TagsResource, + options?: QueryPacksUpdateTagsOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, queryPackName, queryPackTags, options }, + updateTagsOperationSpec + ); + } + + /** + * ListNext + * @param nextLink The nextLink from the previous successful call to the List method. + * @param options The options parameters. + */ + private _listNext( + nextLink: string, + options?: QueryPacksListNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { nextLink, options }, + listNextOperationSpec + ); + } + + /** + * 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?: QueryPacksListByResourceGroupNextOptionalParams + ): Promise { + return this.client.sendOperationRequest( + { resourceGroupName, nextLink, options }, + listByResourceGroupNextOperationSpec + ); + } +} +// Operation Specifications +const serializer = coreClient.createSerializer(Mappers, /* isXml */ false); + +const listOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/queryPacks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [Parameters.$host, Parameters.subscriptionId], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName + ], + headerParameters: [Parameters.accept], + serializer +}; +const deleteOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}", + httpMethod: "DELETE", + responses: { + 200: {}, + 204: {}, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const getOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPack + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName + ], + headerParameters: [Parameters.accept], + serializer +}; +const createOrUpdateOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}", + httpMethod: "PUT", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPack + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.logAnalyticsQueryPackPayload, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const updateTagsOperationSpec: coreClient.OperationSpec = { + path: + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/queryPacks/{queryPackName}", + httpMethod: "PATCH", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPack + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + requestBody: Parameters.queryPackTags, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + Parameters.queryPackName + ], + headerParameters: [Parameters.accept, Parameters.contentType], + mediaType: "json", + serializer +}; +const listNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.nextLink + ], + headerParameters: [Parameters.accept], + serializer +}; +const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = { + path: "{nextLink}", + httpMethod: "GET", + responses: { + 200: { + bodyMapper: Mappers.LogAnalyticsQueryPackListResult + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + queryParameters: [Parameters.apiVersion], + urlParameters: [ + Parameters.$host, + Parameters.subscriptionId, + Parameters.resourceGroupName, + 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 index b89eaf219501..375f79332241 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/savedSearches.ts @@ -118,7 +118,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/savedSearches/{savedSearchId}", httpMethod: "DELETE", responses: { 200: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -138,7 +138,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters5, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -159,7 +159,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SavedSearch } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -179,7 +179,7 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SavedSearchesListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/schemaOperations.ts similarity index 86% rename from sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts rename to sdk/operationalinsights/arm-operationalinsights/src/operations/schemaOperations.ts index 8eeaf89350ef..667ec9b7d518 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/schema.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/schemaOperations.ts @@ -6,19 +6,19 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { Schema } from "../operationsInterfaces"; +import { SchemaOperations } 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 { +/** Class containing SchemaOperations operations. */ +export class SchemaOperationsImpl implements SchemaOperations { private readonly client: OperationalInsightsManagementClient; /** - * Initialize a new instance of the class Schema class. + * Initialize a new instance of the class SchemaOperations class. * @param client Reference to the service client */ constructor(client: OperationalInsightsManagementClient) { @@ -54,7 +54,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SearchGetSchemaResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts index a6543cd1cd92..fb13c24a024c 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/sharedKeysOperations.ts @@ -77,7 +77,7 @@ const getSharedKeysOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SharedKeys } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -96,7 +96,7 @@ const regenerateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.SharedKeys } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts index ff2e9fec9169..591d739ae0c2 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/storageInsightConfigs.ts @@ -226,7 +226,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters4, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -247,7 +247,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.StorageInsight } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -263,7 +263,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/storageInsightConfigs/{storageInsightName}", httpMethod: "DELETE", responses: { 200: {}, 204: {} }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -282,7 +282,7 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.StorageInsightListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -300,13 +300,13 @@ const listByWorkspaceNextOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.StorageInsightListResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, Parameters.resourceGroupName, - Parameters.workspaceName, - Parameters.nextLink + Parameters.nextLink, + Parameters.workspaceName ], 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..8a2c70b0ecbc 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.apiVersion3], 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.parameters10, + queryParameters: [Parameters.apiVersion3], 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.parameters10, + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -262,7 +537,52 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3], + 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.apiVersion3], + 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.apiVersion3], 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 index f67f1dac76db..a9b3c3333716 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/usages.ts @@ -108,7 +108,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkspaceListUsagesResult } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts index a4bf96299ccc..59cb12087176 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts @@ -90,7 +90,7 @@ const purgeOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.body, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -110,7 +110,7 @@ const getPurgeStatusOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.WorkspacePurgeStatusResponse } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts index 1984b54b8aed..314e37f9a2e7 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.apiVersion3], 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.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -419,8 +419,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters9, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters8, + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -444,7 +444,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2, Parameters.force], + queryParameters: [Parameters.apiVersion3, Parameters.force], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -466,7 +466,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -488,8 +488,8 @@ const updateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters10, - queryParameters: [Parameters.apiVersion2], + requestBody: Parameters.parameters9, + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/index.ts index c35fd126bd82..1b8f178586b9 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/index.ts @@ -6,6 +6,8 @@ * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ +export * from "./queryPacks"; +export * from "./queries"; export * from "./dataExports"; export * from "./dataSources"; export * from "./intelligencePacks"; @@ -19,10 +21,10 @@ export * from "./storageInsightConfigs"; export * from "./savedSearches"; export * from "./availableServiceTiers"; export * from "./gateways"; -export * from "./schema"; +export * from "./schemaOperations"; export * from "./workspacePurge"; -export * from "./operations"; -export * from "./tables"; export * from "./clusters"; +export * from "./operations"; export * from "./workspaces"; export * from "./deletedWorkspaces"; +export * from "./tables"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/queries.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/queries.ts new file mode 100644 index 000000000000..ee121968bd63 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/queries.ts @@ -0,0 +1,111 @@ +/* + * 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 { + LogAnalyticsQueryPackQuery, + QueriesListOptionalParams, + LogAnalyticsQueryPackQuerySearchProperties, + QueriesSearchOptionalParams, + QueriesGetOptionalParams, + QueriesGetResponse, + QueriesPutOptionalParams, + QueriesPutResponse, + QueriesUpdateOptionalParams, + QueriesUpdateResponse, + QueriesDeleteOptionalParams +} from "../models"; + +/// +/** Interface representing a Queries. */ +export interface Queries { + /** + * Gets a list of Queries defined within a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param options The options parameters. + */ + list( + resourceGroupName: string, + queryPackName: string, + options?: QueriesListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Search a list of Queries defined within a Log Analytics QueryPack according to given search + * properties. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param querySearchProperties Properties by which to search queries in the given Log Analytics + * QueryPack. + * @param options The options parameters. + */ + listSearch( + resourceGroupName: string, + queryPackName: string, + querySearchProperties: LogAnalyticsQueryPackQuerySearchProperties, + options?: QueriesSearchOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param id The id of a specific query defined in the Log Analytics QueryPack + * @param options The options parameters. + */ + get( + resourceGroupName: string, + queryPackName: string, + id: string, + options?: QueriesGetOptionalParams + ): Promise; + /** + * Adds or Updates a specific Query within a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param id The id of a specific query defined in the Log Analytics QueryPack + * @param queryPayload Properties that need to be specified to create a new query and add it to a Log + * Analytics QueryPack. + * @param options The options parameters. + */ + put( + resourceGroupName: string, + queryPackName: string, + id: string, + queryPayload: LogAnalyticsQueryPackQuery, + options?: QueriesPutOptionalParams + ): Promise; + /** + * Adds or Updates a specific Query within a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param id The id of a specific query defined in the Log Analytics QueryPack + * @param queryPayload Properties that need to be specified to create a new query and add it to a Log + * Analytics QueryPack. + * @param options The options parameters. + */ + update( + resourceGroupName: string, + queryPackName: string, + id: string, + queryPayload: LogAnalyticsQueryPackQuery, + options?: QueriesUpdateOptionalParams + ): Promise; + /** + * Deletes a specific Query defined within an Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param id The id of a specific query defined in the Log Analytics QueryPack + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + queryPackName: string, + id: string, + options?: QueriesDeleteOptionalParams + ): Promise; +} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/queryPacks.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/queryPacks.ts new file mode 100644 index 000000000000..049c361be180 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/queryPacks.ts @@ -0,0 +1,93 @@ +/* + * 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 { + LogAnalyticsQueryPack, + QueryPacksListOptionalParams, + QueryPacksListByResourceGroupOptionalParams, + QueryPacksDeleteOptionalParams, + QueryPacksGetOptionalParams, + QueryPacksGetResponse, + QueryPacksCreateOrUpdateOptionalParams, + QueryPacksCreateOrUpdateResponse, + TagsResource, + QueryPacksUpdateTagsOptionalParams, + QueryPacksUpdateTagsResponse +} from "../models"; + +/// +/** Interface representing a QueryPacks. */ +export interface QueryPacks { + /** + * Gets a list of all Log Analytics QueryPacks within a subscription. + * @param options The options parameters. + */ + list( + options?: QueryPacksListOptionalParams + ): PagedAsyncIterableIterator; + /** + * Gets a list of Log Analytics QueryPacks within 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?: QueryPacksListByResourceGroupOptionalParams + ): PagedAsyncIterableIterator; + /** + * Deletes a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param options The options parameters. + */ + delete( + resourceGroupName: string, + queryPackName: string, + options?: QueryPacksDeleteOptionalParams + ): Promise; + /** + * Returns a Log Analytics QueryPack. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param options The options parameters. + */ + get( + resourceGroupName: string, + queryPackName: string, + options?: QueryPacksGetOptionalParams + ): Promise; + /** + * Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for + * InstrumentationKey nor AppId in the Put operation. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param logAnalyticsQueryPackPayload Properties that need to be specified to create or update a Log + * Analytics QueryPack. + * @param options The options parameters. + */ + createOrUpdate( + resourceGroupName: string, + queryPackName: string, + logAnalyticsQueryPackPayload: LogAnalyticsQueryPack, + options?: QueryPacksCreateOrUpdateOptionalParams + ): Promise; + /** + * Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param queryPackName The name of the Log Analytics QueryPack resource. + * @param queryPackTags Updated tag information to set into the QueryPack instance. + * @param options The options parameters. + */ + updateTags( + resourceGroupName: string, + queryPackName: string, + queryPackTags: TagsResource, + options?: QueryPacksUpdateTagsOptionalParams + ): Promise; +} diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/schema.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/schemaOperations.ts similarity index 88% rename from sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/schema.ts rename to sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/schemaOperations.ts index 389270add2cb..6216257a90e2 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/schema.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationsInterfaces/schemaOperations.ts @@ -8,8 +8,8 @@ import { SchemaGetOptionalParams, SchemaGetResponse } from "../models"; -/** Interface representing a Schema. */ -export interface Schema { +/** Interface representing a SchemaOperations. */ +export interface SchemaOperations { /** * Gets the schema for a given workspace. * @param resourceGroupName The name of the resource group. The name is case insensitive. 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/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