diff --git a/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt b/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt index a70e8cf66038..ea8fb1516028 100644 --- a/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt +++ b/sdk/operationalinsights/arm-operationalinsights/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2020 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/sdk/operationalinsights/arm-operationalinsights/README.md b/sdk/operationalinsights/arm-operationalinsights/README.md index 798fcfba4dea..3d18829769b4 100644 --- a/sdk/operationalinsights/arm-operationalinsights/README.md +++ b/sdk/operationalinsights/arm-operationalinsights/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for OperationalInsightsManagementClient. ### How to Install -``` +```bash npm install @azure/arm-operationalinsights ``` @@ -19,13 +19,14 @@ npm install @azure/arm-operationalinsights ##### Install @azure/ms-rest-nodeauth -``` -npm install @azure/ms-rest-nodeauth +- Please install minimum version of `"@azure/ms-rest-nodeauth": "^3.0.0"`. +```bash +npm install @azure/ms-rest-nodeauth@"^3.0.0" ``` ##### Sample code -```ts +```typescript import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; @@ -50,7 +51,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -101,5 +102,4 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to - [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Foperationalinsights%2Farm-operationalinsights%2FREADME.png) +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js/sdk/operationalinsights/arm-operationalinsights/README.png) diff --git a/sdk/operationalinsights/arm-operationalinsights/package.json b/sdk/operationalinsights/arm-operationalinsights/package.json index afde6a376e01..1c5af5f394c8 100644 --- a/sdk/operationalinsights/arm-operationalinsights/package.json +++ b/sdk/operationalinsights/arm-operationalinsights/package.json @@ -4,9 +4,9 @@ "description": "OperationalInsightsManagementClient Library with typescript type definitions for node.js and browser.", "version": "1.2.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", - "tslib": "^1.9.3" + "@azure/ms-rest-azure-js": "^2.0.1", + "@azure/ms-rest-js": "^2.0.4", + "tslib": "^1.10.0" }, "keywords": [ "node", @@ -20,18 +20,19 @@ "module": "./esm/operationalInsightsManagementClient.js", "types": "./esm/operationalInsightsManagementClient.d.ts", "devDependencies": { - "typescript": "^3.1.1", - "rollup": "^0.66.2", - "rollup-plugin-node-resolve": "^3.4.0", - "uglify-js": "^3.4.9" + "typescript": "^3.5.3", + "rollup": "^1.18.0", + "rollup-plugin-node-resolve": "^5.2.0", + "rollup-plugin-sourcemaps": "^0.4.2", + "uglify-js": "^3.6.0" }, - "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/operationalinsights/arm-operationalinsights", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/operationalinsights/arm-operationalinsights", "repository": { "type": "git", - "url": "https://github.com/azure/azure-sdk-for-js.git" + "url": "https://github.com/Azure/azure-sdk-for-js.git" }, "bugs": { - "url": "https://github.com/azure/azure-sdk-for-js/issues" + "url": "https://github.com/Azure/azure-sdk-for-js/issues" }, "files": [ "dist/**/*.js", @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], diff --git a/sdk/operationalinsights/arm-operationalinsights/rollup.config.js b/sdk/operationalinsights/arm-operationalinsights/rollup.config.js index d21129e749d0..8675ec4b06f7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/rollup.config.js +++ b/sdk/operationalinsights/arm-operationalinsights/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/operationalInsightsManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/operationalInsightsManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-operationalinsights.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ mainFields: ['module', 'main'] }), + sourcemaps() ] }; + export default config; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts index aee58af1b707..1c13b474ebb2 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts @@ -1,21 +1,18 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - DataSource, BaseResource, CloudError, + DataSource, DataSourceListResult, LinkedService, - Workspace, + Resource, Sku, - Resource + Workspace } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts index f0b2fa91cae0..7780ac89e095 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,412 +11,367 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; +/** + * The top level Linked service resource container. + */ +export interface LinkedService extends BaseResource { + /** + * The resource id of the resource that will be linked to the workspace. + */ + resourceId: string; +} + +/** + * Common properties of proxy resource. + */ +export interface ProxyResource { + /** + * Resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly id?: string; + /** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly name?: string; + /** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly type?: string; + /** + * Resource tags + */ + tags?: { [propertyName: string]: string }; +} /** - * @interface - * An interface representing OperationDisplay. * Display metadata associated with the operation. - * */ export interface OperationDisplay { /** - * @member {string} [provider] Service provider: Microsoft - * OperationsManagement. + * Service provider: Microsoft OperationsManagement. */ provider?: string; /** - * @member {string} [resource] Resource on which the operation is performed - * etc. + * Resource on which the operation is performed etc. */ resource?: string; /** - * @member {string} [operation] Type of operation: get, read, delete, etc. + * Type of operation: get, read, delete, etc. */ operation?: string; } /** - * @interface - * An interface representing Operation. * Supported operation of OperationalInsights resource provider. - * */ export interface Operation { /** - * @member {string} [name] Operation name: {provider}/{resource}/{operation} + * Operation name: {provider}/{resource}/{operation} */ name?: string; /** - * @member {OperationDisplay} [display] Display metadata associated with the - * operation. + * Display metadata associated with the operation. */ display?: OperationDisplay; } /** - * @interface - * An interface representing LinkedService. - * The top level Linked service resource container. - * - * @extends BaseResource - */ -export interface LinkedService extends BaseResource { - /** - * @member {string} resourceId The resource id of the resource that will be - * linked to the workspace. - */ - resourceId: string; -} - -/** - * @interface - * An interface representing DataSource. * Datasources under OMS Workspace. - * - * @extends BaseResource */ export interface DataSource extends BaseResource { /** - * @member {any} properties The data source properties in raw json format, - * each kind of data source have it's own schema. + * The data source properties in raw json format, each kind of data source have it's own schema. */ properties: any; /** - * @member {string} [eTag] The ETag of the data source. + * The ETag of the data source. */ eTag?: string; /** - * @member {DataSourceKind} kind Possible values include: 'AzureActivityLog', - * 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - * 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - * 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - * 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + * Possible values include: 'AzureActivityLog', 'ChangeTrackingPath', + * 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + * 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', + * 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', + * 'WindowsPerformanceCounter' */ kind: DataSourceKind; } /** - * @interface - * An interface representing DataSourceFilter. * DataSource filter. Right now, only filter by kind is supported. - * */ export interface DataSourceFilter { /** - * @member {DataSourceKind} [kind] Possible values include: - * 'AzureActivityLog', 'ChangeTrackingPath', 'ChangeTrackingDefaultPath', - * 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', - * 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', - * 'LinuxPerformanceObject', 'LinuxPerformanceCollection', 'LinuxSyslog', - * 'LinuxSyslogCollection', 'WindowsEvent', 'WindowsPerformanceCounter' + * Possible values include: 'AzureActivityLog', 'ChangeTrackingPath', + * 'ChangeTrackingDefaultPath', 'ChangeTrackingDefaultRegistry', 'ChangeTrackingCustomRegistry', + * 'CustomLog', 'CustomLogCollection', 'GenericDataSource', 'IISLogs', 'LinuxPerformanceObject', + * 'LinuxPerformanceCollection', 'LinuxSyslog', 'LinuxSyslogCollection', 'WindowsEvent', + * 'WindowsPerformanceCounter' */ kind?: DataSourceKind; } /** - * @interface - * An interface representing IntelligencePack. - * Intelligence Pack containing a string name and boolean indicating if it's - * enabled. - * + * Intelligence Pack containing a string name and boolean indicating if it's enabled. */ export interface IntelligencePack { /** - * @member {string} [name] The name of the intelligence pack. + * The name of the intelligence pack. */ name?: string; /** - * @member {boolean} [enabled] The enabled boolean for the intelligence pack. + * The enabled boolean for the intelligence pack. */ enabled?: boolean; /** - * @member {string} [displayName] The display name of the intelligence pack. + * The display name of the intelligence pack. */ displayName?: string; } /** - * @interface - * An interface representing SharedKeys. * The shared keys for a workspace. - * */ export interface SharedKeys { /** - * @member {string} [primarySharedKey] The primary shared key of a workspace. + * The primary shared key of a workspace. */ primarySharedKey?: string; /** - * @member {string} [secondarySharedKey] The secondary shared key of a - * workspace. + * The secondary shared key of a workspace. */ secondarySharedKey?: string; } /** - * @interface - * An interface representing MetricName. * The name of a metric. - * */ export interface MetricName { /** - * @member {string} [value] The system name of the metric. + * The system name of the metric. */ value?: string; /** - * @member {string} [localizedValue] The localized name of the metric. + * The localized name of the metric. */ localizedValue?: string; } /** - * @interface - * An interface representing UsageMetric. * A metric describing the usage of a resource. - * */ export interface UsageMetric { /** - * @member {MetricName} [name] The name of the metric. + * The name of the metric. */ name?: MetricName; /** - * @member {string} [unit] The units used for the metric. + * The units used for the metric. */ unit?: string; /** - * @member {number} [currentValue] The current value of the metric. + * The current value of the metric. */ currentValue?: number; /** - * @member {number} [limit] The quota limit for the metric. + * The quota limit for the metric. */ limit?: number; /** - * @member {Date} [nextResetTime] The time that the metric's value will - * reset. + * The time that the metric's value will reset. */ nextResetTime?: Date; /** - * @member {string} [quotaPeriod] The quota period that determines the length - * of time between value resets. + * The quota period that determines the length of time between value resets. */ quotaPeriod?: string; } /** - * @interface - * An interface representing ManagementGroup. * A management group that is connected to a workspace - * */ export interface ManagementGroup { /** - * @member {number} [serverCount] The number of servers connected to the - * management group. + * The number of servers connected to the management group. */ serverCount?: number; /** - * @member {boolean} [isGateway] Gets or sets a value indicating whether the - * management group is a gateway. + * Gets or sets a value indicating whether the management group is a gateway. */ isGateway?: boolean; /** - * @member {string} [name] The name of the management group. + * The name of the management group. */ name?: string; /** - * @member {string} [id] The unique ID of the management group. + * The unique ID of the management group. */ id?: string; /** - * @member {Date} [created] The datetime that the management group was - * created. + * The datetime that the management group was created. */ created?: Date; /** - * @member {Date} [dataReceived] The last datetime that the management group - * received data. + * The last datetime that the management group received data. */ dataReceived?: Date; /** - * @member {string} [version] The version of System Center that is managing - * the management group. + * The version of System Center that is managing the management group. */ version?: string; /** - * @member {string} [sku] The SKU of System Center that is managing the - * management group. + * The SKU of System Center that is managing the management group. */ sku?: string; } /** - * @interface - * An interface representing Sku. * The SKU (tier) of a workspace. - * */ export interface Sku { /** - * @member {SkuNameEnum} name The name of the SKU. Possible values include: - * 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - * 'Standalone' + * The name of the SKU. Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', + * 'PerGB2018', 'Standalone', 'CapacityReservation' */ name: SkuNameEnum; } /** - * @interface - * An interface representing Workspace. * The top level Workspace resource container. - * - * @extends BaseResource */ export interface Workspace extends BaseResource { /** - * @member {EntityStatus} [provisioningState] The provisioning state of the - * workspace. Possible values include: 'Creating', 'Succeeded', 'Failed', - * 'Canceled', 'Deleting', 'ProvisioningAccount' + * The provisioning state of the workspace. Possible values include: 'Creating', 'Succeeded', + * 'Failed', 'Canceled', 'Deleting', 'ProvisioningAccount' */ provisioningState?: EntityStatus; /** - * @member {string} [source] The source of the workspace. Source defines - * where the workspace was created. 'Azure' implies it was created in Azure. - * 'External' implies it was created via the Operational Insights Portal. - * This value is set on the service side and read-only on the client side. + * This is a read-only legacy property. It is always set to 'Azure' by the service. Kept here for + * backward compatibility. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - source?: string; + readonly source?: string; /** - * @member {string} [customerId] The ID associated with the workspace. - * Setting this value at creation time allows the workspace being created to - * be linked to an existing workspace. + * 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.** */ - customerId?: string; + readonly customerId?: string; /** - * @member {string} [portalUrl] The URL of the Operational Insights portal - * for this workspace. This value is set on the service side and read-only - * on the client side. + * This is a legacy property and is not used anymore. Kept here for backward compatibility. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ - portalUrl?: string; + readonly portalUrl?: string; /** - * @member {Sku} [sku] The SKU of the workspace. + * The SKU of the workspace. */ sku?: Sku; /** - * @member {number} [retentionInDays] The workspace data retention in days. - * -1 means Unlimited retention for the Unlimited Sku. 730 days is the - * maximum allowed for all other Skus. + * The workspace data retention in days. -1 means Unlimited retention for the Unlimited Sku. 730 + * days is the maximum allowed for all other Skus. */ retentionInDays?: number; /** - * @member {string} [eTag] The ETag of the workspace. + * The ETag of the workspace. */ eTag?: string; } /** - * @interface - * An interface representing Resource. * The resource definition. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Resource Id - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource Id + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Resource name - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Resource type - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [location] Resource location + * Resource location */ location?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * Resource tags */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing ProxyResource. - * Common properties of proxy resource. - * + * Describes the format of Error response. */ -export interface ProxyResource { +export interface ErrorResponse { /** - * @member {string} [id] Resource ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error code */ - readonly id?: string; + code?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error message indicating why the operation failed. */ - readonly name?: string; + message?: string; +} + +/** + * The status of operation. + */ +export interface OperationStatus { /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The operation Id. */ - readonly type?: string; + id?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags + * The operation name. */ - tags?: { [propertyName: string]: string }; + name?: string; + /** + * The start time of the operation. + */ + startTime?: string; + /** + * The end time of the operation. + */ + endTime?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The error detail of the operation if any. + */ + error?: ErrorResponse; } /** - * @interface - * An interface representing DataSourcesListByWorkspaceOptionalParams. * Optional Parameters. - * - * @extends RequestOptionsBase */ export interface DataSourcesListByWorkspaceOptionalParams extends msRest.RequestOptionsBase { /** - * @member {string} [skiptoken] Starting point of the collection of data - * source instances. + * Starting point of the collection of data source instances. */ skiptoken?: string; } /** - * @interface * An interface representing OperationalInsightsManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface OperationalInsightsManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @interface - * An interface representing the LinkedServiceListResult. * The list linked service operation response. - * * @extends Array */ export interface LinkedServiceListResult extends Array { @@ -426,24 +379,19 @@ export interface LinkedServiceListResult extends Array { /** * @interface - * An interface representing the DataSourceListResult. * The list data source by workspace operation response. - * * @extends Array */ export interface DataSourceListResult extends Array { /** - * @member {string} [nextLink] The link (url) to the next page of - * datasources. + * The link (url) to the next page of datasources. */ nextLink?: string; } /** * @interface - * An interface representing the WorkspaceListUsagesResult. * The list workspace usages operation response. - * * @extends Array */ export interface WorkspaceListUsagesResult extends Array { @@ -451,9 +399,7 @@ export interface WorkspaceListUsagesResult extends Array { /** * @interface - * An interface representing the WorkspaceListManagementGroupsResult. - * The list workspace managmement groups operation response. - * + * The list workspace management groups operation response. * @extends Array */ export interface WorkspaceListManagementGroupsResult extends Array { @@ -461,9 +407,7 @@ export interface WorkspaceListManagementGroupsResult extends Array */ export interface WorkspaceListResult extends Array { @@ -471,17 +415,13 @@ export interface WorkspaceListResult extends Array { /** * @interface - * An interface representing the OperationListResult. * Result of the request to list solution operations. - * * @extends Array */ export interface OperationListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of operation list - * results if there are any. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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; } @@ -500,12 +440,12 @@ export type DataSourceKind = 'AzureActivityLog' | 'ChangeTrackingPath' | 'Change /** * Defines values for SkuNameEnum. - * Possible values include: 'Free', 'Standard', 'Premium', 'Unlimited', 'PerNode', 'PerGB2018', - * 'Standalone' + * Possible values include: 'Free', 'Standard', 'Premium', 'PerNode', 'PerGB2018', 'Standalone', + * 'CapacityReservation' * @readonly * @enum {string} */ -export type SkuNameEnum = 'Free' | 'Standard' | 'Premium' | 'Unlimited' | 'PerNode' | 'PerGB2018' | 'Standalone'; +export type SkuNameEnum = 'Free' | 'Standard' | 'Premium' | 'PerNode' | 'PerGB2018' | 'Standalone' | 'CapacityReservation'; /** * Defines values for EntityStatus. @@ -528,6 +468,7 @@ export type LinkedServicesCreateOrUpdateResponse = LinkedService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -547,6 +488,7 @@ export type LinkedServicesGetResponse = LinkedService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -566,6 +508,7 @@ export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -585,6 +528,7 @@ export type DataSourcesCreateOrUpdateResponse = DataSource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -604,6 +548,7 @@ export type DataSourcesGetResponse = DataSource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -623,6 +568,7 @@ export type DataSourcesListByWorkspaceResponse = DataSourceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -642,6 +588,7 @@ export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -661,6 +608,7 @@ export type WorkspacesListIntelligencePacksResponse = Array & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -680,6 +628,7 @@ export type WorkspacesGetSharedKeysResponse = SharedKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -699,6 +648,7 @@ export type WorkspacesListUsagesResponse = WorkspaceListUsagesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -718,6 +668,7 @@ export type WorkspacesListManagementGroupsResponse = WorkspaceListManagementGrou * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -737,6 +688,7 @@ export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -756,6 +708,7 @@ export type WorkspacesListResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -775,6 +728,7 @@ export type WorkspacesCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -794,6 +748,7 @@ export type WorkspacesGetResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -813,6 +768,7 @@ export type WorkspacesUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -832,6 +788,7 @@ export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -851,6 +808,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -870,9 +828,30 @@ export type OperationsListNextResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ parsedBody: OperationListResult; }; }; + +/** + * Contains response data for the getAsyncOperationsStatus operation. + */ +export type GetAsyncOperationsStatusResponse = OperationStatus & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + + /** + * The response body as parsed JSON or XML + */ + parsedBody: OperationStatus; + }; +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts index 3dc8e75684e0..94f4e3d950cb 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts @@ -1,21 +1,18 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - LinkedService, BaseResource, CloudError, - LinkedServiceListResult, DataSource, - Workspace, + LinkedService, + LinkedServiceListResult, + Resource, Sku, - Resource + Workspace } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts index 8ecc014974bd..862e98834ac7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -14,6 +12,65 @@ import * as msRest from "@azure/ms-rest-js"; export const CloudError = CloudErrorMapper; export const BaseResource = BaseResourceMapper; +export const LinkedService: msRest.CompositeMapper = { + serializedName: "LinkedService", + type: { + name: "Composite", + className: "LinkedService", + modelProperties: { + resourceId: { + required: true, + serializedName: "properties.resourceId", + type: { + name: "String" + } + } + } + } +}; + +export const ProxyResource: msRest.CompositeMapper = { + serializedName: "ProxyResource", + type: { + name: "Composite", + className: "ProxyResource", + modelProperties: { + id: { + readOnly: true, + serializedName: "id", + type: { + name: "String" + } + }, + name: { + readOnly: true, + serializedName: "name", + type: { + name: "String" + } + }, + type: { + readOnly: true, + serializedName: "type", + type: { + name: "String" + } + }, + tags: { + serializedName: "tags", + type: { + name: "Dictionary", + value: { + type: { + name: "String" + } + } + } + } + } + } +}; + export const OperationDisplay: msRest.CompositeMapper = { serializedName: "Operation_display", type: { @@ -65,23 +122,6 @@ export const Operation: msRest.CompositeMapper = { } }; -export const LinkedService: msRest.CompositeMapper = { - serializedName: "LinkedService", - type: { - name: "Composite", - className: "LinkedService", - modelProperties: { - resourceId: { - required: true, - serializedName: "properties.resourceId", - type: { - name: "String" - } - } - } - } -}; - export const DataSource: msRest.CompositeMapper = { serializedName: "DataSource", type: { @@ -335,18 +375,21 @@ export const Workspace: msRest.CompositeMapper = { } }, source: { + readOnly: true, serializedName: "properties.source", type: { name: "String" } }, customerId: { + readOnly: true, serializedName: "properties.customerId", type: { name: "String" } }, portalUrl: { + readOnly: true, serializedName: "properties.portalUrl", type: { name: "String" @@ -427,42 +470,69 @@ export const Resource: msRest.CompositeMapper = { } }; -export const ProxyResource: msRest.CompositeMapper = { - serializedName: "ProxyResource", +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", type: { name: "Composite", - className: "ProxyResource", + className: "ErrorResponse", + modelProperties: { + code: { + serializedName: "code", + type: { + name: "String" + } + }, + message: { + serializedName: "message", + type: { + name: "String" + } + } + } + } +}; + +export const OperationStatus: msRest.CompositeMapper = { + serializedName: "OperationStatus", + type: { + name: "Composite", + className: "OperationStatus", modelProperties: { id: { - readOnly: true, serializedName: "id", type: { name: "String" } }, name: { - readOnly: true, serializedName: "name", type: { name: "String" } }, - type: { - readOnly: true, - serializedName: "type", + startTime: { + serializedName: "startTime", type: { name: "String" } }, - tags: { - serializedName: "tags", + endTime: { + serializedName: "endTime", type: { - name: "Dictionary", - value: { - type: { - name: "String" - } - } + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" } } } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts index 2edcc577920e..689688180be7 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/operationsMappers.ts @@ -1,17 +1,14 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { - OperationListResult, + CloudError, Operation, OperationDisplay, - CloudError + OperationListResult } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts index b0f08de703a7..96f08594517b 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts @@ -30,6 +30,16 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const asyncOperationId: msRest.OperationURLParameter = { + parameterPath: "asyncOperationId", + mapper: { + required: true, + serializedName: "asyncOperationId", + type: { + name: "String" + } + } +}; export const dataSourceName: msRest.OperationURLParameter = { parameterPath: "dataSourceName", mapper: { @@ -70,6 +80,16 @@ export const linkedServiceName: msRest.OperationURLParameter = { } } }; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts index 1d18205a1490..d796529ead79 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts @@ -1,28 +1,25 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Licensed under the MIT License. See License.txt in the project root for license information. * * Code generated by Microsoft (R) AutoRest Code Generator. - * Changes may cause incorrect behavior and will be lost if the code is - * regenerated. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ export { + BaseResource, CloudError, + DataSource, IntelligencePack, + LinkedService, + ManagementGroup, + MetricName, + Resource, SharedKeys, - WorkspaceListUsagesResult, + Sku, UsageMetric, - MetricName, + Workspace, WorkspaceListManagementGroupsResult, - ManagementGroup, WorkspaceListResult, - Workspace, - BaseResource, - Sku, - LinkedService, - DataSource, - Resource + WorkspaceListUsagesResult } from "../models/mappers"; - diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts index b06840df7055..8ac26a417c28 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClient.ts @@ -11,6 +11,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; +import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { OperationalInsightsManagementClientContext } from "./operationalInsightsManagementClientContext"; @@ -36,9 +37,66 @@ class OperationalInsightsManagementClient extends OperationalInsightsManagementC this.workspaces = new operations.Workspaces(this); this.operations = new operations.Operations(this); } + + /** + * Get the status of an azure asynchronous operation. + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param [options] The optional parameters + * @returns Promise + */ + getAsyncOperationsStatus(location: string, asyncOperationId: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param callback The callback + */ + getAsyncOperationsStatus(location: string, asyncOperationId: string, callback: msRest.ServiceCallback): void; + /** + * @param location The region name of operation. + * @param asyncOperationId The operation Id. + * @param options The optional parameters + * @param callback The callback + */ + getAsyncOperationsStatus(location: string, asyncOperationId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + getAsyncOperationsStatus(location: string, asyncOperationId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.sendOperationRequest( + { + location, + asyncOperationId, + options + }, + getAsyncOperationsStatusOperationSpec, + callback) as Promise; + } } // Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getAsyncOperationsStatusOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.OperationalInsights/locations/{location}/operationStatuses/{asyncOperationId}", + urlParameters: [ + Parameters.location, + Parameters.asyncOperationId, + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.OperationStatus + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; export { OperationalInsightsManagementClient, diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts index b7e62e1ece9f..600ca4f4919b 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-operationalinsights"; -const packageVersion = "0.1.0"; +const packageVersion = "1.2.0"; export class OperationalInsightsManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json index 87bbf5b5fa49..422b584abd5e 100644 --- a/sdk/operationalinsights/arm-operationalinsights/tsconfig.json +++ b/sdk/operationalinsights/arm-operationalinsights/tsconfig.json @@ -9,7 +9,7 @@ "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, - "lib": ["es6"], + "lib": ["es6", "dom"], "declaration": true, "outDir": "./esm", "importHelpers": true