Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release arm operationalinsights #9682

Closed
wants to merge 2 commits into from
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 @@ -2,7 +2,7 @@
"name": "@azure/arm-operationalinsights",
"author": "Microsoft Corporation",
"description": "OperationalInsightsManagementClient Library with typescript type definitions for node.js and browser.",
"version": "2.0.0",
"version": "3.0.0",
"dependencies": {
"@azure/ms-rest-azure-js": "^2.0.1",
"@azure/ms-rest-js": "^2.0.4",
Expand Down
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 @@ -793,7 +793,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 @@ -1477,26 +1477,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 @@ -1271,8 +1271,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 @@ -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 = "2.0.0";
const packageVersion = "3.0.0";

export class OperationalInsightsManagementClientContext extends msRestAzure.AzureServiceClient {
credentials: msRest.ServiceClientCredentials;
Expand All @@ -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> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a long running operation has been converted to a normal operation. Are we sure that this was intentional?

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 @@ -140,7 +140,8 @@ const purgeOperationSpec: msRest.OperationSpec = {
headersMapper: Mappers.WorkspacePurgePurgeHeaders
},
default: {
bodyMapper: Mappers.CloudError
bodyMapper: Mappers.CloudError,
headersMapper: Mappers.WorkspacePurgePurgeHeaders
}
},
serializer
Expand Down