diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index a790ba736ac2..f95e614285f4 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -706,6 +706,21 @@ packages: - supports-color dev: false + /@azure/arm-operationalinsights/8.0.1: + resolution: {integrity: sha512-5Xo1jTotmMREtgNqrHGI1+fOTuejyHfiquK4dPgLIZ2CiQoOnX/RDqD5O0Pcaj2R10PLeMBk/DohBpw9mI2ugg==} + engines: {node: '>=12.0.0'} + dependencies: + '@azure/abort-controller': 1.1.0 + '@azure/core-auth': 1.3.2 + '@azure/core-client': 1.6.0 + '@azure/core-lro': 2.2.4 + '@azure/core-paging': 1.3.0 + '@azure/core-rest-pipeline': 1.8.1 + tslib: 2.4.0 + transitivePeerDependencies: + - supports-color + dev: false + /@azure/communication-common/1.1.0: resolution: {integrity: sha512-vqTtzDtb4NG3LWoWoqlOOJApZRRIIImNUKlGyTa6c1YC+v5A7UEOL9TX8NRDxvFVUF2wDHsSnkhLBVBgkcAhIQ==} engines: {node: '>=12.0.0'} @@ -3903,7 +3918,7 @@ packages: dependencies: semver: 7.3.7 shelljs: 0.8.5 - typescript: 4.8.0-dev.20220622 + typescript: 4.8.0-dev.20220623 dev: false /downlevel-dts/0.4.0: @@ -8713,8 +8728,8 @@ packages: hasBin: true dev: false - /typescript/4.8.0-dev.20220622: - resolution: {integrity: sha512-Am95aEDYflhxvYuJglcbr7lwj1tztpwUhzS9SEyo7J5sXtc84mCvEmCxlJ4+2/nWVY61PCVjyPacQaLMHD4efg==} + /typescript/4.8.0-dev.20220623: + resolution: {integrity: sha512-faQ+tFuZke9d/VFLNA/5sV9HzhXujdJ6l8OMA8Cd0O5CRu6MlCNV/zjR7QtmPFouqlF5rDD81NbEdqHwI4Lsxg==} engines: {node: '>=4.2.0'} hasBin: true dev: false @@ -12612,11 +12627,12 @@ packages: dev: false file:projects/arm-monitor.tgz: - resolution: {integrity: sha512-GuBquUl4vQ180i1KDxFWTv5UU5Kieo5p0mLaAzYsbHTHxSdWHWBLD0Ur2Arzygu4K/oYQtEUNOOkt17MbKwSsg==, tarball: file:projects/arm-monitor.tgz} + resolution: {integrity: sha512-unRRIHGGyMR8FYSN7rg5TrLhlGGzfF/3AFG4KH38lU4bwPwHayo4U5DG6bCs7T9TPRkqRNk6EcFXaUxOf8sDOg==, 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.1 '@azure/core-lro': 2.2.4 '@azure/identity': 2.0.4 '@microsoft/api-extractor': 7.18.11 @@ -12874,7 +12890,7 @@ packages: dev: false file:projects/arm-operationalinsights.tgz: - resolution: {integrity: sha512-0VfHMn2oj58AhtejUAvMuG8R+w+EhDor/Nd5KWLd3Y/+rkOJBkEoYmhUhXckh9jMrd8M8uGUU4XvIBDgQ0ueTQ==, tarball: file:projects/arm-operationalinsights.tgz} + resolution: {integrity: sha512-3+Gu4c1l+aGuSPxVjchlfw9pIJBLX9ASl0ICVYr0pQvKckgPeUBK+N8tTLoRD7SEFkoZ6+GpyoqLWAJKu8e64Q==, tarball: file:projects/arm-operationalinsights.tgz} name: '@rush-temp/arm-operationalinsights' version: 0.0.0 dependencies: @@ -12886,6 +12902,8 @@ packages: '@rollup/plugin-json': 4.1.0_rollup@2.74.1 '@rollup/plugin-multi-entry': 4.1.0_rollup@2.74.1 '@rollup/plugin-node-resolve': 13.3.0_rollup@2.74.1 + '@types/chai': 4.3.1 + chai: 4.3.6 cross-env: 7.0.3 mkdirp: 1.0.4 mocha: 7.2.0 @@ -12898,7 +12916,6 @@ packages: transitivePeerDependencies: - '@types/node' - debug - - encoding - supports-color dev: false diff --git a/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md b/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md index 97a8098abb73..901f7e5c6e20 100644 --- a/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md +++ b/sdk/operationalinsights/arm-operationalinsights/CHANGELOG.md @@ -1,15 +1,116 @@ # Release History + +## 9.0.0-beta.1 (2022-06-24) + +**Features** -## 8.0.2 (Unreleased) - -### Features Added - -### Breaking Changes - -### Bugs Fixed + - 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 -### 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.1 (2022-04-27) **Features** diff --git a/sdk/operationalinsights/arm-operationalinsights/README.md b/sdk/operationalinsights/arm-operationalinsights/README.md index 89404ca29a4f..d7318c44c57d 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 3e3c4052629a..97555f514029 100644 --- a/sdk/operationalinsights/arm-operationalinsights/_meta.json +++ b/sdk/operationalinsights/arm-operationalinsights/_meta.json @@ -1,8 +1,8 @@ { - "commit": "f9a6cb686bcc0f1b23761db19f2491c5c4df95cb", - "readme": "specification\\operationalinsights\\resource-manager\\readme.md", - "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=D:\\work\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\operationalinsights\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-alpha.19.20220408.1 --generate-sample=true", + "commit": "d8dd0de9c27c21a3802a780fbef2844fcbbb4daa", + "readme": "specification/operationalinsights/resource-manager/readme.md", + "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=D:\\Git\\azure-sdk-for-js ..\\azure-rest-api-specs\\specification\\operationalinsights\\resource-manager\\readme.md --use=@autorest/typescript@6.0.0-beta.20 --generate-sample=true", "repository_url": "https://github.com/Azure/azure-rest-api-specs.git", - "release_tool": "@azure-tools/js-sdk-release-tools@2.2.6", - "use": "@autorest/typescript@6.0.0-alpha.19.20220408.1" -} + "release_tool": "@azure-tools/js-sdk-release-tools@2.3.2", + "use": "@autorest/typescript@6.0.0-beta.20" +} \ No newline at end of file diff --git a/sdk/operationalinsights/arm-operationalinsights/package.json b/sdk/operationalinsights/arm-operationalinsights/package.json index 446882eee147..4aa9fe2852fa 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.2", + "version": "9.0.0-beta.1", "engines": { "node": ">=12.0.0" }, @@ -40,9 +40,13 @@ "uglify-js": "^3.4.9", "rimraf": "^3.0.0", "@azure/identity": "^2.0.1", - "@azure-tools/test-recorder": "^1.0.0", + "@azure-tools/test-recorder": "^2.0.0", + "@azure-tools/test-credential": "^1.0.0", "mocha": "^7.1.1", - "cross-env": "^7.0.2" + "@types/chai": "^4.2.8", + "chai": "^4.2.0", + "cross-env": "^7.0.2", + "@azure/dev-tool": "^1.0.0" }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationalinsights/arm-operationalinsights", "repository": { @@ -93,7 +97,7 @@ "unit-test:node": "cross-env TEST_MODE=playback npm run integration-test:node", "unit-test:browser": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "integration-test:node": "mocha -r esm --require ts-node/register --timeout 1200000 --full-trace test/*.ts --reporter ../../../common/tools/mocha-multi-reporter.js", + "integration-test:node": "dev-tool run test:node-ts-input -- --timeout 1200000 'test/*.ts'", "integration-test:browser": "echo skipped", "docs": "echo skipped" }, @@ -115,4 +119,4 @@ "disableDocsMs": true, "apiRefLink": "https://docs.microsoft.com/javascript/api/@azure/arm-operationalinsights?view=azure-node-preview" } -} +} \ No newline at end of file diff --git a/sdk/operationalinsights/arm-operationalinsights/recordings/node/my_test/recording_sample_test.js b/sdk/operationalinsights/arm-operationalinsights/recordings/node/my_test/recording_sample_test.js deleted file mode 100644 index 0f6ecb857acf..000000000000 --- a/sdk/operationalinsights/arm-operationalinsights/recordings/node/my_test/recording_sample_test.js +++ /dev/null @@ -1,5 +0,0 @@ -let nock = require('nock'); - -module.exports.hash = "7a6be38bb8cb644d64b4094802301751"; - -module.exports.testInfo = {"uniqueName":{},"newDate":{}} diff --git a/sdk/operationalinsights/arm-operationalinsights/recordings/node/my_test/recording_sample_test.json b/sdk/operationalinsights/arm-operationalinsights/recordings/node/my_test/recording_sample_test.json new file mode 100644 index 000000000000..f721723386d8 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/recordings/node/my_test/recording_sample_test.json @@ -0,0 +1,4 @@ +{ + "Entries": [], + "Variables": {} +} diff --git a/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md b/sdk/operationalinsights/arm-operationalinsights/review/arm-operationalinsights.api.md index 0f2b52d6a16b..3960697ddd22 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; @@ -304,7 +332,7 @@ export interface DataSourcesListByWorkspaceOptionalParams extends coreClient.Ope export type DataSourcesListByWorkspaceResponse = DataSourceListResult; // @public -export type DataSourceType = "CustomLogs" | "AzureWatson" | "Query" | "Alerts"; +export type DataSourceType = "CustomLogs" | "AzureWatson" | "Query" | "Ingestion" | "Alerts"; // @public export interface DeletedWorkspaces { @@ -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) @@ -880,7 +1062,10 @@ export interface PrivateLinkScopedResource { } // @public -export type ProxyResource = Resource & {}; +export type ProvisioningStateEnum = string; + +// @public +export type ProxyResource = Resource; // @public export type PublicNetworkAccessType = string; @@ -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/samples-dev/deletedWorkspacesListByResourceGroupSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/deletedWorkspacesListByResourceGroupSample.ts index d23f2303f7c8..e6f1e3632118 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/deletedWorkspacesListByResourceGroupSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/deletedWorkspacesListByResourceGroupSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets recently deleted workspaces in a resource group, available for recovery. * * @summary Gets recently deleted workspaces in a resource group, available for recovery. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json */ async function workspacesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/deletedWorkspacesListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/deletedWorkspacesListSample.ts index 888dee7d1875..671264333626 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/deletedWorkspacesListSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/deletedWorkspacesListSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets recently deleted workspaces in a subscription, available for recovery. * * @summary Gets recently deleted workspaces in a subscription, available for recovery. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json */ async function workspacesSubscriptionList() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/operationsListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/operationsListSample.ts index 6fbd8b3516d3..59f24cb8eb72 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/operationsListSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/operationsListSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Lists all of the available OperationalInsights Rest API operations. * * @summary Lists all of the available OperationalInsights Rest API operations. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-10-01/examples/OperationsListByTenant.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/OperationsListByTenant.json */ async function getSpecificOperationStatus() { const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesDeleteSample.ts new file mode 100644 index 000000000000..220e86a681fa --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesDeleteSample.ts @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Deletes a specific Query defined within an Log Analytics QueryPack. + * + * @summary Deletes a specific Query defined within an Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesDelete.json + */ +async function queryDelete() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queries.delete( + resourceGroupName, + queryPackName, + id + ); + console.log(result); +} + +queryDelete().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesGetSample.ts new file mode 100644 index 000000000000..baf4af1d37b5 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesGetSample.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. + * + * @summary Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesGet.json + */ +async function queryGet() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queries.get(resourceGroupName, queryPackName, id); + console.log(result); +} + +queryGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesListSample.ts new file mode 100644 index 000000000000..c18c76967017 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesListSample.ts @@ -0,0 +1,45 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + QueriesListOptionalParams, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Gets a list of Queries defined within a Log Analytics QueryPack. + * + * @summary Gets a list of Queries defined within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesList.json + */ +async function queryList() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const includeBody = true; + const options: QueriesListOptionalParams = { includeBody }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.queries.list( + resourceGroupName, + queryPackName, + options + )) { + resArray.push(item); + } + console.log(resArray); +} + +queryList().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesPutSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesPutSample.ts new file mode 100644 index 000000000000..a2a3c92af1ed --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesPutSample.ts @@ -0,0 +1,50 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + LogAnalyticsQueryPackQuery, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Adds or Updates a specific Query within a Log Analytics QueryPack. + * + * @summary Adds or Updates a specific Query within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesPut.json + */ +async function queryPut() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const queryPayload: LogAnalyticsQueryPackQuery = { + description: "my description", + body: + "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + displayName: "Exceptions - New in the last 24 hours", + related: { categories: ["analytics"] }, + tags: { myLabel: ["label1"], myOtherLabel: ["label2"] } + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queries.put( + resourceGroupName, + queryPackName, + id, + queryPayload + ); + console.log(result); +} + +queryPut().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesSearchSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesSearchSample.ts new file mode 100644 index 000000000000..a640f3581628 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesSearchSample.ts @@ -0,0 +1,52 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + LogAnalyticsQueryPackQuerySearchProperties, + QueriesSearchOptionalParams, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Search a list of Queries defined within a Log Analytics QueryPack according to given search properties. + * + * @summary Search a list of Queries defined within a Log Analytics QueryPack according to given search properties. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesSearch.json + */ +async function querySearch() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const top = 3; + const includeBody = true; + const querySearchProperties: LogAnalyticsQueryPackQuerySearchProperties = { + related: { categories: ["other", "analytics"] }, + tags: { myLabel: ["label1"] } + }; + const options: QueriesSearchOptionalParams = { top, includeBody }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.queries.listSearch( + resourceGroupName, + queryPackName, + querySearchProperties, + options + )) { + resArray.push(item); + } + console.log(resArray); +} + +querySearch().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesUpdateSample.ts new file mode 100644 index 000000000000..34066b266f65 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queriesUpdateSample.ts @@ -0,0 +1,50 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + LogAnalyticsQueryPackQuery, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Adds or Updates a specific Query within a Log Analytics QueryPack. + * + * @summary Adds or Updates a specific Query within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesUpdate.json + */ +async function queryPatch() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const queryPayload: LogAnalyticsQueryPackQuery = { + description: "my description", + body: + "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + displayName: "Exceptions - New in the last 24 hours", + related: { categories: ["analytics"] }, + tags: { myLabel: ["label1"], myOtherLabel: ["label2"] } + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queries.update( + resourceGroupName, + queryPackName, + id, + queryPayload + ); + console.log(result); +} + +queryPatch().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksCreateOrUpdateSample.ts new file mode 100644 index 000000000000..de9ab3db5ae2 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksCreateOrUpdateSample.ts @@ -0,0 +1,72 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + LogAnalyticsQueryPack, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * + * @summary Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json + */ +async function queryPackCreate() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const logAnalyticsQueryPackPayload: LogAnalyticsQueryPack = { + location: "South Central US" + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.createOrUpdate( + resourceGroupName, + queryPackName, + logAnalyticsQueryPackPayload + ); + console.log(result); +} + +queryPackCreate().catch(console.error); + +/** + * This sample demonstrates how to Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * + * @summary Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json + */ +async function queryPackUpdate() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const logAnalyticsQueryPackPayload: LogAnalyticsQueryPack = { + location: "South Central US", + tags: { tag1: "Value1" } + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.createOrUpdate( + resourceGroupName, + queryPackName, + logAnalyticsQueryPackPayload + ); + console.log(result); +} + +queryPackUpdate().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksDeleteSample.ts new file mode 100644 index 000000000000..5fbe52639071 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksDeleteSample.ts @@ -0,0 +1,36 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Deletes a Log Analytics QueryPack. + * + * @summary Deletes a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksDelete.json + */ +async function queryPacksDelete() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.delete( + resourceGroupName, + queryPackName + ); + console.log(result); +} + +queryPacksDelete().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksGetSample.ts new file mode 100644 index 000000000000..6fdadf5ac71a --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksGetSample.ts @@ -0,0 +1,33 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Returns a Log Analytics QueryPack. + * + * @summary Returns a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksGet.json + */ +async function queryPackGet() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.get(resourceGroupName, queryPackName); + console.log(result); +} + +queryPackGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksListByResourceGroupSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksListByResourceGroupSample.ts new file mode 100644 index 000000000000..4734dbb4ae0c --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksListByResourceGroupSample.ts @@ -0,0 +1,37 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Gets a list of Log Analytics QueryPacks within a resource group. + * + * @summary Gets a list of Log Analytics QueryPacks within a resource group. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksListByResourceGroup.json + */ +async function queryPackListByResourceGroup() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.queryPacks.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +queryPackListByResourceGroup().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksListSample.ts new file mode 100644 index 000000000000..bd6906abe564 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksListSample.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Gets a list of all Log Analytics QueryPacks within a subscription. + * + * @summary Gets a list of all Log Analytics QueryPacks within a subscription. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksList.json + */ +async function queryPacksList() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.queryPacks.list()) { + resArray.push(item); + } + console.log(resArray); +} + +queryPacksList().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksUpdateTagsSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksUpdateTagsSample.ts new file mode 100644 index 000000000000..d7dddbb17d4d --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/queryPacksUpdateTagsSample.ts @@ -0,0 +1,43 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TagsResource, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * + * @summary Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdateTagsOnly.json + */ +async function queryPackUpdateTagsOnly() { + const subscriptionId = "subid"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const queryPackTags: TagsResource = { + tags: { tag1: "Value1", tag2: "Value2" } + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.updateTags( + resourceGroupName, + queryPackName, + queryPackTags + ); + console.log(result); +} + +queryPackUpdateTagsOnly().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/schemaGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/schemaGetSample.ts index 839978c5353a..ba13fbc2db47 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/schemaGetSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/schemaGetSample.ts @@ -26,7 +26,10 @@ async function workspacesGetSchema() { credential, subscriptionId ); - const result = await client.schema.get(resourceGroupName, workspaceName); + const result = await client.schemaOperations.get( + resourceGroupName, + workspaceName + ); console.log(result); } diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesCreateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesCreateOrUpdateSample.ts similarity index 62% rename from sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesCreateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesCreateOrUpdateSample.ts index a9ff517f82f3..1809b247ae06 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesCreateSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesCreateOrUpdateSample.ts @@ -15,26 +15,30 @@ import { import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Updates a Log Analytics workspace table properties. + * This sample demonstrates how to Update or Create a Log Analytics workspace table. * - * @summary Updates a Log Analytics workspace table properties. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesCreate.json + * @summary Update or Create a Log Analytics workspace table. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json */ -async function tablesSet() { +async function tablesUpsert() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const resourceGroupName = "oiautorest6685"; const workspaceName = "oiautorest6685"; - const tableName = "table1"; + const tableName = "AzureNetworkFlow"; const parameters: Table = { - isTroubleshootEnabled: false, - retentionInDays: 40 + schema: { + name: "AzureNetworkFlow", + columns: [{ name: "MyNewColumn", type: "guid" }] + }, + retentionInDays: 45, + totalRetentionInDays: 70 }; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient( credential, subscriptionId ); - const result = await client.tables.create( + const result = await client.tables.beginCreateOrUpdateAndWait( resourceGroupName, workspaceName, tableName, @@ -43,4 +47,4 @@ async function tablesSet() { console.log(result); } -tablesSet().catch(console.error); +tablesUpsert().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesDeleteSample.ts new file mode 100644 index 000000000000..fb5c84a61b35 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesDeleteSample.ts @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Delete a Log Analytics workspace table. + * + * @summary Delete a Log Analytics workspace table. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesDelete.json + */ +async function tablesGet() { + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const resourceGroupName = "oiautorest6685"; + const workspaceName = "oiautorest6685"; + const tableName = "table1_CL"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.tables.beginDeleteAndWait( + resourceGroupName, + workspaceName, + tableName + ); + console.log(result); +} + +tablesGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesGetSample.ts index cd44de8a9ebf..c016f7563503 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesGetSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesGetSample.ts @@ -15,13 +15,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets a Log Analytics workspace table. * * @summary Gets a Log Analytics workspace table. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesGet.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesGet.json */ async function tablesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const resourceGroupName = "oiautorest6685"; const workspaceName = "oiautorest6685"; - const tableName = "table1"; + const tableName = "table1_SRCH"; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient( credential, diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesListByWorkspaceSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesListByWorkspaceSample.ts index 5765486183dd..e7367bf733ed 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesListByWorkspaceSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesListByWorkspaceSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets all the tables for the specified Log Analytics workspace. * * @summary Gets all the tables for the specified Log Analytics workspace. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesList.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesList.json */ async function tablesListByWorkspace() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesMigrateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesMigrateSample.ts new file mode 100644 index 000000000000..8080072e290f --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesMigrateSample.ts @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesMigrate.json + */ +async function tablesGet() { + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const resourceGroupName = "oiautorest6685"; + const workspaceName = "oiautorest6685"; + const tableName = "table1_CL"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.tables.migrate( + resourceGroupName, + workspaceName, + tableName + ); + console.log(result); +} + +tablesGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesUpdateSample.ts index 971f57bf6fb1..bdeabfca9348 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesUpdateSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/tablesUpdateSample.ts @@ -15,26 +15,30 @@ import { import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Updates a Log Analytics workspace table properties. + * This sample demonstrates how to Update a Log Analytics workspace table. * - * @summary Updates a Log Analytics workspace table properties. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesUpdate.json + * @summary Update a Log Analytics workspace table. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json */ -async function tablesSet() { +async function tablesUpsert() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const resourceGroupName = "oiautorest6685"; const workspaceName = "oiautorest6685"; - const tableName = "table1"; + const tableName = "AzureNetworkFlow"; const parameters: Table = { - isTroubleshootEnabled: true, - retentionInDays: 40 + schema: { + name: "AzureNetworkFlow", + columns: [{ name: "MyNewColumn", type: "guid" }] + }, + retentionInDays: 45, + totalRetentionInDays: 70 }; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient( credential, subscriptionId ); - const result = await client.tables.update( + const result = await client.tables.beginUpdateAndWait( resourceGroupName, workspaceName, tableName, @@ -43,4 +47,4 @@ async function tablesSet() { console.log(result); } -tablesSet().catch(console.error); +tablesUpsert().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesCreateOrUpdateSample.ts index e1c9e9172f9b..107467293900 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesCreateOrUpdateSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Create or update a workspace. * * @summary Create or update a workspace. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesCreate.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesCreate.json */ async function workspacesCreate() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesDeleteSample.ts index d94c4fc706f9..d47575d31f17 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesDeleteSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesDeleteSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. * * @summary Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesDelete.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesDelete.json */ async function workspacesDelete() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesGetSample.ts index 7e31472aadff..da0eb2477a37 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesGetSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesGetSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets a workspace instance. * * @summary Gets a workspace instance. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesGet.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesGet.json */ async function workspaceGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesListByResourceGroupSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesListByResourceGroupSample.ts index 7542eb86b947..f5167bb170bc 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesListByResourceGroupSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesListByResourceGroupSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets workspaces in a resource group. * * @summary Gets workspaces in a resource group. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json */ async function workspacesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesListSample.ts index 16976deabd04..fa17a566fbac 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesListSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesListSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets the workspaces in a subscription. * * @summary Gets the workspaces in a subscription. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json */ async function workspacesSubscriptionList() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesUpdateSample.ts index 4f9884a0b17d..201ea5c207c7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesUpdateSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples-dev/workspacesUpdateSample.ts @@ -18,7 +18,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Updates a workspace. * * @summary Updates a workspace. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesUpdate.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesUpdate.json */ async function workspacesPatch() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/README.md b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/README.md similarity index 73% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/README.md rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/README.md index e706caefba4b..24811a26c422 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/README.md +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/README.md @@ -1,4 +1,4 @@ -# client library samples for JavaScript +# client library samples for JavaScript (Beta) These sample programs show how to use the JavaScript client libraries for in some common scenarios. @@ -19,8 +19,8 @@ These sample programs show how to use the JavaScript client libraries for in som | [dataSourcesDeleteSample.js][datasourcesdeletesample] | Deletes a data source instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesDelete.json | | [dataSourcesGetSample.js][datasourcesgetsample] | Gets a datasource instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesGet.json | | [dataSourcesListByWorkspaceSample.js][datasourceslistbyworkspacesample] | Gets the first page of data source instances in a workspace with the link to the next page. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesListByWorkspace.json | -| [deletedWorkspacesListByResourceGroupSample.js][deletedworkspaceslistbyresourcegroupsample] | Gets recently deleted workspaces in a resource group, available for recovery. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json | -| [deletedWorkspacesListSample.js][deletedworkspaceslistsample] | Gets recently deleted workspaces in a subscription, available for recovery. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json | +| [deletedWorkspacesListByResourceGroupSample.js][deletedworkspaceslistbyresourcegroupsample] | Gets recently deleted workspaces in a resource group, available for recovery. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json | +| [deletedWorkspacesListSample.js][deletedworkspaceslistsample] | Gets recently deleted workspaces in a subscription, available for recovery. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json | | [gatewaysDeleteSample.js][gatewaysdeletesample] | Delete a Log Analytics gateway. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesGatewaysDelete.json | | [intelligencePacksDisableSample.js][intelligencepacksdisablesample] | Disables an intelligence pack for a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesDisableIntelligencePack.json | | [intelligencePacksEnableSample.js][intelligencepacksenablesample] | Enables an intelligence pack for a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesEnableIntelligencePack.json | @@ -35,7 +35,19 @@ These sample programs show how to use the JavaScript client libraries for in som | [linkedStorageAccountsListByWorkspaceSample.js][linkedstorageaccountslistbyworkspacesample] | Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedStorageAccountsListByWorkspace.json | | [managementGroupsListSample.js][managementgroupslistsample] | Gets a list of management groups connected to a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesListManagementGroups.json | | [operationStatusesGetSample.js][operationstatusesgetsample] | Get the status of a long running azure asynchronous operation. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/OperationStatusesGet.json | -| [operationsListSample.js][operationslistsample] | Lists all of the available OperationalInsights Rest API operations. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-10-01/examples/OperationsListByTenant.json | +| [operationsListSample.js][operationslistsample] | Lists all of the available OperationalInsights Rest API operations. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/OperationsListByTenant.json | +| [queriesDeleteSample.js][queriesdeletesample] | Deletes a specific Query defined within an Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesDelete.json | +| [queriesGetSample.js][queriesgetsample] | Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesGet.json | +| [queriesListSample.js][querieslistsample] | Gets a list of Queries defined within a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesList.json | +| [queriesPutSample.js][queriesputsample] | Adds or Updates a specific Query within a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesPut.json | +| [queriesSearchSample.js][queriessearchsample] | Search a list of Queries defined within a Log Analytics QueryPack according to given search properties. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesSearch.json | +| [queriesUpdateSample.js][queriesupdatesample] | Adds or Updates a specific Query within a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesUpdate.json | +| [queryPacksCreateOrUpdateSample.js][querypackscreateorupdatesample] | Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json | +| [queryPacksDeleteSample.js][querypacksdeletesample] | Deletes a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksDelete.json | +| [queryPacksGetSample.js][querypacksgetsample] | Returns a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksGet.json | +| [queryPacksListByResourceGroupSample.js][querypackslistbyresourcegroupsample] | Gets a list of Log Analytics QueryPacks within a resource group. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksListByResourceGroup.json | +| [queryPacksListSample.js][querypackslistsample] | Gets a list of all Log Analytics QueryPacks within a subscription. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksList.json | +| [queryPacksUpdateTagsSample.js][querypacksupdatetagssample] | Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdateTagsOnly.json | | [savedSearchesCreateOrUpdateSample.js][savedsearchescreateorupdatesample] | Creates or updates a saved search for a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesSavedSearchesCreateOrUpdate.json | | [savedSearchesDeleteSample.js][savedsearchesdeletesample] | Deletes the specified saved search in a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesDeleteSavedSearches.json | | [savedSearchesGetSample.js][savedsearchesgetsample] | Gets the specified saved search for a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesSavedSearchesGet.json | @@ -47,19 +59,21 @@ These sample programs show how to use the JavaScript client libraries for in som | [storageInsightConfigsDeleteSample.js][storageinsightconfigsdeletesample] | Deletes a storageInsightsConfigs resource x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsDelete.json | | [storageInsightConfigsGetSample.js][storageinsightconfigsgetsample] | Gets a storage insight instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsGet.json | | [storageInsightConfigsListByWorkspaceSample.js][storageinsightconfigslistbyworkspacesample] | Lists the storage insight instances within a workspace x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsListByWorkspace.json | -| [tablesCreateSample.js][tablescreatesample] | Updates a Log Analytics workspace table properties. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesCreate.json | -| [tablesGetSample.js][tablesgetsample] | Gets a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesGet.json | -| [tablesListByWorkspaceSample.js][tableslistbyworkspacesample] | Gets all the tables for the specified Log Analytics workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesList.json | -| [tablesUpdateSample.js][tablesupdatesample] | Updates a Log Analytics workspace table properties. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesUpdate.json | +| [tablesCreateOrUpdateSample.js][tablescreateorupdatesample] | Update or Create a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json | +| [tablesDeleteSample.js][tablesdeletesample] | Delete a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesDelete.json | +| [tablesGetSample.js][tablesgetsample] | Gets a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesGet.json | +| [tablesListByWorkspaceSample.js][tableslistbyworkspacesample] | Gets all the tables for the specified Log Analytics workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesList.json | +| [tablesMigrateSample.js][tablesmigratesample] | 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. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesMigrate.json | +| [tablesUpdateSample.js][tablesupdatesample] | Update a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json | | [usagesListSample.js][usageslistsample] | Gets a list of usage metrics for a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesListUsages.json | | [workspacePurgeGetPurgeStatusSample.js][workspacepurgegetpurgestatussample] | Gets status of an ongoing purge operation. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesPurgeOperation.json | | [workspacePurgeSample.js][workspacepurgesample] | Purges data in an Log Analytics workspace by a set of user-defined filters. //@@TS-MAGIC-NEWLINE@@ In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge request to verify that the results are expected. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesPurge.json | -| [workspacesCreateOrUpdateSample.js][workspacescreateorupdatesample] | Create or update a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesCreate.json | -| [workspacesDeleteSample.js][workspacesdeletesample] | Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesDelete.json | -| [workspacesGetSample.js][workspacesgetsample] | Gets a workspace instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesGet.json | -| [workspacesListByResourceGroupSample.js][workspaceslistbyresourcegroupsample] | Gets workspaces in a resource group. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json | -| [workspacesListSample.js][workspaceslistsample] | Gets the workspaces in a subscription. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json | -| [workspacesUpdateSample.js][workspacesupdatesample] | Updates a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesUpdate.json | +| [workspacesCreateOrUpdateSample.js][workspacescreateorupdatesample] | Create or update a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesCreate.json | +| [workspacesDeleteSample.js][workspacesdeletesample] | Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesDelete.json | +| [workspacesGetSample.js][workspacesgetsample] | Gets a workspace instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesGet.json | +| [workspacesListByResourceGroupSample.js][workspaceslistbyresourcegroupsample] | Gets workspaces in a resource group. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json | +| [workspacesListSample.js][workspaceslistsample] | Gets the workspaces in a subscription. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json | +| [workspacesUpdateSample.js][workspacesupdatesample] | Updates a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesUpdate.json | ## Prerequisites @@ -99,62 +113,76 @@ npx cross-env node availableServiceTiersListByWorkspaceSample.js Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. -[availableservicetierslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/availableServiceTiersListByWorkspaceSample.js -[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersCreateOrUpdateSample.js -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersDeleteSample.js -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersGetSample.js -[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersListByResourceGroupSample.js -[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersListSample.js -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersUpdateSample.js -[dataexportscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsCreateOrUpdateSample.js -[dataexportsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsDeleteSample.js -[dataexportsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsGetSample.js -[dataexportslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsListByWorkspaceSample.js -[datasourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesCreateOrUpdateSample.js -[datasourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesDeleteSample.js -[datasourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesGetSample.js -[datasourceslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesListByWorkspaceSample.js -[deletedworkspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/deletedWorkspacesListByResourceGroupSample.js -[deletedworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/deletedWorkspacesListSample.js -[gatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/gatewaysDeleteSample.js -[intelligencepacksdisablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/intelligencePacksDisableSample.js -[intelligencepacksenablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/intelligencePacksEnableSample.js -[intelligencepackslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/intelligencePacksListSample.js -[linkedservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesCreateOrUpdateSample.js -[linkedservicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesDeleteSample.js -[linkedservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesGetSample.js -[linkedserviceslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesListByWorkspaceSample.js -[linkedstorageaccountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsCreateOrUpdateSample.js -[linkedstorageaccountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsDeleteSample.js -[linkedstorageaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsGetSample.js -[linkedstorageaccountslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsListByWorkspaceSample.js -[managementgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/managementGroupsListSample.js -[operationstatusesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/operationStatusesGetSample.js -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/operationsListSample.js -[savedsearchescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesCreateOrUpdateSample.js -[savedsearchesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesDeleteSample.js -[savedsearchesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesGetSample.js -[savedsearcheslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesListByWorkspaceSample.js -[schemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/schemaGetSample.js -[sharedkeysgetsharedkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/sharedKeysGetSharedKeysSample.js -[sharedkeysregeneratesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/sharedKeysRegenerateSample.js -[storageinsightconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsCreateOrUpdateSample.js -[storageinsightconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsDeleteSample.js -[storageinsightconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsGetSample.js -[storageinsightconfigslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsListByWorkspaceSample.js -[tablescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesCreateSample.js -[tablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesGetSample.js -[tableslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesListByWorkspaceSample.js -[tablesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesUpdateSample.js -[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/usagesListSample.js -[workspacepurgegetpurgestatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacePurgeGetPurgeStatusSample.js -[workspacepurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacePurgeSample.js -[workspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesCreateOrUpdateSample.js -[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesDeleteSample.js -[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesGetSample.js -[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesListByResourceGroupSample.js -[workspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesListSample.js -[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesUpdateSample.js +[availableservicetierslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/availableServiceTiersListByWorkspaceSample.js +[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersCreateOrUpdateSample.js +[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersDeleteSample.js +[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersGetSample.js +[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersListByResourceGroupSample.js +[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersListSample.js +[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersUpdateSample.js +[dataexportscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsCreateOrUpdateSample.js +[dataexportsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsDeleteSample.js +[dataexportsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsGetSample.js +[dataexportslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsListByWorkspaceSample.js +[datasourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesCreateOrUpdateSample.js +[datasourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesDeleteSample.js +[datasourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesGetSample.js +[datasourceslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesListByWorkspaceSample.js +[deletedworkspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/deletedWorkspacesListByResourceGroupSample.js +[deletedworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/deletedWorkspacesListSample.js +[gatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/gatewaysDeleteSample.js +[intelligencepacksdisablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/intelligencePacksDisableSample.js +[intelligencepacksenablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/intelligencePacksEnableSample.js +[intelligencepackslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/intelligencePacksListSample.js +[linkedservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesCreateOrUpdateSample.js +[linkedservicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesDeleteSample.js +[linkedservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesGetSample.js +[linkedserviceslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesListByWorkspaceSample.js +[linkedstorageaccountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsCreateOrUpdateSample.js +[linkedstorageaccountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsDeleteSample.js +[linkedstorageaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsGetSample.js +[linkedstorageaccountslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsListByWorkspaceSample.js +[managementgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/managementGroupsListSample.js +[operationstatusesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/operationStatusesGetSample.js +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/operationsListSample.js +[queriesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesDeleteSample.js +[queriesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesGetSample.js +[querieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesListSample.js +[queriesputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesPutSample.js +[queriessearchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesSearchSample.js +[queriesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesUpdateSample.js +[querypackscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksCreateOrUpdateSample.js +[querypacksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksDeleteSample.js +[querypacksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksGetSample.js +[querypackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksListByResourceGroupSample.js +[querypackslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksListSample.js +[querypacksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksUpdateTagsSample.js +[savedsearchescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesCreateOrUpdateSample.js +[savedsearchesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesDeleteSample.js +[savedsearchesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesGetSample.js +[savedsearcheslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesListByWorkspaceSample.js +[schemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/schemaGetSample.js +[sharedkeysgetsharedkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/sharedKeysGetSharedKeysSample.js +[sharedkeysregeneratesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/sharedKeysRegenerateSample.js +[storageinsightconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsCreateOrUpdateSample.js +[storageinsightconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsDeleteSample.js +[storageinsightconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsGetSample.js +[storageinsightconfigslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsListByWorkspaceSample.js +[tablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesCreateOrUpdateSample.js +[tablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesDeleteSample.js +[tablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesGetSample.js +[tableslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesListByWorkspaceSample.js +[tablesmigratesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesMigrateSample.js +[tablesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesUpdateSample.js +[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/usagesListSample.js +[workspacepurgegetpurgestatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacePurgeGetPurgeStatusSample.js +[workspacepurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacePurgeSample.js +[workspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesCreateOrUpdateSample.js +[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesDeleteSample.js +[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesGetSample.js +[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesListByResourceGroupSample.js +[workspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesListSample.js +[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesUpdateSample.js [apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-operationalinsights?view=azure-node-preview [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationalinsights/arm-operationalinsights/README.md diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/availableServiceTiersListByWorkspaceSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/availableServiceTiersListByWorkspaceSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/availableServiceTiersListByWorkspaceSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/availableServiceTiersListByWorkspaceSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersCreateOrUpdateSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersCreateOrUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersCreateOrUpdateSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersDeleteSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersDeleteSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersDeleteSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersGetSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersGetSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersListByResourceGroupSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersListByResourceGroupSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersListByResourceGroupSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersListByResourceGroupSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersListSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersListSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersListSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersListSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersUpdateSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/clustersUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/clustersUpdateSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsCreateOrUpdateSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsCreateOrUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsCreateOrUpdateSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsDeleteSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsDeleteSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsDeleteSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsGetSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsGetSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsListByWorkspaceSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsListByWorkspaceSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataExportsListByWorkspaceSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataExportsListByWorkspaceSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesCreateOrUpdateSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesCreateOrUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesCreateOrUpdateSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesDeleteSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesDeleteSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesDeleteSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesGetSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesGetSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesListByWorkspaceSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesListByWorkspaceSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/dataSourcesListByWorkspaceSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/dataSourcesListByWorkspaceSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/deletedWorkspacesListByResourceGroupSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/deletedWorkspacesListByResourceGroupSample.js similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/deletedWorkspacesListByResourceGroupSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/deletedWorkspacesListByResourceGroupSample.js index 51c332c5dc5a..11766672110f 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/deletedWorkspacesListByResourceGroupSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/deletedWorkspacesListByResourceGroupSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Gets recently deleted workspaces in a resource group, available for recovery. * * @summary Gets recently deleted workspaces in a resource group, available for recovery. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json */ async function workspacesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/deletedWorkspacesListSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/deletedWorkspacesListSample.js similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/deletedWorkspacesListSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/deletedWorkspacesListSample.js index b4ee94325380..227d6ac0207b 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/deletedWorkspacesListSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/deletedWorkspacesListSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Gets recently deleted workspaces in a subscription, available for recovery. * * @summary Gets recently deleted workspaces in a subscription, available for recovery. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json */ async function workspacesSubscriptionList() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/gatewaysDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/gatewaysDeleteSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/gatewaysDeleteSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/gatewaysDeleteSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/intelligencePacksDisableSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/intelligencePacksDisableSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/intelligencePacksDisableSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/intelligencePacksDisableSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/intelligencePacksEnableSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/intelligencePacksEnableSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/intelligencePacksEnableSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/intelligencePacksEnableSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/intelligencePacksListSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/intelligencePacksListSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/intelligencePacksListSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/intelligencePacksListSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesCreateOrUpdateSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesCreateOrUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesCreateOrUpdateSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesDeleteSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesDeleteSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesDeleteSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesGetSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesGetSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesListByWorkspaceSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesListByWorkspaceSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedServicesListByWorkspaceSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedServicesListByWorkspaceSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsCreateOrUpdateSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsCreateOrUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsCreateOrUpdateSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsDeleteSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsDeleteSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsDeleteSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsGetSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsGetSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsListByWorkspaceSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsListByWorkspaceSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/linkedStorageAccountsListByWorkspaceSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/linkedStorageAccountsListByWorkspaceSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/managementGroupsListSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/managementGroupsListSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/managementGroupsListSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/managementGroupsListSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/operationStatusesGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/operationStatusesGetSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/operationStatusesGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/operationStatusesGetSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/operationsListSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/operationsListSample.js similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/operationsListSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/operationsListSample.js index 88a9b03eb823..c0fd7507d383 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/operationsListSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/operationsListSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Lists all of the available OperationalInsights Rest API operations. * * @summary Lists all of the available OperationalInsights Rest API operations. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-10-01/examples/OperationsListByTenant.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/OperationsListByTenant.json */ async function getSpecificOperationStatus() { const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/package.json b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/package.json similarity index 80% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/package.json rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/package.json index ecc7e6963010..25e72ae94b4b 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-operationalinsights-js", + "name": "@azure-samples/arm-operationalinsights-js-beta", "private": true, "version": "1.0.0", - "description": " client library samples for JavaScript", + "description": " client library samples for JavaScript (Beta)", "engines": { "node": ">=12.0.0" }, @@ -25,7 +25,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationalinsights/arm-operationalinsights", "dependencies": { - "@azure/arm-operationalinsights": "latest", + "@azure/arm-operationalinsights": "next", "dotenv": "latest", "@azure/identity": "^2.0.1" } diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesDeleteSample.js new file mode 100644 index 000000000000..521c37dbe20b --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesDeleteSample.js @@ -0,0 +1,31 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Deletes a specific Query defined within an Log Analytics QueryPack. + * + * @summary Deletes a specific Query defined within an Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesDelete.json + */ +async function queryDelete() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.queries.delete(resourceGroupName, queryPackName, id); + console.log(result); +} + +queryDelete().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesGetSample.js new file mode 100644 index 000000000000..37b7a0e748e4 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesGetSample.js @@ -0,0 +1,31 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. + * + * @summary Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesGet.json + */ +async function queryGet() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.queries.get(resourceGroupName, queryPackName, id); + console.log(result); +} + +queryGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesListSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesListSample.js new file mode 100644 index 000000000000..34d34d2f961b --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesListSample.js @@ -0,0 +1,35 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Gets a list of Queries defined within a Log Analytics QueryPack. + * + * @summary Gets a list of Queries defined within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesList.json + */ +async function queryList() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const includeBody = true; + const options = { includeBody }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.queries.list(resourceGroupName, queryPackName, options)) { + resArray.push(item); + } + console.log(resArray); +} + +queryList().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesPutSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesPutSample.js new file mode 100644 index 000000000000..a0b49687c734 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesPutSample.js @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Adds or Updates a specific Query within a Log Analytics QueryPack. + * + * @summary Adds or Updates a specific Query within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesPut.json + */ +async function queryPut() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const queryPayload = { + description: "my description", + body: "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + displayName: "Exceptions - New in the last 24 hours", + related: { categories: ["analytics"] }, + tags: { myLabel: ["label1"], myOtherLabel: ["label2"] }, + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.queries.put(resourceGroupName, queryPackName, id, queryPayload); + console.log(result); +} + +queryPut().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesSearchSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesSearchSample.js new file mode 100644 index 000000000000..1629f1ba8009 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesSearchSample.js @@ -0,0 +1,45 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Search a list of Queries defined within a Log Analytics QueryPack according to given search properties. + * + * @summary Search a list of Queries defined within a Log Analytics QueryPack according to given search properties. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesSearch.json + */ +async function querySearch() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const top = 3; + const includeBody = true; + const querySearchProperties = { + related: { categories: ["other", "analytics"] }, + tags: { myLabel: ["label1"] }, + }; + const options = { top, includeBody }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.queries.listSearch( + resourceGroupName, + queryPackName, + querySearchProperties, + options + )) { + resArray.push(item); + } + console.log(resArray); +} + +querySearch().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesUpdateSample.js new file mode 100644 index 000000000000..4e07a3021f5a --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queriesUpdateSample.js @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Adds or Updates a specific Query within a Log Analytics QueryPack. + * + * @summary Adds or Updates a specific Query within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesUpdate.json + */ +async function queryPatch() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const queryPayload = { + description: "my description", + body: "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + displayName: "Exceptions - New in the last 24 hours", + related: { categories: ["analytics"] }, + tags: { myLabel: ["label1"], myOtherLabel: ["label2"] }, + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.queries.update(resourceGroupName, queryPackName, id, queryPayload); + console.log(result); +} + +queryPatch().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksCreateOrUpdateSample.js new file mode 100644 index 000000000000..3ca414fb4805 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksCreateOrUpdateSample.js @@ -0,0 +1,63 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * + * @summary Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json + */ +async function queryPackCreate() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const logAnalyticsQueryPackPayload = { + location: "South Central US", + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.queryPacks.createOrUpdate( + resourceGroupName, + queryPackName, + logAnalyticsQueryPackPayload + ); + console.log(result); +} + +queryPackCreate().catch(console.error); + +/** + * This sample demonstrates how to Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * + * @summary Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json + */ +async function queryPackUpdate() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const logAnalyticsQueryPackPayload = { + location: "South Central US", + tags: { tag1: "Value1" }, + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.queryPacks.createOrUpdate( + resourceGroupName, + queryPackName, + logAnalyticsQueryPackPayload + ); + console.log(result); +} + +queryPackUpdate().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksDeleteSample.js new file mode 100644 index 000000000000..0254f2e55fb5 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksDeleteSample.js @@ -0,0 +1,30 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Deletes a Log Analytics QueryPack. + * + * @summary Deletes a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksDelete.json + */ +async function queryPacksDelete() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.queryPacks.delete(resourceGroupName, queryPackName); + console.log(result); +} + +queryPacksDelete().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksGetSample.js new file mode 100644 index 000000000000..f01266891d84 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksGetSample.js @@ -0,0 +1,30 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Returns a Log Analytics QueryPack. + * + * @summary Returns a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksGet.json + */ +async function queryPackGet() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.queryPacks.get(resourceGroupName, queryPackName); + console.log(result); +} + +queryPackGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksListByResourceGroupSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksListByResourceGroupSample.js new file mode 100644 index 000000000000..a97a5dda428e --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksListByResourceGroupSample.js @@ -0,0 +1,32 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Gets a list of Log Analytics QueryPacks within a resource group. + * + * @summary Gets a list of Log Analytics QueryPacks within a resource group. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksListByResourceGroup.json + */ +async function queryPackListByResourceGroup() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.queryPacks.listByResourceGroup(resourceGroupName)) { + resArray.push(item); + } + console.log(resArray); +} + +queryPackListByResourceGroup().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksListSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksListSample.js new file mode 100644 index 000000000000..9938707f4683 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksListSample.js @@ -0,0 +1,31 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Gets a list of all Log Analytics QueryPacks within a subscription. + * + * @summary Gets a list of all Log Analytics QueryPacks within a subscription. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksList.json + */ +async function queryPacksList() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const resArray = new Array(); + for await (let item of client.queryPacks.list()) { + resArray.push(item); + } + console.log(resArray); +} + +queryPacksList().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksUpdateTagsSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksUpdateTagsSample.js new file mode 100644 index 000000000000..fb40c1442d9b --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/queryPacksUpdateTagsSample.js @@ -0,0 +1,37 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * + * @summary Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdateTagsOnly.json + */ +async function queryPackUpdateTagsOnly() { + const subscriptionId = "subid"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const queryPackTags = { + tags: { tag1: "Value1", tag2: "Value2" }, + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.queryPacks.updateTags( + resourceGroupName, + queryPackName, + queryPackTags + ); + console.log(result); +} + +queryPackUpdateTagsOnly().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/sample.env b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/sample.env similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/sample.env rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/sample.env diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesCreateOrUpdateSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesCreateOrUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesCreateOrUpdateSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesDeleteSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesDeleteSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesDeleteSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesGetSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesGetSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesListByWorkspaceSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesListByWorkspaceSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/savedSearchesListByWorkspaceSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/savedSearchesListByWorkspaceSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/schemaGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/schemaGetSample.js similarity index 93% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/schemaGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/schemaGetSample.js index f1d2c7dc88f1..3b677f3cb804 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/schemaGetSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/schemaGetSample.js @@ -23,7 +23,7 @@ async function workspacesGetSchema() { const workspaceName = "atlantisdemo"; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient(credential, subscriptionId); - const result = await client.schema.get(resourceGroupName, workspaceName); + const result = await client.schemaOperations.get(resourceGroupName, workspaceName); console.log(result); } diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/sharedKeysGetSharedKeysSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/sharedKeysGetSharedKeysSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/sharedKeysGetSharedKeysSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/sharedKeysGetSharedKeysSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/sharedKeysRegenerateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/sharedKeysRegenerateSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/sharedKeysRegenerateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/sharedKeysRegenerateSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsCreateOrUpdateSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsCreateOrUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsCreateOrUpdateSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsDeleteSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsDeleteSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsDeleteSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsGetSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsGetSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsListByWorkspaceSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsListByWorkspaceSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/storageInsightConfigsListByWorkspaceSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/storageInsightConfigsListByWorkspaceSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesCreateOrUpdateSample.js new file mode 100644 index 000000000000..5ca324ba88d5 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesCreateOrUpdateSample.js @@ -0,0 +1,44 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to Update or Create a Log Analytics workspace table. + * + * @summary Update or Create a Log Analytics workspace table. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json + */ +async function tablesUpsert() { + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const resourceGroupName = "oiautorest6685"; + const workspaceName = "oiautorest6685"; + const tableName = "AzureNetworkFlow"; + const parameters = { + schema: { + name: "AzureNetworkFlow", + columns: [{ name: "MyNewColumn", type: "guid" }], + }, + retentionInDays: 45, + totalRetentionInDays: 70, + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.tables.beginCreateOrUpdateAndWait( + resourceGroupName, + workspaceName, + tableName, + parameters + ); + console.log(result); +} + +tablesUpsert().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesDeleteSample.js similarity index 64% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesDeleteSample.js index afa3c21d10a8..4a5aff99004b 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesUpdateSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesDeleteSample.js @@ -12,29 +12,24 @@ const { OperationalInsightsManagementClient } = require("@azure/arm-operationali const { DefaultAzureCredential } = require("@azure/identity"); /** - * This sample demonstrates how to Updates a Log Analytics workspace table properties. + * This sample demonstrates how to Delete a Log Analytics workspace table. * - * @summary Updates a Log Analytics workspace table properties. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesUpdate.json + * @summary Delete a Log Analytics workspace table. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesDelete.json */ -async function tablesSet() { +async function tablesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const resourceGroupName = "oiautorest6685"; const workspaceName = "oiautorest6685"; - const tableName = "table1"; - const parameters = { - isTroubleshootEnabled: true, - retentionInDays: 40, - }; + const tableName = "table1_CL"; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient(credential, subscriptionId); - const result = await client.tables.update( + const result = await client.tables.beginDeleteAndWait( resourceGroupName, workspaceName, - tableName, - parameters + tableName ); console.log(result); } -tablesSet().catch(console.error); +tablesGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesGetSample.js similarity index 89% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesGetSample.js index 9894fff1641b..510edf2e1bd5 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesGetSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesGetSample.js @@ -15,13 +15,13 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Gets a Log Analytics workspace table. * * @summary Gets a Log Analytics workspace table. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesGet.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesGet.json */ async function tablesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const resourceGroupName = "oiautorest6685"; const workspaceName = "oiautorest6685"; - const tableName = "table1"; + const tableName = "table1_SRCH"; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient(credential, subscriptionId); const result = await client.tables.get(resourceGroupName, workspaceName, tableName); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesListByWorkspaceSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesListByWorkspaceSample.js similarity index 93% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesListByWorkspaceSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesListByWorkspaceSample.js index bc714c0771e7..61bb981fb333 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesListByWorkspaceSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesListByWorkspaceSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Gets all the tables for the specified Log Analytics workspace. * * @summary Gets all the tables for the specified Log Analytics workspace. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesList.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesList.json */ async function tablesListByWorkspace() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesMigrateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesMigrateSample.js new file mode 100644 index 000000000000..ab80e919aa8f --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesMigrateSample.js @@ -0,0 +1,31 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +const { OperationalInsightsManagementClient } = require("@azure/arm-operationalinsights"); +const { DefaultAzureCredential } = require("@azure/identity"); + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesMigrate.json + */ +async function tablesGet() { + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const resourceGroupName = "oiautorest6685"; + const workspaceName = "oiautorest6685"; + const tableName = "table1_CL"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient(credential, subscriptionId); + const result = await client.tables.migrate(resourceGroupName, workspaceName, tableName); + console.log(result); +} + +tablesGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesCreateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesUpdateSample.js similarity index 63% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesCreateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesUpdateSample.js index fa7b0a7cc769..52231152e894 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/tablesCreateSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/tablesUpdateSample.js @@ -12,23 +12,27 @@ const { OperationalInsightsManagementClient } = require("@azure/arm-operationali const { DefaultAzureCredential } = require("@azure/identity"); /** - * This sample demonstrates how to Updates a Log Analytics workspace table properties. + * This sample demonstrates how to Update a Log Analytics workspace table. * - * @summary Updates a Log Analytics workspace table properties. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesCreate.json + * @summary Update a Log Analytics workspace table. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json */ -async function tablesSet() { +async function tablesUpsert() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const resourceGroupName = "oiautorest6685"; const workspaceName = "oiautorest6685"; - const tableName = "table1"; + const tableName = "AzureNetworkFlow"; const parameters = { - isTroubleshootEnabled: false, - retentionInDays: 40, + schema: { + name: "AzureNetworkFlow", + columns: [{ name: "MyNewColumn", type: "guid" }], + }, + retentionInDays: 45, + totalRetentionInDays: 70, }; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient(credential, subscriptionId); - const result = await client.tables.create( + const result = await client.tables.beginUpdateAndWait( resourceGroupName, workspaceName, tableName, @@ -37,4 +41,4 @@ async function tablesSet() { console.log(result); } -tablesSet().catch(console.error); +tablesUpsert().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/usagesListSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/usagesListSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/usagesListSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/usagesListSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacePurgeGetPurgeStatusSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacePurgeGetPurgeStatusSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacePurgeGetPurgeStatusSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacePurgeGetPurgeStatusSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacePurgeSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacePurgeSample.js similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacePurgeSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacePurgeSample.js diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesCreateOrUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesCreateOrUpdateSample.js similarity index 93% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesCreateOrUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesCreateOrUpdateSample.js index f09723c0d8d2..eda710569a5f 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesCreateOrUpdateSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesCreateOrUpdateSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Create or update a workspace. * * @summary Create or update a workspace. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesCreate.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesCreate.json */ async function workspacesCreate() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesDeleteSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesDeleteSample.js similarity index 94% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesDeleteSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesDeleteSample.js index 082a77946f5a..a57a60ea0774 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesDeleteSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesDeleteSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. * * @summary Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesDelete.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesDelete.json */ async function workspacesDelete() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesGetSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesGetSample.js similarity index 92% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesGetSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesGetSample.js index 929984902c26..265b5aaedc2e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesGetSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesGetSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Gets a workspace instance. * * @summary Gets a workspace instance. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesGet.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesGet.json */ async function workspaceGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesListByResourceGroupSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesListByResourceGroupSample.js similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesListByResourceGroupSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesListByResourceGroupSample.js index de2b4aa89010..2dc46867e3b0 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesListByResourceGroupSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesListByResourceGroupSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Gets workspaces in a resource group. * * @summary Gets workspaces in a resource group. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json */ async function workspacesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesListSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesListSample.js similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesListSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesListSample.js index 4f8ebb0793f8..26cf4e128196 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesListSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesListSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Gets the workspaces in a subscription. * * @summary Gets the workspaces in a subscription. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json */ async function workspacesSubscriptionList() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesUpdateSample.js b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesUpdateSample.js similarity index 92% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesUpdateSample.js rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesUpdateSample.js index f9b7ce1c4ce1..5a7b9899e77a 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/javascript/workspacesUpdateSample.js +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/javascript/workspacesUpdateSample.js @@ -15,7 +15,7 @@ const { DefaultAzureCredential } = require("@azure/identity"); * This sample demonstrates how to Updates a workspace. * * @summary Updates a workspace. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesUpdate.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesUpdate.json */ async function workspacesPatch() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/README.md b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/README.md similarity index 73% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/README.md rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/README.md index 6d3e4e190fe7..3ff9c8942ada 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/README.md +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/README.md @@ -1,4 +1,4 @@ -# client library samples for TypeScript +# client library samples for TypeScript (Beta) These sample programs show how to use the TypeScript client libraries for in some common scenarios. @@ -19,8 +19,8 @@ These sample programs show how to use the TypeScript client libraries for in som | [dataSourcesDeleteSample.ts][datasourcesdeletesample] | Deletes a data source instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesDelete.json | | [dataSourcesGetSample.ts][datasourcesgetsample] | Gets a datasource instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesGet.json | | [dataSourcesListByWorkspaceSample.ts][datasourceslistbyworkspacesample] | Gets the first page of data source instances in a workspace with the link to the next page. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/DataSourcesListByWorkspace.json | -| [deletedWorkspacesListByResourceGroupSample.ts][deletedworkspaceslistbyresourcegroupsample] | Gets recently deleted workspaces in a resource group, available for recovery. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json | -| [deletedWorkspacesListSample.ts][deletedworkspaceslistsample] | Gets recently deleted workspaces in a subscription, available for recovery. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json | +| [deletedWorkspacesListByResourceGroupSample.ts][deletedworkspaceslistbyresourcegroupsample] | Gets recently deleted workspaces in a resource group, available for recovery. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json | +| [deletedWorkspacesListSample.ts][deletedworkspaceslistsample] | Gets recently deleted workspaces in a subscription, available for recovery. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json | | [gatewaysDeleteSample.ts][gatewaysdeletesample] | Delete a Log Analytics gateway. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesGatewaysDelete.json | | [intelligencePacksDisableSample.ts][intelligencepacksdisablesample] | Disables an intelligence pack for a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesDisableIntelligencePack.json | | [intelligencePacksEnableSample.ts][intelligencepacksenablesample] | Enables an intelligence pack for a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesEnableIntelligencePack.json | @@ -35,7 +35,19 @@ These sample programs show how to use the TypeScript client libraries for in som | [linkedStorageAccountsListByWorkspaceSample.ts][linkedstorageaccountslistbyworkspacesample] | Gets all linked storage accounts associated with the specified workspace, storage accounts will be sorted by their data source type. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/LinkedStorageAccountsListByWorkspace.json | | [managementGroupsListSample.ts][managementgroupslistsample] | Gets a list of management groups connected to a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesListManagementGroups.json | | [operationStatusesGetSample.ts][operationstatusesgetsample] | Get the status of a long running azure asynchronous operation. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/OperationStatusesGet.json | -| [operationsListSample.ts][operationslistsample] | Lists all of the available OperationalInsights Rest API operations. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-10-01/examples/OperationsListByTenant.json | +| [operationsListSample.ts][operationslistsample] | Lists all of the available OperationalInsights Rest API operations. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/OperationsListByTenant.json | +| [queriesDeleteSample.ts][queriesdeletesample] | Deletes a specific Query defined within an Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesDelete.json | +| [queriesGetSample.ts][queriesgetsample] | Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesGet.json | +| [queriesListSample.ts][querieslistsample] | Gets a list of Queries defined within a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesList.json | +| [queriesPutSample.ts][queriesputsample] | Adds or Updates a specific Query within a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesPut.json | +| [queriesSearchSample.ts][queriessearchsample] | Search a list of Queries defined within a Log Analytics QueryPack according to given search properties. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesSearch.json | +| [queriesUpdateSample.ts][queriesupdatesample] | Adds or Updates a specific Query within a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesUpdate.json | +| [queryPacksCreateOrUpdateSample.ts][querypackscreateorupdatesample] | Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json | +| [queryPacksDeleteSample.ts][querypacksdeletesample] | Deletes a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksDelete.json | +| [queryPacksGetSample.ts][querypacksgetsample] | Returns a Log Analytics QueryPack. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksGet.json | +| [queryPacksListByResourceGroupSample.ts][querypackslistbyresourcegroupsample] | Gets a list of Log Analytics QueryPacks within a resource group. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksListByResourceGroup.json | +| [queryPacksListSample.ts][querypackslistsample] | Gets a list of all Log Analytics QueryPacks within a subscription. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksList.json | +| [queryPacksUpdateTagsSample.ts][querypacksupdatetagssample] | Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdateTagsOnly.json | | [savedSearchesCreateOrUpdateSample.ts][savedsearchescreateorupdatesample] | Creates or updates a saved search for a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesSavedSearchesCreateOrUpdate.json | | [savedSearchesDeleteSample.ts][savedsearchesdeletesample] | Deletes the specified saved search in a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesDeleteSavedSearches.json | | [savedSearchesGetSample.ts][savedsearchesgetsample] | Gets the specified saved search for a given workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesSavedSearchesGet.json | @@ -47,19 +59,21 @@ These sample programs show how to use the TypeScript client libraries for in som | [storageInsightConfigsDeleteSample.ts][storageinsightconfigsdeletesample] | Deletes a storageInsightsConfigs resource x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsDelete.json | | [storageInsightConfigsGetSample.ts][storageinsightconfigsgetsample] | Gets a storage insight instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsGet.json | | [storageInsightConfigsListByWorkspaceSample.ts][storageinsightconfigslistbyworkspacesample] | Lists the storage insight instances within a workspace x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/StorageInsightsListByWorkspace.json | -| [tablesCreateSample.ts][tablescreatesample] | Updates a Log Analytics workspace table properties. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesCreate.json | -| [tablesGetSample.ts][tablesgetsample] | Gets a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesGet.json | -| [tablesListByWorkspaceSample.ts][tableslistbyworkspacesample] | Gets all the tables for the specified Log Analytics workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesList.json | -| [tablesUpdateSample.ts][tablesupdatesample] | Updates a Log Analytics workspace table properties. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesUpdate.json | +| [tablesCreateOrUpdateSample.ts][tablescreateorupdatesample] | Update or Create a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json | +| [tablesDeleteSample.ts][tablesdeletesample] | Delete a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesDelete.json | +| [tablesGetSample.ts][tablesgetsample] | Gets a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesGet.json | +| [tablesListByWorkspaceSample.ts][tableslistbyworkspacesample] | Gets all the tables for the specified Log Analytics workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesList.json | +| [tablesMigrateSample.ts][tablesmigratesample] | 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. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesMigrate.json | +| [tablesUpdateSample.ts][tablesupdatesample] | Update a Log Analytics workspace table. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json | | [usagesListSample.ts][usageslistsample] | Gets a list of usage metrics for a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesListUsages.json | | [workspacePurgeGetPurgeStatusSample.ts][workspacepurgegetpurgestatussample] | Gets status of an ongoing purge operation. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesPurgeOperation.json | | [workspacePurgeSample.ts][workspacepurgesample] | Purges data in an Log Analytics workspace by a set of user-defined filters. //@@TS-MAGIC-NEWLINE@@ In order to manage system resources, purge requests are throttled at 50 requests per hour. You should batch the execution of purge requests by sending a single command whose predicate includes all user identities that require purging. Use the in operator to specify multiple identities. You should run the query prior to using for a purge request to verify that the results are expected. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-08-01/examples/WorkspacesPurge.json | -| [workspacesCreateOrUpdateSample.ts][workspacescreateorupdatesample] | Create or update a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesCreate.json | -| [workspacesDeleteSample.ts][workspacesdeletesample] | Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesDelete.json | -| [workspacesGetSample.ts][workspacesgetsample] | Gets a workspace instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesGet.json | -| [workspacesListByResourceGroupSample.ts][workspaceslistbyresourcegroupsample] | Gets workspaces in a resource group. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json | -| [workspacesListSample.ts][workspaceslistsample] | Gets the workspaces in a subscription. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json | -| [workspacesUpdateSample.ts][workspacesupdatesample] | Updates a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesUpdate.json | +| [workspacesCreateOrUpdateSample.ts][workspacescreateorupdatesample] | Create or update a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesCreate.json | +| [workspacesDeleteSample.ts][workspacesdeletesample] | Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesDelete.json | +| [workspacesGetSample.ts][workspacesgetsample] | Gets a workspace instance. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesGet.json | +| [workspacesListByResourceGroupSample.ts][workspaceslistbyresourcegroupsample] | Gets workspaces in a resource group. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json | +| [workspacesListSample.ts][workspaceslistsample] | Gets the workspaces in a subscription. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json | +| [workspacesUpdateSample.ts][workspacesupdatesample] | Updates a workspace. x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesUpdate.json | ## Prerequisites @@ -111,62 +125,76 @@ npx cross-env node dist/availableServiceTiersListByWorkspaceSample.js Take a look at our [API Documentation][apiref] for more information about the APIs that are available in the clients. -[availableservicetierslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/availableServiceTiersListByWorkspaceSample.ts -[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersCreateOrUpdateSample.ts -[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersDeleteSample.ts -[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersGetSample.ts -[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersListByResourceGroupSample.ts -[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersListSample.ts -[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersUpdateSample.ts -[dataexportscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsCreateOrUpdateSample.ts -[dataexportsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsDeleteSample.ts -[dataexportsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsGetSample.ts -[dataexportslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsListByWorkspaceSample.ts -[datasourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesCreateOrUpdateSample.ts -[datasourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesDeleteSample.ts -[datasourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesGetSample.ts -[datasourceslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesListByWorkspaceSample.ts -[deletedworkspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/deletedWorkspacesListByResourceGroupSample.ts -[deletedworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/deletedWorkspacesListSample.ts -[gatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/gatewaysDeleteSample.ts -[intelligencepacksdisablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/intelligencePacksDisableSample.ts -[intelligencepacksenablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/intelligencePacksEnableSample.ts -[intelligencepackslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/intelligencePacksListSample.ts -[linkedservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesCreateOrUpdateSample.ts -[linkedservicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesDeleteSample.ts -[linkedservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesGetSample.ts -[linkedserviceslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesListByWorkspaceSample.ts -[linkedstorageaccountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsCreateOrUpdateSample.ts -[linkedstorageaccountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsDeleteSample.ts -[linkedstorageaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsGetSample.ts -[linkedstorageaccountslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsListByWorkspaceSample.ts -[managementgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/managementGroupsListSample.ts -[operationstatusesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/operationStatusesGetSample.ts -[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/operationsListSample.ts -[savedsearchescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesCreateOrUpdateSample.ts -[savedsearchesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesDeleteSample.ts -[savedsearchesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesGetSample.ts -[savedsearcheslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesListByWorkspaceSample.ts -[schemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/schemaGetSample.ts -[sharedkeysgetsharedkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/sharedKeysGetSharedKeysSample.ts -[sharedkeysregeneratesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/sharedKeysRegenerateSample.ts -[storageinsightconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsCreateOrUpdateSample.ts -[storageinsightconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsDeleteSample.ts -[storageinsightconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsGetSample.ts -[storageinsightconfigslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsListByWorkspaceSample.ts -[tablescreatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesCreateSample.ts -[tablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesGetSample.ts -[tableslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesListByWorkspaceSample.ts -[tablesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesUpdateSample.ts -[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/usagesListSample.ts -[workspacepurgegetpurgestatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacePurgeGetPurgeStatusSample.ts -[workspacepurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacePurgeSample.ts -[workspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesCreateOrUpdateSample.ts -[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesDeleteSample.ts -[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesGetSample.ts -[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesListByResourceGroupSample.ts -[workspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesListSample.ts -[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesUpdateSample.ts +[availableservicetierslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/availableServiceTiersListByWorkspaceSample.ts +[clusterscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersCreateOrUpdateSample.ts +[clustersdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersDeleteSample.ts +[clustersgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersGetSample.ts +[clusterslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersListByResourceGroupSample.ts +[clusterslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersListSample.ts +[clustersupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersUpdateSample.ts +[dataexportscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsCreateOrUpdateSample.ts +[dataexportsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsDeleteSample.ts +[dataexportsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsGetSample.ts +[dataexportslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsListByWorkspaceSample.ts +[datasourcescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesCreateOrUpdateSample.ts +[datasourcesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesDeleteSample.ts +[datasourcesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesGetSample.ts +[datasourceslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesListByWorkspaceSample.ts +[deletedworkspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/deletedWorkspacesListByResourceGroupSample.ts +[deletedworkspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/deletedWorkspacesListSample.ts +[gatewaysdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/gatewaysDeleteSample.ts +[intelligencepacksdisablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/intelligencePacksDisableSample.ts +[intelligencepacksenablesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/intelligencePacksEnableSample.ts +[intelligencepackslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/intelligencePacksListSample.ts +[linkedservicescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesCreateOrUpdateSample.ts +[linkedservicesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesDeleteSample.ts +[linkedservicesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesGetSample.ts +[linkedserviceslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesListByWorkspaceSample.ts +[linkedstorageaccountscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsCreateOrUpdateSample.ts +[linkedstorageaccountsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsDeleteSample.ts +[linkedstorageaccountsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsGetSample.ts +[linkedstorageaccountslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsListByWorkspaceSample.ts +[managementgroupslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/managementGroupsListSample.ts +[operationstatusesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/operationStatusesGetSample.ts +[operationslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/operationsListSample.ts +[queriesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesDeleteSample.ts +[queriesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesGetSample.ts +[querieslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesListSample.ts +[queriesputsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesPutSample.ts +[queriessearchsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesSearchSample.ts +[queriesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesUpdateSample.ts +[querypackscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksCreateOrUpdateSample.ts +[querypacksdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksDeleteSample.ts +[querypacksgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksGetSample.ts +[querypackslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksListByResourceGroupSample.ts +[querypackslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksListSample.ts +[querypacksupdatetagssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksUpdateTagsSample.ts +[savedsearchescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesCreateOrUpdateSample.ts +[savedsearchesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesDeleteSample.ts +[savedsearchesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesGetSample.ts +[savedsearcheslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesListByWorkspaceSample.ts +[schemagetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/schemaGetSample.ts +[sharedkeysgetsharedkeyssample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/sharedKeysGetSharedKeysSample.ts +[sharedkeysregeneratesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/sharedKeysRegenerateSample.ts +[storageinsightconfigscreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsCreateOrUpdateSample.ts +[storageinsightconfigsdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsDeleteSample.ts +[storageinsightconfigsgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsGetSample.ts +[storageinsightconfigslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsListByWorkspaceSample.ts +[tablescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesCreateOrUpdateSample.ts +[tablesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesDeleteSample.ts +[tablesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesGetSample.ts +[tableslistbyworkspacesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesListByWorkspaceSample.ts +[tablesmigratesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesMigrateSample.ts +[tablesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesUpdateSample.ts +[usageslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/usagesListSample.ts +[workspacepurgegetpurgestatussample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacePurgeGetPurgeStatusSample.ts +[workspacepurgesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacePurgeSample.ts +[workspacescreateorupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesCreateOrUpdateSample.ts +[workspacesdeletesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesDeleteSample.ts +[workspacesgetsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesGetSample.ts +[workspaceslistbyresourcegroupsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesListByResourceGroupSample.ts +[workspaceslistsample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesListSample.ts +[workspacesupdatesample]: https://github.com/Azure/azure-sdk-for-js/blob/main/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesUpdateSample.ts [apiref]: https://docs.microsoft.com/javascript/api/@azure/arm-operationalinsights?view=azure-node-preview [freesub]: https://azure.microsoft.com/free/ [package]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationalinsights/arm-operationalinsights/README.md diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/package.json b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/package.json similarity index 83% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/package.json rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/package.json index 1c861db18e68..4cc076ae86e9 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/package.json @@ -1,8 +1,8 @@ { - "name": "@azure-samples/arm-operationalinsights-ts", + "name": "@azure-samples/arm-operationalinsights-ts-beta", "private": true, "version": "1.0.0", - "description": " client library samples for TypeScript", + "description": " client library samples for TypeScript (Beta)", "engines": { "node": ">=12.0.0" }, @@ -29,7 +29,7 @@ }, "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/operationalinsights/arm-operationalinsights", "dependencies": { - "@azure/arm-operationalinsights": "latest", + "@azure/arm-operationalinsights": "next", "dotenv": "latest", "@azure/identity": "^2.0.1" }, diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/sample.env b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/sample.env similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/sample.env rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/sample.env diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/availableServiceTiersListByWorkspaceSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/availableServiceTiersListByWorkspaceSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/availableServiceTiersListByWorkspaceSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/availableServiceTiersListByWorkspaceSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersCreateOrUpdateSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersCreateOrUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersCreateOrUpdateSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersDeleteSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersDeleteSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersDeleteSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersGetSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersGetSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersListByResourceGroupSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersListByResourceGroupSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersListByResourceGroupSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersListByResourceGroupSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersListSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersListSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersListSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersUpdateSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/clustersUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/clustersUpdateSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsCreateOrUpdateSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsCreateOrUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsCreateOrUpdateSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsDeleteSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsDeleteSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsDeleteSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsGetSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsGetSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsListByWorkspaceSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsListByWorkspaceSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataExportsListByWorkspaceSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataExportsListByWorkspaceSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesCreateOrUpdateSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesCreateOrUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesCreateOrUpdateSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesDeleteSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesDeleteSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesDeleteSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesGetSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesGetSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesListByWorkspaceSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesListByWorkspaceSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/dataSourcesListByWorkspaceSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/dataSourcesListByWorkspaceSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/deletedWorkspacesListByResourceGroupSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/deletedWorkspacesListByResourceGroupSample.ts similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/deletedWorkspacesListByResourceGroupSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/deletedWorkspacesListByResourceGroupSample.ts index d23f2303f7c8..e6f1e3632118 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/deletedWorkspacesListByResourceGroupSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/deletedWorkspacesListByResourceGroupSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets recently deleted workspaces in a resource group, available for recovery. * * @summary Gets recently deleted workspaces in a resource group, available for recovery. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json */ async function workspacesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/deletedWorkspacesListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/deletedWorkspacesListSample.ts similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/deletedWorkspacesListSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/deletedWorkspacesListSample.ts index 888dee7d1875..671264333626 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/deletedWorkspacesListSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/deletedWorkspacesListSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets recently deleted workspaces in a subscription, available for recovery. * * @summary Gets recently deleted workspaces in a subscription, available for recovery. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json */ async function workspacesSubscriptionList() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/gatewaysDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/gatewaysDeleteSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/gatewaysDeleteSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/gatewaysDeleteSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/intelligencePacksDisableSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/intelligencePacksDisableSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/intelligencePacksDisableSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/intelligencePacksDisableSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/intelligencePacksEnableSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/intelligencePacksEnableSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/intelligencePacksEnableSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/intelligencePacksEnableSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/intelligencePacksListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/intelligencePacksListSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/intelligencePacksListSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/intelligencePacksListSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesCreateOrUpdateSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesCreateOrUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesCreateOrUpdateSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesDeleteSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesDeleteSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesDeleteSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesGetSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesGetSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesListByWorkspaceSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesListByWorkspaceSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedServicesListByWorkspaceSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedServicesListByWorkspaceSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsCreateOrUpdateSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsCreateOrUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsCreateOrUpdateSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsDeleteSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsDeleteSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsDeleteSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsGetSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsGetSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsListByWorkspaceSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsListByWorkspaceSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/linkedStorageAccountsListByWorkspaceSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/linkedStorageAccountsListByWorkspaceSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/managementGroupsListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/managementGroupsListSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/managementGroupsListSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/managementGroupsListSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/operationStatusesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/operationStatusesGetSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/operationStatusesGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/operationStatusesGetSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/operationsListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/operationsListSample.ts similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/operationsListSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/operationsListSample.ts index 6fbd8b3516d3..59f24cb8eb72 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/operationsListSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/operationsListSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Lists all of the available OperationalInsights Rest API operations. * * @summary Lists all of the available OperationalInsights Rest API operations. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2020-10-01/examples/OperationsListByTenant.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/OperationsListByTenant.json */ async function getSpecificOperationStatus() { const subscriptionId = "00000000-0000-0000-0000-000000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesDeleteSample.ts new file mode 100644 index 000000000000..220e86a681fa --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesDeleteSample.ts @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Deletes a specific Query defined within an Log Analytics QueryPack. + * + * @summary Deletes a specific Query defined within an Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesDelete.json + */ +async function queryDelete() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queries.delete( + resourceGroupName, + queryPackName, + id + ); + console.log(result); +} + +queryDelete().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesGetSample.ts new file mode 100644 index 000000000000..baf4af1d37b5 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesGetSample.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. + * + * @summary Gets a specific Log Analytics Query defined within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesGet.json + */ +async function queryGet() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queries.get(resourceGroupName, queryPackName, id); + console.log(result); +} + +queryGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesListSample.ts new file mode 100644 index 000000000000..c18c76967017 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesListSample.ts @@ -0,0 +1,45 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + QueriesListOptionalParams, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Gets a list of Queries defined within a Log Analytics QueryPack. + * + * @summary Gets a list of Queries defined within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesList.json + */ +async function queryList() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const includeBody = true; + const options: QueriesListOptionalParams = { includeBody }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.queries.list( + resourceGroupName, + queryPackName, + options + )) { + resArray.push(item); + } + console.log(resArray); +} + +queryList().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesPutSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesPutSample.ts new file mode 100644 index 000000000000..a2a3c92af1ed --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesPutSample.ts @@ -0,0 +1,50 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + LogAnalyticsQueryPackQuery, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Adds or Updates a specific Query within a Log Analytics QueryPack. + * + * @summary Adds or Updates a specific Query within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesPut.json + */ +async function queryPut() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const queryPayload: LogAnalyticsQueryPackQuery = { + description: "my description", + body: + "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + displayName: "Exceptions - New in the last 24 hours", + related: { categories: ["analytics"] }, + tags: { myLabel: ["label1"], myOtherLabel: ["label2"] } + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queries.put( + resourceGroupName, + queryPackName, + id, + queryPayload + ); + console.log(result); +} + +queryPut().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesSearchSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesSearchSample.ts new file mode 100644 index 000000000000..a640f3581628 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesSearchSample.ts @@ -0,0 +1,52 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + LogAnalyticsQueryPackQuerySearchProperties, + QueriesSearchOptionalParams, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Search a list of Queries defined within a Log Analytics QueryPack according to given search properties. + * + * @summary Search a list of Queries defined within a Log Analytics QueryPack according to given search properties. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesSearch.json + */ +async function querySearch() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const top = 3; + const includeBody = true; + const querySearchProperties: LogAnalyticsQueryPackQuerySearchProperties = { + related: { categories: ["other", "analytics"] }, + tags: { myLabel: ["label1"] } + }; + const options: QueriesSearchOptionalParams = { top, includeBody }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.queries.listSearch( + resourceGroupName, + queryPackName, + querySearchProperties, + options + )) { + resArray.push(item); + } + console.log(resArray); +} + +querySearch().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesUpdateSample.ts new file mode 100644 index 000000000000..34066b266f65 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queriesUpdateSample.ts @@ -0,0 +1,50 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + LogAnalyticsQueryPackQuery, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Adds or Updates a specific Query within a Log Analytics QueryPack. + * + * @summary Adds or Updates a specific Query within a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPackQueriesUpdate.json + */ +async function queryPatch() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4918"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const id = "a449f8af-8e64-4b3a-9b16-5a7165ff98c4"; + const queryPayload: LogAnalyticsQueryPackQuery = { + description: "my description", + body: + "let newExceptionsTimeRange = 1d;\nlet timeRangeToCheckBefore = 7d;\nexceptions\n| where timestamp < ago(timeRangeToCheckBefore)\n| summarize count() by problemId\n| join kind= rightanti (\nexceptions\n| where timestamp >= ago(newExceptionsTimeRange)\n| extend stack = tostring(details[0].rawStack)\n| summarize count(), dcount(user_AuthenticatedId), min(timestamp), max(timestamp), any(stack) by problemId \n) on problemId \n| order by count_ desc\n", + displayName: "Exceptions - New in the last 24 hours", + related: { categories: ["analytics"] }, + tags: { myLabel: ["label1"], myOtherLabel: ["label2"] } + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queries.update( + resourceGroupName, + queryPackName, + id, + queryPayload + ); + console.log(result); +} + +queryPatch().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksCreateOrUpdateSample.ts new file mode 100644 index 000000000000..de9ab3db5ae2 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksCreateOrUpdateSample.ts @@ -0,0 +1,72 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + LogAnalyticsQueryPack, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * + * @summary Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksCreate.json + */ +async function queryPackCreate() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const logAnalyticsQueryPackPayload: LogAnalyticsQueryPack = { + location: "South Central US" + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.createOrUpdate( + resourceGroupName, + queryPackName, + logAnalyticsQueryPackPayload + ); + console.log(result); +} + +queryPackCreate().catch(console.error); + +/** + * This sample demonstrates how to Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * + * @summary Creates (or updates) a Log Analytics QueryPack. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdate.json + */ +async function queryPackUpdate() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const logAnalyticsQueryPackPayload: LogAnalyticsQueryPack = { + location: "South Central US", + tags: { tag1: "Value1" } + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.createOrUpdate( + resourceGroupName, + queryPackName, + logAnalyticsQueryPackPayload + ); + console.log(result); +} + +queryPackUpdate().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksDeleteSample.ts new file mode 100644 index 000000000000..5fbe52639071 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksDeleteSample.ts @@ -0,0 +1,36 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Deletes a Log Analytics QueryPack. + * + * @summary Deletes a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksDelete.json + */ +async function queryPacksDelete() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.delete( + resourceGroupName, + queryPackName + ); + console.log(result); +} + +queryPacksDelete().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksGetSample.ts new file mode 100644 index 000000000000..6fdadf5ac71a --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksGetSample.ts @@ -0,0 +1,33 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Returns a Log Analytics QueryPack. + * + * @summary Returns a Log Analytics QueryPack. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksGet.json + */ +async function queryPackGet() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.get(resourceGroupName, queryPackName); + console.log(result); +} + +queryPackGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksListByResourceGroupSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksListByResourceGroupSample.ts new file mode 100644 index 000000000000..4734dbb4ae0c --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksListByResourceGroupSample.ts @@ -0,0 +1,37 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Gets a list of Log Analytics QueryPacks within a resource group. + * + * @summary Gets a list of Log Analytics QueryPacks within a resource group. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksListByResourceGroup.json + */ +async function queryPackListByResourceGroup() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const resourceGroupName = "my-resource-group"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.queryPacks.listByResourceGroup( + resourceGroupName + )) { + resArray.push(item); + } + console.log(resArray); +} + +queryPackListByResourceGroup().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksListSample.ts new file mode 100644 index 000000000000..bd6906abe564 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksListSample.ts @@ -0,0 +1,34 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Gets a list of all Log Analytics QueryPacks within a subscription. + * + * @summary Gets a list of all Log Analytics QueryPacks within a subscription. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksList.json + */ +async function queryPacksList() { + const subscriptionId = "86dc51d3-92ed-4d7e-947a-775ea79b4919"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const resArray = new Array(); + for await (let item of client.queryPacks.list()) { + resArray.push(item); + } + console.log(resArray); +} + +queryPacksList().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksUpdateTagsSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksUpdateTagsSample.ts new file mode 100644 index 000000000000..d7dddbb17d4d --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/queryPacksUpdateTagsSample.ts @@ -0,0 +1,43 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { + TagsResource, + OperationalInsightsManagementClient +} from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * + * @summary Updates an existing QueryPack's tags. To update other fields use the CreateOrUpdate method. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2019-09-01/examples/QueryPacksUpdateTagsOnly.json + */ +async function queryPackUpdateTagsOnly() { + const subscriptionId = "subid"; + const resourceGroupName = "my-resource-group"; + const queryPackName = "my-querypack"; + const queryPackTags: TagsResource = { + tags: { tag1: "Value1", tag2: "Value2" } + }; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.queryPacks.updateTags( + resourceGroupName, + queryPackName, + queryPackTags + ); + console.log(result); +} + +queryPackUpdateTagsOnly().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesCreateOrUpdateSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesCreateOrUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesCreateOrUpdateSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesDeleteSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesDeleteSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesDeleteSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesGetSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesGetSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesListByWorkspaceSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesListByWorkspaceSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/savedSearchesListByWorkspaceSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/savedSearchesListByWorkspaceSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/schemaGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/schemaGetSample.ts similarity index 92% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/schemaGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/schemaGetSample.ts index 839978c5353a..ba13fbc2db47 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/schemaGetSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/schemaGetSample.ts @@ -26,7 +26,10 @@ async function workspacesGetSchema() { credential, subscriptionId ); - const result = await client.schema.get(resourceGroupName, workspaceName); + const result = await client.schemaOperations.get( + resourceGroupName, + workspaceName + ); console.log(result); } diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/sharedKeysGetSharedKeysSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/sharedKeysGetSharedKeysSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/sharedKeysGetSharedKeysSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/sharedKeysGetSharedKeysSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/sharedKeysRegenerateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/sharedKeysRegenerateSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/sharedKeysRegenerateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/sharedKeysRegenerateSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsCreateOrUpdateSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsCreateOrUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsCreateOrUpdateSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsDeleteSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsDeleteSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsDeleteSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsGetSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsGetSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsListByWorkspaceSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsListByWorkspaceSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/storageInsightConfigsListByWorkspaceSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/storageInsightConfigsListByWorkspaceSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesCreateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesCreateOrUpdateSample.ts similarity index 62% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesCreateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesCreateOrUpdateSample.ts index a9ff517f82f3..1809b247ae06 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesCreateSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesCreateOrUpdateSample.ts @@ -15,26 +15,30 @@ import { import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Updates a Log Analytics workspace table properties. + * This sample demonstrates how to Update or Create a Log Analytics workspace table. * - * @summary Updates a Log Analytics workspace table properties. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesCreate.json + * @summary Update or Create a Log Analytics workspace table. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json */ -async function tablesSet() { +async function tablesUpsert() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const resourceGroupName = "oiautorest6685"; const workspaceName = "oiautorest6685"; - const tableName = "table1"; + const tableName = "AzureNetworkFlow"; const parameters: Table = { - isTroubleshootEnabled: false, - retentionInDays: 40 + schema: { + name: "AzureNetworkFlow", + columns: [{ name: "MyNewColumn", type: "guid" }] + }, + retentionInDays: 45, + totalRetentionInDays: 70 }; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient( credential, subscriptionId ); - const result = await client.tables.create( + const result = await client.tables.beginCreateOrUpdateAndWait( resourceGroupName, workspaceName, tableName, @@ -43,4 +47,4 @@ async function tablesSet() { console.log(result); } -tablesSet().catch(console.error); +tablesUpsert().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesDeleteSample.ts new file mode 100644 index 000000000000..fb5c84a61b35 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesDeleteSample.ts @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to Delete a Log Analytics workspace table. + * + * @summary Delete a Log Analytics workspace table. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesDelete.json + */ +async function tablesGet() { + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const resourceGroupName = "oiautorest6685"; + const workspaceName = "oiautorest6685"; + const tableName = "table1_CL"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.tables.beginDeleteAndWait( + resourceGroupName, + workspaceName, + tableName + ); + console.log(result); +} + +tablesGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesGetSample.ts similarity index 90% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesGetSample.ts index cd44de8a9ebf..c016f7563503 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesGetSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesGetSample.ts @@ -15,13 +15,13 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets a Log Analytics workspace table. * * @summary Gets a Log Analytics workspace table. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesGet.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesGet.json */ async function tablesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const resourceGroupName = "oiautorest6685"; const workspaceName = "oiautorest6685"; - const tableName = "table1"; + const tableName = "table1_SRCH"; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient( credential, diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesListByWorkspaceSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesListByWorkspaceSample.ts similarity index 93% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesListByWorkspaceSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesListByWorkspaceSample.ts index 5765486183dd..e7367bf733ed 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesListByWorkspaceSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesListByWorkspaceSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets all the tables for the specified Log Analytics workspace. * * @summary Gets all the tables for the specified Log Analytics workspace. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesList.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesList.json */ async function tablesListByWorkspace() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesMigrateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesMigrateSample.ts new file mode 100644 index 000000000000..8080072e290f --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesMigrateSample.ts @@ -0,0 +1,38 @@ +/* + * 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. + */ + +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. +import { OperationalInsightsManagementClient } from "@azure/arm-operationalinsights"; +import { DefaultAzureCredential } from "@azure/identity"; + +/** + * This sample demonstrates how to 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. + * + * @summary 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. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesMigrate.json + */ +async function tablesGet() { + const subscriptionId = "00000000-0000-0000-0000-00000000000"; + const resourceGroupName = "oiautorest6685"; + const workspaceName = "oiautorest6685"; + const tableName = "table1_CL"; + const credential = new DefaultAzureCredential(); + const client = new OperationalInsightsManagementClient( + credential, + subscriptionId + ); + const result = await client.tables.migrate( + resourceGroupName, + workspaceName, + tableName + ); + console.log(result); +} + +tablesGet().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesUpdateSample.ts similarity index 64% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesUpdateSample.ts index 971f57bf6fb1..bdeabfca9348 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/tablesUpdateSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/tablesUpdateSample.ts @@ -15,26 +15,30 @@ import { import { DefaultAzureCredential } from "@azure/identity"; /** - * This sample demonstrates how to Updates a Log Analytics workspace table properties. + * This sample demonstrates how to Update a Log Analytics workspace table. * - * @summary Updates a Log Analytics workspace table properties. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/TablesUpdate.json + * @summary Update a Log Analytics workspace table. + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/TablesUpsert.json */ -async function tablesSet() { +async function tablesUpsert() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; const resourceGroupName = "oiautorest6685"; const workspaceName = "oiautorest6685"; - const tableName = "table1"; + const tableName = "AzureNetworkFlow"; const parameters: Table = { - isTroubleshootEnabled: true, - retentionInDays: 40 + schema: { + name: "AzureNetworkFlow", + columns: [{ name: "MyNewColumn", type: "guid" }] + }, + retentionInDays: 45, + totalRetentionInDays: 70 }; const credential = new DefaultAzureCredential(); const client = new OperationalInsightsManagementClient( credential, subscriptionId ); - const result = await client.tables.update( + const result = await client.tables.beginUpdateAndWait( resourceGroupName, workspaceName, tableName, @@ -43,4 +47,4 @@ async function tablesSet() { console.log(result); } -tablesSet().catch(console.error); +tablesUpsert().catch(console.error); diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/usagesListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/usagesListSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/usagesListSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/usagesListSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacePurgeGetPurgeStatusSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacePurgeGetPurgeStatusSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacePurgeGetPurgeStatusSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacePurgeGetPurgeStatusSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacePurgeSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacePurgeSample.ts similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacePurgeSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacePurgeSample.ts diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesCreateOrUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesCreateOrUpdateSample.ts similarity index 93% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesCreateOrUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesCreateOrUpdateSample.ts index e1c9e9172f9b..107467293900 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesCreateOrUpdateSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesCreateOrUpdateSample.ts @@ -18,7 +18,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Create or update a workspace. * * @summary Create or update a workspace. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesCreate.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesCreate.json */ async function workspacesCreate() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesDeleteSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesDeleteSample.ts similarity index 94% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesDeleteSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesDeleteSample.ts index d94c4fc706f9..d47575d31f17 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesDeleteSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesDeleteSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. * * @summary Deletes a workspace resource. To recover the workspace, create it again with the same name, in the same subscription, resource group and location. The name is kept for 14 days and cannot be used for another workspace. To remove the workspace completely and release the name, use the force flag. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesDelete.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesDelete.json */ async function workspacesDelete() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesGetSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesGetSample.ts similarity index 92% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesGetSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesGetSample.ts index 7e31472aadff..da0eb2477a37 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesGetSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesGetSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets a workspace instance. * * @summary Gets a workspace instance. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesGet.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesGet.json */ async function workspaceGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesListByResourceGroupSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesListByResourceGroupSample.ts similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesListByResourceGroupSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesListByResourceGroupSample.ts index 7542eb86b947..f5167bb170bc 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesListByResourceGroupSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesListByResourceGroupSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets workspaces in a resource group. * * @summary Gets workspaces in a resource group. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesListByResourceGroup.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesListByResourceGroup.json */ async function workspacesGet() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesListSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesListSample.ts similarity index 91% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesListSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesListSample.ts index 16976deabd04..fa17a566fbac 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesListSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesListSample.ts @@ -15,7 +15,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Gets the workspaces in a subscription. * * @summary Gets the workspaces in a subscription. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesSubscriptionList.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesSubscriptionList.json */ async function workspacesSubscriptionList() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesUpdateSample.ts b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesUpdateSample.ts similarity index 92% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesUpdateSample.ts rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesUpdateSample.ts index 4f9884a0b17d..201ea5c207c7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/src/workspacesUpdateSample.ts +++ b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/src/workspacesUpdateSample.ts @@ -18,7 +18,7 @@ import { DefaultAzureCredential } from "@azure/identity"; * This sample demonstrates how to Updates a workspace. * * @summary Updates a workspace. - * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/stable/2021-06-01/examples/WorkspacesUpdate.json + * x-ms-original-file: specification/operationalinsights/resource-manager/Microsoft.OperationalInsights/preview/2021-12-01-preview/examples/WorkspacesUpdate.json */ async function workspacesPatch() { const subscriptionId = "00000000-0000-0000-0000-00000000000"; diff --git a/sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/tsconfig.json b/sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/tsconfig.json similarity index 100% rename from sdk/operationalinsights/arm-operationalinsights/samples/v8/typescript/tsconfig.json rename to sdk/operationalinsights/arm-operationalinsights/samples/v9-beta/typescript/tsconfig.json diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts index 1c2538c724e2..fd5f2d4146b1 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,14 +704,220 @@ 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 & {}; +export type ProxyResource = Resource; /** The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' */ export type TrackedResource = 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,187 @@ 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"; +export type DataSourceType = + | "CustomLogs" + | "AzureWatson" + | "Query" + | "Ingestion" + | "Alerts"; /** Defines values for Capacity. */ export type Capacity = 500 | 1000 | 2000 | 5000; /** Defines values for CapacityReservationLevel. */ @@ -1230,6 +1781,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 +2176,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 +2244,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 +2323,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..62692715f906 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" } } } } } @@ -1739,7 +2482,13 @@ export const LinkedStorageAccountsResource: coreClient.CompositeMapper = { readOnly: true, type: { name: "Enum", - allowedValues: ["CustomLogs", "AzureWatson", "Query", "Alerts"] + allowedValues: [ + "CustomLogs", + "AzureWatson", + "Query", + "Ingestion", + "Alerts" + ] } }, storageAccountIds: { @@ -1889,31 +2638,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 +2826,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 +2841,7 @@ export const Workspace: coreClient.CompositeMapper = { }, provisioningState: { serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -2118,6 +2927,12 @@ export const Workspace: coreClient.CompositeMapper = { name: "Composite", className: "WorkspaceFeatures" } + }, + defaultDataCollectionRuleResourceId: { + serializedName: "properties.defaultDataCollectionRuleResourceId", + type: { + name: "String" + } } } } @@ -2138,6 +2953,7 @@ export const WorkspacePatch: coreClient.CompositeMapper = { }, provisioningState: { serializedName: "properties.provisioningState", + readOnly: true, type: { name: "String" } @@ -2223,6 +3039,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..97b25e79d380 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: { @@ -239,7 +327,13 @@ export const dataSourceType: OperationURLParameter = { required: true, type: { name: "Enum", - allowedValues: ["CustomLogs", "AzureWatson", "Query", "Alerts"] + allowedValues: [ + "CustomLogs", + "AzureWatson", + "Query", + "Ingestion", + "Alerts" + ] } } }; @@ -325,18 +419,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 +432,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 +463,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 +495,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 baaffadbef26..3da7e40616cb 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts @@ -10,6 +10,8 @@ import * as coreClient from "@azure/core-client"; import * as coreRestPipeline from "@azure/core-rest-pipeline"; import * as coreAuth from "@azure/core-auth"; import { + QueryPacksImpl, + QueriesImpl, DataExportsImpl, DataSourcesImpl, IntelligencePacksImpl, @@ -23,15 +25,17 @@ import { SavedSearchesImpl, AvailableServiceTiersImpl, GatewaysImpl, - SchemaImpl, + SchemaOperationsImpl, WorkspacePurgeImpl, - OperationsImpl, - TablesImpl, ClustersImpl, + OperationsImpl, WorkspacesImpl, - DeletedWorkspacesImpl + DeletedWorkspacesImpl, + TablesImpl } from "./operations"; import { + QueryPacks, + Queries, DataExports, DataSources, IntelligencePacks, @@ -45,13 +49,13 @@ import { SavedSearches, AvailableServiceTiers, Gateways, - Schema, + SchemaOperations, WorkspacePurge, - Operations, - Tables, Clusters, + Operations, Workspaces, - DeletedWorkspaces + DeletedWorkspaces, + Tables } from "./operationsInterfaces"; import { OperationalInsightsManagementClientOptionalParams } from "./models"; @@ -86,7 +90,7 @@ export class OperationalInsightsManagementClient extends coreClient.ServiceClien credential: credentials }; - const packageDetails = `azsdk-js-arm-operationalinsights/8.0.2`; + const packageDetails = `azsdk-js-arm-operationalinsights/9.0.0-beta.1`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` @@ -133,6 +137,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); @@ -146,15 +152,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; @@ -168,11 +176,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 6f95fed516b6..69f48358a565 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/clusters.ts @@ -544,7 +544,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - requestBody: Parameters.parameters7, + requestBody: Parameters.parameters6, queryParameters: [Parameters.apiVersion2], urlParameters: [ Parameters.$host, @@ -622,7 +622,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 618900bb735b..c9c33d3621e2 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedServices.ts @@ -352,7 +352,7 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = { } }, requestBody: Parameters.parameters2, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -382,7 +382,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.LinkedService } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -402,7 +402,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.LinkedService } }, - queryParameters: [Parameters.apiVersion], + queryParameters: [Parameters.apiVersion1], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -422,7 +422,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..51fff5f9e23c 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,196 @@ 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 + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * 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 ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; } /** - * 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 +329,114 @@ 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 + ); + const poller = new LroEngine(lro, { + resumeFrom: options?.resumeFrom, + intervalInMs: options?.updateIntervalInMs, + lroResourceLocationConfig: "azure-async-operation" + }); + await poller.poll(); + return poller; + } + + /** + * 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 +453,7 @@ const listByWorkspaceOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -200,20 +463,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 +497,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 +543,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 bb45ef571e2c..d9120eb901eb 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspaces.ts @@ -376,7 +376,7 @@ const listOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3], urlParameters: [Parameters.$host, Parameters.subscriptionId], headerParameters: [Parameters.accept], serializer @@ -393,7 +393,7 @@ const listByResourceGroupOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -423,8 +423,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, @@ -448,7 +448,7 @@ const deleteOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2, Parameters.force], + queryParameters: [Parameters.apiVersion3, Parameters.force], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -470,7 +470,7 @@ const getOperationSpec: coreClient.OperationSpec = { bodyMapper: Mappers.ErrorResponse } }, - queryParameters: [Parameters.apiVersion2], + queryParameters: [Parameters.apiVersion3], urlParameters: [ Parameters.$host, Parameters.subscriptionId, @@ -492,8 +492,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/test/sampleTest.ts b/sdk/operationalinsights/arm-operationalinsights/test/sampleTest.ts index 7ed89b043e1b..25aeb3ebcc36 100644 --- a/sdk/operationalinsights/arm-operationalinsights/test/sampleTest.ts +++ b/sdk/operationalinsights/arm-operationalinsights/test/sampleTest.ts @@ -7,35 +7,30 @@ */ import { - env, - record, - RecorderEnvironmentSetup, - Recorder + Recorder, + RecorderStartOptions, + env } from "@azure-tools/test-recorder"; -import * as assert from "assert"; +import { assert } from "chai"; +import { Context } from "mocha"; -const recorderEnvSetup: RecorderEnvironmentSetup = { - replaceableVariables: { - AZURE_CLIENT_ID: "azure_client_id", - AZURE_CLIENT_SECRET: "azure_client_secret", - AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", - SUBSCRIPTION_ID: "azure_subscription_id" - }, - customizationsOnRecordings: [ - (recording: any): any => - recording.replace( - /"access_token":"[^"]*"/g, - `"access_token":"access_token"` - ) - ], - queryParametersToSkip: [] +const replaceableVariables: Record = { + AZURE_CLIENT_ID: "azure_client_id", + AZURE_CLIENT_SECRET: "azure_client_secret", + AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888", + SUBSCRIPTION_ID: "azure_subscription_id" +}; + +const recorderOptions: RecorderStartOptions = { + envSetupForPlayback: replaceableVariables }; describe("My test", () => { let recorder: Recorder; - beforeEach(async function() { - recorder = record(this, recorderEnvSetup); + beforeEach(async function(this: Context) { + recorder = new Recorder(this.currentTest); + await recorder.start(recorderOptions); }); afterEach(async function() {