diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts index 69e1c27dd2f8..7b4c9e48cf5b 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/index.ts @@ -180,7 +180,7 @@ export interface DataSource extends ProxyResource { /** * The ETag of the data source. */ - eTag?: string; + etag?: string; /** * Possible values include: 'WindowsEvent', 'WindowsPerformanceCounter', 'IISLogs', * 'LinuxSyslog', 'LinuxSyslogCollection', 'LinuxPerformanceObject', @@ -269,7 +269,8 @@ export interface LinkedService extends ProxyResource { */ export interface LinkedStorageAccountsResource extends ProxyResource { /** - * Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson' + * Linked storage accounts type. Possible values include: 'CustomLogs', 'AzureWatson', 'Query', + * 'Ingestion', 'Alerts' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly dataSourceType?: DataSourceType; @@ -793,7 +794,7 @@ export interface SavedSearch extends ProxyResource { /** * The ETag of the saved search. */ - eTag?: string; + etag?: string; /** * The category of the saved search. This helps the user to find a saved search faster. */ @@ -1318,11 +1319,11 @@ export type LinkedServiceEntityStatus = 'Succeeded' | 'Deleting' | 'Provisioning /** * Defines values for DataSourceType. - * Possible values include: 'CustomLogs', 'AzureWatson' + * Possible values include: 'CustomLogs', 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @readonly * @enum {string} */ -export type DataSourceType = 'CustomLogs' | 'AzureWatson'; +export type DataSourceType = 'CustomLogs' | 'AzureWatson' | 'Query' | 'Ingestion' | 'Alerts'; /** * Defines values for WorkspaceSkuNameEnum. @@ -1477,26 +1478,6 @@ export type DataExportsGetResponse = DataExport & { }; }; -/** - * Contains response data for the beginCreateOrUpdate operation. - */ -export type DataExportsBeginCreateOrUpdateResponse = DataExport & { - /** - * 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: DataExport; - }; -}; - /** * Contains response data for the createOrUpdate operation. */ diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts index 5fed2c074d98..4c9c0f4976b0 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/mappers.ts @@ -284,8 +284,8 @@ export const DataSource: msRest.CompositeMapper = { name: "Object" } }, - eTag: { - serializedName: "eTag", + etag: { + serializedName: "etag", type: { name: "String" } @@ -410,7 +410,10 @@ export const LinkedStorageAccountsResource: msRest.CompositeMapper = { name: "Enum", allowedValues: [ "CustomLogs", - "AzureWatson" + "AzureWatson", + "Query", + "Ingestion", + "Alerts" ] } }, @@ -1271,8 +1274,8 @@ export const SavedSearch: msRest.CompositeMapper = { className: "SavedSearch", modelProperties: { ...ProxyResource.type.modelProperties, - eTag: { - serializedName: "eTag", + etag: { + serializedName: "etag", type: { name: "String" } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts index 200a64a58ac4..b83e4641490d 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/models/parameters.ts @@ -112,7 +112,10 @@ export const dataSourceType: msRest.OperationURLParameter = { name: "Enum", allowedValues: [ "CustomLogs", - "AzureWatson" + "AzureWatson", + "Query", + "Ingestion", + "Alerts" ] } } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts index 891ad39f05bc..590d65dd9fa8 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operationalInsightsManagementClientContext.ts @@ -37,7 +37,7 @@ export class OperationalInsightsManagementClientContext extends msRestAzure.Azur if (!options) { options = {}; } - if (!options.userAgent) { + if(!options.userAgent) { const defaultUserAgent = msRestAzure.getDefaultUserAgentValue(); options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`; } @@ -52,10 +52,10 @@ export class OperationalInsightsManagementClientContext extends msRestAzure.Azur this.credentials = credentials; this.subscriptionId = subscriptionId; - if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) { + if(options.acceptLanguage !== null && options.acceptLanguage !== undefined) { this.acceptLanguage = options.acceptLanguage; } - if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { + if(options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) { this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout; } } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts index e12a5d11fbe9..013143c585be 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/dataExports.ts @@ -9,7 +9,6 @@ */ 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/dataExportsMappers"; import * as Parameters from "../models/parameters"; @@ -68,9 +67,35 @@ export class DataExports { * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise { - return this.beginCreateOrUpdate(resourceGroupName,workspaceName,dataExportName,parameters,options) - .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, callback: msRest.ServiceCallback): void; + /** + * @param resourceGroupName The name of the resource group. The name is case insensitive. + * @param workspaceName The name of the workspace. + * @param dataExportName The data export rule name. + * @param parameters The parameters required to create or update a data export. + * @param options The optional parameters + * @param callback The callback + */ + createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + resourceGroupName, + workspaceName, + dataExportName, + parameters, + options + }, + createOrUpdateOperationSpec, + callback) as Promise; } /** @@ -144,28 +169,6 @@ export class DataExports { deleteMethodOperationSpec, callback); } - - /** - * Create or update a data export. - * @param resourceGroupName The name of the resource group. The name is case insensitive. - * @param workspaceName The name of the workspace. - * @param dataExportName The data export rule name. - * @param parameters The parameters required to create or update a data export. - * @param [options] The optional parameters - * @returns Promise - */ - beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise { - return this.client.sendLRORequest( - { - resourceGroupName, - workspaceName, - dataExportName, - parameters, - options - }, - beginCreateOrUpdateOperationSpec, - options); - } } // Operation Specifications @@ -195,14 +198,14 @@ const listByWorkspaceOperationSpec: msRest.OperationSpec = { serializer }; -const getOperationSpec: msRest.OperationSpec = { - httpMethod: "GET", +const createOrUpdateOperationSpec: msRest.OperationSpec = { + httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.workspaceName, - Parameters.dataExportName1 + Parameters.dataExportName0 ], queryParameters: [ Parameters.apiVersion @@ -210,11 +213,20 @@ const getOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], + requestBody: { + parameterPath: "parameters", + mapper: { + ...Mappers.DataExport, + required: true + } + }, responses: { 200: { bodyMapper: Mappers.DataExport }, - 404: {}, + 201: { + bodyMapper: Mappers.DataExport + }, default: { bodyMapper: Mappers.DataExportErrorResponse } @@ -222,8 +234,8 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const deleteMethodOperationSpec: msRest.OperationSpec = { - httpMethod: "DELETE", +const getOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", urlParameters: [ Parameters.subscriptionId, @@ -238,8 +250,9 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { Parameters.acceptLanguage ], responses: { - 200: {}, - 404: {}, + 200: { + bodyMapper: Mappers.DataExport + }, default: { bodyMapper: Mappers.DataExportErrorResponse } @@ -247,14 +260,14 @@ const deleteMethodOperationSpec: msRest.OperationSpec = { serializer }; -const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { - httpMethod: "PUT", +const deleteMethodOperationSpec: msRest.OperationSpec = { + httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{workspaceName}/dataExports/{dataExportName}", urlParameters: [ Parameters.subscriptionId, Parameters.resourceGroupName, Parameters.workspaceName, - Parameters.dataExportName0 + Parameters.dataExportName1 ], queryParameters: [ Parameters.apiVersion @@ -262,20 +275,9 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { headerParameters: [ Parameters.acceptLanguage ], - requestBody: { - parameterPath: "parameters", - mapper: { - ...Mappers.DataExport, - required: true - } - }, responses: { - 200: { - bodyMapper: Mappers.DataExport - }, - 201: { - bodyMapper: Mappers.DataExport - }, + 200: {}, + 404: {}, default: { bodyMapper: Mappers.DataExportErrorResponse } diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts index 0c3a6e5e4332..bf092d4f3220 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/linkedStorageAccounts.ts @@ -32,7 +32,7 @@ export class LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', - * 'AzureWatson' + * 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param parameters The parameters required to create or update linked storage accounts. * @param [options] The optional parameters * @returns Promise @@ -42,7 +42,7 @@ export class LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', - * 'AzureWatson' + * 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param parameters The parameters required to create or update linked storage accounts. * @param callback The callback */ @@ -51,7 +51,7 @@ export class LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', - * 'AzureWatson' + * 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param parameters The parameters required to create or update linked storage accounts. * @param options The optional parameters * @param callback The callback @@ -76,7 +76,7 @@ export class LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', - * 'AzureWatson' + * 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param [options] The optional parameters * @returns Promise */ @@ -85,7 +85,7 @@ export class LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', - * 'AzureWatson' + * 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param callback The callback */ deleteMethod(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, callback: msRest.ServiceCallback): void; @@ -93,7 +93,7 @@ export class LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', - * 'AzureWatson' + * 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param options The optional parameters * @param callback The callback */ @@ -116,7 +116,7 @@ export class LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', - * 'AzureWatson' + * 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param [options] The optional parameters * @returns Promise */ @@ -125,7 +125,7 @@ export class LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', - * 'AzureWatson' + * 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param callback The callback */ get(resourceGroupName: string, workspaceName: string, dataSourceType: Models.DataSourceType, callback: msRest.ServiceCallback): void; @@ -133,7 +133,7 @@ export class LinkedStorageAccounts { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param workspaceName The name of the workspace. * @param dataSourceType Linked storage accounts type. Possible values include: 'CustomLogs', - * 'AzureWatson' + * 'AzureWatson', 'Query', 'Ingestion', 'Alerts' * @param options The optional parameters * @param callback The callback */ diff --git a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts index 7d0f2a9ecce8..497567377f50 100644 --- a/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts +++ b/sdk/operationalinsights/arm-operationalinsights/src/operations/workspacePurge.ts @@ -140,7 +140,8 @@ const purgeOperationSpec: msRest.OperationSpec = { headersMapper: Mappers.WorkspacePurgePurgeHeaders }, default: { - bodyMapper: Mappers.CloudError + bodyMapper: Mappers.CloudError, + headersMapper: Mappers.WorkspacePurgePurgeHeaders } }, serializer