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 edc87b3967b5..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" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } 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..fb2b9ba00a16 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/dataSourcesMappers.ts @@ -1,21 +1,21 @@ /* * 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, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkServiceConnectionStateProperty, + 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..1f03f309ff05 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,431 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @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. + * 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. - * */ export interface ProxyResource { /** - * @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 {{ [propertyName: string]: string }} [tags] Resource tags + * Resource tags */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing DataSourcesListByWorkspaceOptionalParams. + * A private link resource + */ +export interface PrivateLinkResource extends ProxyResource { + /** + * The private link resource group id. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly groupId?: string; + /** + * The private link resource required member names. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly requiredMembers?: string[]; +} + +/** + * Private endpoint which the connection belongs to. + */ +export interface PrivateEndpointProperty extends BaseResource { + /** + * Resource id of the private endpoint. + */ + id?: string; +} + +/** + * State of the private endpoint connection. + */ +export interface PrivateLinkServiceConnectionStateProperty { + /** + * The private link service connection status. + */ + status: string; + /** + * The private link service connection description. + */ + description: string; + /** + * The actions required for private link service connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly actionsRequired?: string; +} + +/** + * A private endpoint connection + */ +export interface PrivateEndpointConnection extends BaseResource { + /** + * Private endpoint which the connection belongs to. + */ + privateEndpoint?: PrivateEndpointProperty; + /** + * Connection state of the private endpoint connection. + */ + privateLinkServiceConnectionState?: PrivateLinkServiceConnectionStateProperty; + /** + * State of the private endpoint connection. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly provisioningState?: string; +} + +/** + * Describes the format of Error response. + */ +export interface ErrorResponse { + /** + * Error code + */ + code?: string; + /** + * Error message indicating why the operation failed. + */ + message?: string; +} + +/** + * The status of operation. + */ +export interface OperationStatus { + /** + * The operation Id. + */ + id?: string; + /** + * The operation name. + */ + name?: string; + /** + * The start time of the operation. + */ + startTime?: string; + /** + * The end time of the operation. + */ + endTime?: string; + /** + * The status of the operation. + */ + status?: string; + /** + * The error detail of the operation if any. + */ + error?: ErrorResponse; +} + +/** * 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 +443,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 +463,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 +471,7 @@ export interface WorkspaceListManagementGroupsResult extends Array */ export interface WorkspaceListResult extends Array { @@ -471,17 +479,39 @@ 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; +} + +/** + * @interface + * A list of private link resources + * @extends Array + */ +export interface PrivateLinkResourceListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly nextLink?: string; +} + +/** + * @interface + * A list of private endpoint connections. + * @extends Array + */ +export interface PrivateEndpointConnectionListResult extends Array { + /** + * Link to retrieve next page of results. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nextLink?: string; } @@ -500,12 +530,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 +558,7 @@ export type LinkedServicesCreateOrUpdateResponse = LinkedService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -547,6 +578,7 @@ export type LinkedServicesGetResponse = LinkedService & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -566,6 +598,7 @@ export type LinkedServicesListByWorkspaceResponse = LinkedServiceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -585,6 +618,7 @@ export type DataSourcesCreateOrUpdateResponse = DataSource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -604,6 +638,7 @@ export type DataSourcesGetResponse = DataSource & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -623,6 +658,7 @@ export type DataSourcesListByWorkspaceResponse = DataSourceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -642,6 +678,7 @@ export type DataSourcesListByWorkspaceNextResponse = DataSourceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -661,6 +698,7 @@ export type WorkspacesListIntelligencePacksResponse = Array & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -680,6 +718,7 @@ export type WorkspacesGetSharedKeysResponse = SharedKeys & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -699,6 +738,7 @@ export type WorkspacesListUsagesResponse = WorkspaceListUsagesResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -718,6 +758,7 @@ export type WorkspacesListManagementGroupsResponse = WorkspaceListManagementGrou * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -737,6 +778,7 @@ export type WorkspacesListByResourceGroupResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -756,6 +798,7 @@ export type WorkspacesListResponse = WorkspaceListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -775,6 +818,7 @@ export type WorkspacesCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -794,6 +838,7 @@ export type WorkspacesGetResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -813,6 +858,7 @@ export type WorkspacesUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -832,6 +878,7 @@ export type WorkspacesBeginCreateOrUpdateResponse = Workspace & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -851,6 +898,7 @@ export type OperationsListResponse = OperationListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -870,9 +918,190 @@ 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 listByWorkspace operation. + */ +export type PrivateLinkResourcesListByWorkspaceResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateLinkResourcesGetResponse = PrivateLinkResource & { + /** + * 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: PrivateLinkResource; + }; +}; + +/** + * Contains response data for the listByWorkspaceNext operation. + */ +export type PrivateLinkResourcesListByWorkspaceNextResponse = PrivateLinkResourceListResult & { + /** + * 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: PrivateLinkResourceListResult; + }; +}; + +/** + * Contains response data for the get operation. + */ +export type PrivateEndpointConnectionsGetResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the createOrUpdate operation. + */ +export type PrivateEndpointConnectionsCreateOrUpdateResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByWorkspace operation. + */ +export type PrivateEndpointConnectionsListByWorkspaceResponse = PrivateEndpointConnectionListResult & { + /** + * 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: PrivateEndpointConnectionListResult; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type PrivateEndpointConnectionsBeginCreateOrUpdateResponse = PrivateEndpointConnection & { + /** + * 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: PrivateEndpointConnection; + }; +}; + +/** + * Contains response data for the listByWorkspaceNext operation. + */ +export type PrivateEndpointConnectionsListByWorkspaceNextResponse = PrivateEndpointConnectionListResult & { + /** + * 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: PrivateEndpointConnectionListResult; + }; +}; + +/** + * 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..11343807a19c 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/linkedServicesMappers.ts @@ -1,21 +1,21 @@ /* * 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, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkServiceConnectionStateProperty, + 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..eadcc8e32de3 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"; @@ -335,18 +333,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" @@ -469,6 +470,183 @@ export const ProxyResource: msRest.CompositeMapper = { } }; +export const PrivateLinkResource: msRest.CompositeMapper = { + serializedName: "PrivateLinkResource", + type: { + name: "Composite", + className: "PrivateLinkResource", + modelProperties: { + ...ProxyResource.type.modelProperties, + groupId: { + readOnly: true, + serializedName: "properties.groupId", + type: { + name: "String" + } + }, + requiredMembers: { + readOnly: true, + serializedName: "properties.requiredMembers", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } + } + } + } +}; + +export const PrivateEndpointProperty: msRest.CompositeMapper = { + serializedName: "PrivateEndpointProperty", + type: { + name: "Composite", + className: "PrivateEndpointProperty", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateLinkServiceConnectionStateProperty: msRest.CompositeMapper = { + serializedName: "PrivateLinkServiceConnectionStateProperty", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty", + modelProperties: { + status: { + required: true, + serializedName: "status", + type: { + name: "String" + } + }, + description: { + required: true, + serializedName: "description", + type: { + name: "String" + } + }, + actionsRequired: { + readOnly: true, + serializedName: "actionsRequired", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnection: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnection", + type: { + name: "Composite", + className: "PrivateEndpointConnection", + modelProperties: { + privateEndpoint: { + serializedName: "properties.privateEndpoint", + type: { + name: "Composite", + className: "PrivateEndpointProperty" + } + }, + privateLinkServiceConnectionState: { + serializedName: "properties.privateLinkServiceConnectionState", + type: { + name: "Composite", + className: "PrivateLinkServiceConnectionStateProperty" + } + }, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + } + } + } +}; + +export const ErrorResponse: msRest.CompositeMapper = { + serializedName: "ErrorResponse", + type: { + name: "Composite", + 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: { + serializedName: "id", + type: { + name: "String" + } + }, + name: { + serializedName: "name", + type: { + name: "String" + } + }, + startTime: { + serializedName: "startTime", + type: { + name: "String" + } + }, + endTime: { + serializedName: "endTime", + type: { + name: "String" + } + }, + status: { + serializedName: "status", + type: { + name: "String" + } + }, + error: { + serializedName: "error", + type: { + name: "Composite", + className: "ErrorResponse" + } + } + } + } +}; + export const LinkedServiceListResult: msRest.CompositeMapper = { serializedName: "LinkedServiceListResult", type: { @@ -613,3 +791,63 @@ export const OperationListResult: msRest.CompositeMapper = { } } }; + +export const PrivateLinkResourceListResult: msRest.CompositeMapper = { + serializedName: "PrivateLinkResourceListResult", + type: { + name: "Composite", + className: "PrivateLinkResourceListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateLinkResource" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const PrivateEndpointConnectionListResult: msRest.CompositeMapper = { + serializedName: "PrivateEndpointConnectionListResult", + type: { + name: "Composite", + className: "PrivateEndpointConnectionListResult", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "PrivateEndpointConnection" + } + } + } + }, + nextLink: { + readOnly: true, + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; 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..fde1b9fb9dfb 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: { @@ -50,6 +60,16 @@ export const filter: msRest.OperationQueryParameter = { } } }; +export const groupName: msRest.OperationURLParameter = { + parameterPath: "groupName", + mapper: { + required: true, + serializedName: "groupName", + type: { + name: "String" + } + } +}; export const intelligencePackName: msRest.OperationURLParameter = { parameterPath: "intelligencePackName", mapper: { @@ -70,6 +90,16 @@ export const linkedServiceName: msRest.OperationURLParameter = { } } }; +export const location: msRest.OperationURLParameter = { + parameterPath: "location", + mapper: { + required: true, + serializedName: "location", + type: { + name: "String" + } + } +}; export const nextPageLink: msRest.OperationURLParameter = { parameterPath: "nextPageLink", mapper: { @@ -81,6 +111,16 @@ export const nextPageLink: msRest.OperationURLParameter = { }, skipEncoding: true }; +export const privateEndpointConnectionName: msRest.OperationURLParameter = { + parameterPath: "privateEndpointConnectionName", + mapper: { + required: true, + serializedName: "privateEndpointConnectionName", + type: { + name: "String" + } + } +}; export const resourceGroupName0: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/privateEndpointConnectionsMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/privateEndpointConnectionsMappers.ts new file mode 100644 index 000000000000..db8e406473d5 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/privateEndpointConnectionsMappers.ts @@ -0,0 +1,21 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + BaseResource, + CloudError, + DataSource, + LinkedService, + PrivateEndpointConnection, + PrivateEndpointConnectionListResult, + PrivateEndpointProperty, + PrivateLinkServiceConnectionStateProperty, + Resource, + Sku, + Workspace +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/privateLinkResourcesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/privateLinkResourcesMappers.ts new file mode 100644 index 000000000000..843fe9a3df4f --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/privateLinkResourcesMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + CloudError, + PrivateLinkResource, + PrivateLinkResourceListResult, + ProxyResource +} from "../models/mappers"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts index 1d18205a1490..98fcd6b22d75 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/workspacesMappers.ts @@ -1,28 +1,28 @@ /* * 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, + PrivateEndpointConnection, + PrivateEndpointProperty, + PrivateLinkServiceConnectionStateProperty, + 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..a8b0757b70ba 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"; @@ -21,6 +22,8 @@ class OperationalInsightsManagementClient extends OperationalInsightsManagementC dataSources: operations.DataSources; workspaces: operations.Workspaces; operations: operations.Operations; + privateLinkResources: operations.PrivateLinkResources; + privateEndpointConnections: operations.PrivateEndpointConnections; /** * Initializes a new instance of the OperationalInsightsManagementClient class. @@ -35,10 +38,69 @@ class OperationalInsightsManagementClient extends OperationalInsightsManagementC this.dataSources = new operations.DataSources(this); this.workspaces = new operations.Workspaces(this); this.operations = new operations.Operations(this); + this.privateLinkResources = new operations.PrivateLinkResources(this); + this.privateEndpointConnections = new operations.PrivateEndpointConnections(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/src/operations/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts index bcfdc7b26a31..1be143a608a9 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/index.ts @@ -12,3 +12,5 @@ export * from "./linkedServices"; export * from "./dataSources"; export * from "./workspaces"; export * from "./operations"; +export * from "./privateLinkResources"; +export * from "./privateEndpointConnections"; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/privateEndpointConnections.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/privateEndpointConnections.ts new file mode 100644 index 000000000000..8391c1672487 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/privateEndpointConnections.ts @@ -0,0 +1,328 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateEndpointConnectionsMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a PrivateEndpointConnections. */ +export class PrivateEndpointConnections { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a PrivateEndpointConnections. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets a private endpoint connection. + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,workspaceName,privateEndpointConnectionName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + deleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,workspaceName,privateEndpointConnectionName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + + /** + * Gets all private endpoint connections on a workspace. + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } + + /** + * Approve or reject a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param parameters + * @param [options] The optional parameters + * @returns Promise + */ + beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, parameters: Models.PrivateEndpointConnection, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + parameters, + options + }, + beginCreateOrUpdateOperationSpec, + options); + } + + /** + * Deletes a private endpoint connection with a given name. + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param privateEndpointConnectionName The name of the private endpoint connection. + * @param [options] The optional parameters + * @returns Promise + */ + beginDeleteMethod(resourceGroupName: string, workspaceName: string, privateEndpointConnectionName: string, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( + { + resourceGroupName, + workspaceName, + privateEndpointConnectionName, + options + }, + beginDeleteMethodOperationSpec, + options); + } + + /** + * Gets all private endpoint connections on a workspace. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByWorkspaceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.workspaceName0, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/privateEndpointConnections", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.workspaceName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.workspaceName0, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.PrivateEndpointConnection, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnection + }, + 202: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const beginDeleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/privateEndpointConnections/{privateEndpointConnectionName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.workspaceName0, + Parameters.privateEndpointConnectionName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: {}, + 202: {}, + 204: {}, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateEndpointConnectionListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/privateLinkResources.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/privateLinkResources.ts new file mode 100644 index 000000000000..5ed054e111c5 --- /dev/null +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/privateLinkResources.ts @@ -0,0 +1,198 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/privateLinkResourcesMappers"; +import * as Parameters from "../models/parameters"; +import { OperationalInsightsManagementClientContext } from "../operationalInsightsManagementClientContext"; + +/** Class representing a PrivateLinkResources. */ +export class PrivateLinkResources { + private readonly client: OperationalInsightsManagementClientContext; + + /** + * Create a PrivateLinkResources. + * @param {OperationalInsightsManagementClientContext} client Reference to the service client. + */ + constructor(client: OperationalInsightsManagementClientContext) { + this.client = client; + } + + /** + * Gets the private link resources that need to be created for a Log Analytics Workspace. + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspace(resourceGroupName: string, workspaceName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspace(resourceGroupName: string, workspaceName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + options + }, + listByWorkspaceOperationSpec, + callback) as Promise; + } + + /** + * Gets the private link resources that need to be created for a Log Analytics Workspace. + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param groupName The name of the private link resource. + * @param [options] The optional parameters + * @returns Promise + */ + get(resourceGroupName: string, workspaceName: string, groupName: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param groupName The name of the private link resource. + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, groupName: string, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group to get. The name is case insensitive. + * @param workspaceName Name of the Log Analytics Workspace that will contain the datasource + * @param groupName The name of the private link resource. + * @param options The optional parameters + * @param callback The callback + */ + get(resourceGroupName: string, workspaceName: string, groupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, workspaceName: string, groupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + groupName, + options + }, + getOperationSpec, + callback) as Promise; + } + + /** + * Gets the private link resources that need to be created for a Log Analytics Workspace. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listByWorkspaceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listByWorkspaceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listByWorkspaceNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listByWorkspaceOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/privateLinkResources", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.workspaceName0 + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/privateLinkResources/{groupName}", + urlParameters: [ + Parameters.subscriptionId, + Parameters.resourceGroupName0, + Parameters.workspaceName0, + Parameters.groupName + ], + queryParameters: [ + Parameters.apiVersion + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResource + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; + +const listByWorkspaceNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.PrivateLinkResourceListResult + }, + default: { + bodyMapper: Mappers.CloudError + } + }, + serializer +}; 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