Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,8 +284,8 @@ export const DataSource: msRest.CompositeMapper = {
name: "Object"
}
},
eTag: {
serializedName: "eTag",
etag: {
serializedName: "etag",
type: {
name: "String"
}
Expand Down Expand Up @@ -410,7 +410,10 @@ export const LinkedStorageAccountsResource: msRest.CompositeMapper = {
name: "Enum",
allowedValues: [
"CustomLogs",
"AzureWatson"
"AzureWatson",
"Query",
"Ingestion",
"Alerts"
]
}
},
Expand Down Expand Up @@ -1271,8 +1274,8 @@ export const SavedSearch: msRest.CompositeMapper = {
className: "SavedSearch",
modelProperties: {
...ProxyResource.type.modelProperties,
eTag: {
serializedName: "eTag",
etag: {
serializedName: "etag",
type: {
name: "String"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ export const dataSourceType: msRest.OperationURLParameter = {
name: "Enum",
allowedValues: [
"CustomLogs",
"AzureWatson"
"AzureWatson",
"Query",
"Ingestion",
"Alerts"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
}
Expand All @@ -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;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -68,9 +67,35 @@ export class DataExports {
* @param [options] The optional parameters
* @returns Promise<Models.DataExportsCreateOrUpdateResponse>
*/
createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise<Models.DataExportsCreateOrUpdateResponse> {
return this.beginCreateOrUpdate(resourceGroupName,workspaceName,dataExportName,parameters,options)
.then(lroPoller => lroPoller.pollUntilFinished()) as Promise<Models.DataExportsCreateOrUpdateResponse>;
createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise<Models.DataExportsCreateOrUpdateResponse>;
/**
* @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<Models.DataExport>): 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<Models.DataExport>): void;
createOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.DataExport>, callback?: msRest.ServiceCallback<Models.DataExport>): Promise<Models.DataExportsCreateOrUpdateResponse> {
return this.client.sendOperationRequest(
{
resourceGroupName,
workspaceName,
dataExportName,
parameters,
options
},
createOrUpdateOperationSpec,
callback) as Promise<Models.DataExportsCreateOrUpdateResponse>;
}

/**
Expand Down Expand Up @@ -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<msRestAzure.LROPoller>
*/
beginCreateOrUpdate(resourceGroupName: string, workspaceName: string, dataExportName: string, parameters: Models.DataExport, options?: msRest.RequestOptionsBase): Promise<msRestAzure.LROPoller> {
return this.client.sendLRORequest(
{
resourceGroupName,
workspaceName,
dataExportName,
parameters,
options
},
beginCreateOrUpdateOperationSpec,
options);
}
}

// Operation Specifications
Expand Down Expand Up @@ -195,35 +198,44 @@ 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
],
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
}
},
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,
Expand All @@ -238,44 +250,34 @@ const deleteMethodOperationSpec: msRest.OperationSpec = {
Parameters.acceptLanguage
],
responses: {
200: {},
404: {},
200: {
bodyMapper: Mappers.DataExport
},
default: {
bodyMapper: Mappers.DataExportErrorResponse
}
},
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
],
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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Models.LinkedStorageAccountsCreateOrUpdateResponse>
Expand All @@ -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
*/
Expand All @@ -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
Expand All @@ -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<msRest.RestResponse>
*/
Expand All @@ -85,15 +85,15 @@ 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>): void;
/**
* @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
*/
Expand All @@ -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<Models.LinkedStorageAccountsGetResponse>
*/
Expand All @@ -125,15 +125,15 @@ 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<Models.LinkedStorageAccountsResource>): void;
/**
* @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
*/
Expand Down
Loading