From 5c8dfb6a585ad77eaa702207c13f456826810ab9 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 6 Nov 2018 15:45:19 -0800 Subject: [PATCH 1/2] [AutoPR sql/resource-manager] Update Vulnerability Assessment swaggers (#4019) * Generated from 63e4176e8577c1abaf1a1496628dc432c7fa5479 Update Vulnerability Assessment swaggers Update Vulnerability Assessment swaggers * Generated from 63e4176e8577c1abaf1a1496628dc432c7fa5479 Update Vulnerability Assessment swaggers Update Vulnerability Assessment swaggers --- .../databaseVulnerabilityAssessmentScans.js | 252 +++++++++--------- .../sqlManagement2/lib/operations/index.d.ts | 74 ++--- 2 files changed, 163 insertions(+), 163 deletions(-) diff --git a/lib/services/sqlManagement2/lib/operations/databaseVulnerabilityAssessmentScans.js b/lib/services/sqlManagement2/lib/operations/databaseVulnerabilityAssessmentScans.js index 24a77e7780..2cc20e1b1e 100644 --- a/lib/services/sqlManagement2/lib/operations/databaseVulnerabilityAssessmentScans.js +++ b/lib/services/sqlManagement2/lib/operations/databaseVulnerabilityAssessmentScans.js @@ -15,7 +15,7 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -25,9 +25,6 @@ const WebResource = msRest.WebResource; * * @param {string} databaseName The name of the database. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -40,14 +37,14 @@ const WebResource = msRest.WebResource; * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VulnerabilityAssessmentScanRecord} for more - * information. + * See {@link VulnerabilityAssessmentScanRecordListResult} + * for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _get(resourceGroupName, serverName, databaseName, scanId, options, callback) { +function _listByDatabase(resourceGroupName, serverName, databaseName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -70,9 +67,6 @@ function _get(resourceGroupName, serverName, databaseName, scanId, options, call if (databaseName === null || databaseName === undefined || typeof databaseName.valueOf() !== 'string') { throw new Error('databaseName cannot be null or undefined and it must be of type string.'); } - if (scanId === null || scanId === undefined || typeof scanId.valueOf() !== 'string') { - throw new Error('scanId cannot be null or undefined and it must be of type string.'); - } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -85,12 +79,11 @@ function _get(resourceGroupName, serverName, databaseName, scanId, options, call // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{serverName}', encodeURIComponent(serverName)); requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); requestUrl = requestUrl.replace('{vulnerabilityAssessmentName}', encodeURIComponent(vulnerabilityAssessmentName)); - requestUrl = requestUrl.replace('{scanId}', encodeURIComponent(scanId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -160,7 +153,7 @@ function _get(resourceGroupName, serverName, databaseName, scanId, options, call parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['VulnerabilityAssessmentScanRecord']().mapper(); + let resultMapper = new client.models['VulnerabilityAssessmentScanRecordListResult']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -175,9 +168,8 @@ function _get(resourceGroupName, serverName, databaseName, scanId, options, call }); } - /** - * Executes a Vulnerability Assessment database scan. + * Gets a vulnerability assessment scan record of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -201,81 +193,15 @@ function _get(resourceGroupName, serverName, databaseName, scanId, options, call * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. - * - * {object} [request] - The HTTP Request object if an error did not occur. - * - * {stream} [response] - The HTTP Response stream if an error did not occur. - */ -function _initiateScan(resourceGroupName, serverName, databaseName, scanId, options, callback) { - /* jshint validthis: true */ - let client = this.client; - if(!callback && typeof options === 'function') { - callback = options; - options = null; - } - - if (!callback) { - throw new Error('callback cannot be null.'); - } - - // Send request - this.beginInitiateScan(resourceGroupName, serverName, databaseName, scanId, options, (err, parsedResult, httpRequest, response) => { - if (err) return callback(err); - - let initialResult = new msRest.HttpOperationResponse(); - initialResult.request = httpRequest; - initialResult.response = response; - initialResult.body = response.body; - client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { - if (err) return callback(err); - - // Create Result - let result = null; - - httpRequest = pollingResult.request; - response = pollingResult.response; - let responseBody = pollingResult.body; - if (responseBody === '') responseBody = null; - - // Deserialize Response - - return callback(null, result, httpRequest, response); - }); - }); -} - -/** - * Lists the vulnerability assessment scans of a database. - * - * @param {string} resourceGroupName The name of the resource group that - * contains the resource. You can obtain this value from the Azure Resource - * Manager API or the portal. - * - * @param {string} serverName The name of the server. - * - * @param {string} databaseName The name of the database. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} callback - The callback. - * - * @returns {function} callback(err, result, request, response) - * - * {Error} err - The Error object if an error occurred, null otherwise. - * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VulnerabilityAssessmentScanRecordListResult} - * for more information. + * See {@link VulnerabilityAssessmentScanRecord} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByDatabase(resourceGroupName, serverName, databaseName, options, callback) { +function _get(resourceGroupName, serverName, databaseName, scanId, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -298,6 +224,9 @@ function _listByDatabase(resourceGroupName, serverName, databaseName, options, c if (databaseName === null || databaseName === undefined || typeof databaseName.valueOf() !== 'string') { throw new Error('databaseName cannot be null or undefined and it must be of type string.'); } + if (scanId === null || scanId === undefined || typeof scanId.valueOf() !== 'string') { + throw new Error('scanId cannot be null or undefined and it must be of type string.'); + } if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } @@ -310,11 +239,12 @@ function _listByDatabase(resourceGroupName, serverName, databaseName, options, c // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{serverName}', encodeURIComponent(serverName)); requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); requestUrl = requestUrl.replace('{vulnerabilityAssessmentName}', encodeURIComponent(vulnerabilityAssessmentName)); + requestUrl = requestUrl.replace('{scanId}', encodeURIComponent(scanId)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); @@ -384,7 +314,7 @@ function _listByDatabase(resourceGroupName, serverName, databaseName, options, c parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['VulnerabilityAssessmentScanRecordListResult']().mapper(); + let resultMapper = new client.models['VulnerabilityAssessmentScanRecord']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -399,6 +329,76 @@ function _listByDatabase(resourceGroupName, serverName, databaseName, options, c }); } + +/** + * Executes a Vulnerability Assessment database scan. + * + * @param {string} resourceGroupName The name of the resource group that + * contains the resource. You can obtain this value from the Azure Resource + * Manager API or the portal. + * + * @param {string} serverName The name of the server. + * + * @param {string} databaseName The name of the database. + * + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _initiateScan(resourceGroupName, serverName, databaseName, scanId, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginInitiateScan(resourceGroupName, serverName, databaseName, scanId, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + /** * Convert an existing scan result to a human readable format. If already * exists nothing happens @@ -855,16 +855,16 @@ class DatabaseVulnerabilityAssessmentScans { */ constructor(client) { this.client = client; + this._listByDatabase = _listByDatabase; this._get = _get; this._initiateScan = _initiateScan; - this._listByDatabase = _listByDatabase; this._exportMethod = _exportMethod; this._beginInitiateScan = _beginInitiateScan; this._listByDatabaseNext = _listByDatabaseNext; } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -874,9 +874,6 @@ class DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -884,15 +881,15 @@ class DatabaseVulnerabilityAssessmentScans { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getWithHttpOperationResponse(resourceGroupName, serverName, databaseName, scanId, options) { + listByDatabaseWithHttpOperationResponse(resourceGroupName, serverName, databaseName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._get(resourceGroupName, serverName, databaseName, scanId, options, (err, result, request, response) => { + self._listByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -903,7 +900,7 @@ class DatabaseVulnerabilityAssessmentScans { } /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -913,9 +910,6 @@ class DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -928,7 +922,7 @@ class DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned * - * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -937,14 +931,14 @@ class DatabaseVulnerabilityAssessmentScans { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VulnerabilityAssessmentScanRecord} for more - * information. + * See {@link VulnerabilityAssessmentScanRecordListResult} + * for more information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName, serverName, databaseName, scanId, options, optionalCallback) { + listByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -953,19 +947,19 @@ class DatabaseVulnerabilityAssessmentScans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._get(resourceGroupName, serverName, databaseName, scanId, options, (err, result, request, response) => { + self._listByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._get(resourceGroupName, serverName, databaseName, scanId, options, optionalCallback); + return self._listByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback); } } /** - * Executes a Vulnerability Assessment database scan. + * Gets a vulnerability assessment scan record of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -985,15 +979,15 @@ class DatabaseVulnerabilityAssessmentScans { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - initiateScanWithHttpOperationResponse(resourceGroupName, serverName, databaseName, scanId, options) { + getWithHttpOperationResponse(resourceGroupName, serverName, databaseName, scanId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._initiateScan(resourceGroupName, serverName, databaseName, scanId, options, (err, result, request, response) => { + self._get(resourceGroupName, serverName, databaseName, scanId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1004,7 +998,7 @@ class DatabaseVulnerabilityAssessmentScans { } /** - * Executes a Vulnerability Assessment database scan. + * Gets a vulnerability assessment scan record of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -1029,7 +1023,7 @@ class DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned * - * @resolve {null} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1037,13 +1031,15 @@ class DatabaseVulnerabilityAssessmentScans { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VulnerabilityAssessmentScanRecord} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - initiateScan(resourceGroupName, serverName, databaseName, scanId, options, optionalCallback) { + get(resourceGroupName, serverName, databaseName, scanId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1052,19 +1048,19 @@ class DatabaseVulnerabilityAssessmentScans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._initiateScan(resourceGroupName, serverName, databaseName, scanId, options, (err, result, request, response) => { + self._get(resourceGroupName, serverName, databaseName, scanId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._initiateScan(resourceGroupName, serverName, databaseName, scanId, options, optionalCallback); + return self._get(resourceGroupName, serverName, databaseName, scanId, options, optionalCallback); } } /** - * Lists the vulnerability assessment scans of a database. + * Executes a Vulnerability Assessment database scan. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -1074,6 +1070,9 @@ class DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1081,15 +1080,15 @@ class DatabaseVulnerabilityAssessmentScans { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - listByDatabaseWithHttpOperationResponse(resourceGroupName, serverName, databaseName, options) { + initiateScanWithHttpOperationResponse(resourceGroupName, serverName, databaseName, scanId, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { + self._initiateScan(resourceGroupName, serverName, databaseName, scanId, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1100,7 +1099,7 @@ class DatabaseVulnerabilityAssessmentScans { } /** - * Lists the vulnerability assessment scans of a database. + * Executes a Vulnerability Assessment database scan. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -1110,6 +1109,9 @@ class DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1122,7 +1124,7 @@ class DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned * - * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error} - The error object. * @@ -1130,15 +1132,13 @@ class DatabaseVulnerabilityAssessmentScans { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VulnerabilityAssessmentScanRecordListResult} - * for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback) { + initiateScan(resourceGroupName, serverName, databaseName, scanId, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1147,14 +1147,14 @@ class DatabaseVulnerabilityAssessmentScans { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { + self._initiateScan(resourceGroupName, serverName, databaseName, scanId, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback); + return self._initiateScan(resourceGroupName, serverName, databaseName, scanId, options, optionalCallback); } } diff --git a/lib/services/sqlManagement2/lib/operations/index.d.ts b/lib/services/sqlManagement2/lib/operations/index.d.ts index 9f0e185afb..d7629e6fe0 100644 --- a/lib/services/sqlManagement2/lib/operations/index.d.ts +++ b/lib/services/sqlManagement2/lib/operations/index.d.ts @@ -27391,7 +27391,7 @@ export interface DatabaseVulnerabilityAssessmentScans { /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -27401,9 +27401,6 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -27411,14 +27408,14 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a vulnerability assessment scan record of a database. + * Lists the vulnerability assessment scans of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -27428,9 +27425,6 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -27443,7 +27437,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27451,21 +27445,21 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VulnerabilityAssessmentScanRecord} [result] - The deserialized result object if an error did not occur. - * See {@link VulnerabilityAssessmentScanRecord} for more - * information. + * {VulnerabilityAssessmentScanRecordListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VulnerabilityAssessmentScanRecordListResult} + * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: ServiceCallback): void; + listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Executes a Vulnerability Assessment database scan. + * Gets a vulnerability assessment scan record of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -27485,14 +27479,14 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - initiateScanWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Executes a Vulnerability Assessment database scan. + * Gets a vulnerability assessment scan record of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -27517,7 +27511,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27525,19 +27519,21 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {VulnerabilityAssessmentScanRecord} [result] - The deserialized result object if an error did not occur. + * See {@link VulnerabilityAssessmentScanRecord} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; - initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the vulnerability assessment scans of a database. + * Executes a Vulnerability Assessment database scan. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -27547,6 +27543,9 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -27554,14 +27553,14 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + initiateScanWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment scans of a database. + * Executes a Vulnerability Assessment database scan. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -27571,6 +27570,9 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -27583,7 +27585,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27591,17 +27593,15 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VulnerabilityAssessmentScanRecordListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VulnerabilityAssessmentScanRecordListResult} - * for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: ServiceCallback): void; - listByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; + initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** From 9e15a6cec5c0f930d33b73a3e8c05b40e53ee423 Mon Sep 17 00:00:00 2001 From: Dan Schulte Date: Thu, 8 Nov 2018 09:24:04 -0800 Subject: [PATCH 2/2] Update azure-arm-sql to 5.5.0 --- lib/services/sqlManagement2/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/sqlManagement2/package.json b/lib/services/sqlManagement2/package.json index 9b83514ac4..729c9a03ef 100644 --- a/lib/services/sqlManagement2/package.json +++ b/lib/services/sqlManagement2/package.json @@ -2,7 +2,7 @@ "name": "azure-arm-sql", "author": "Microsoft Corporation", "description": "SqlManagementClient Library with typescript type definitions for node", - "version": "5.4.0", + "version": "5.5.0", "dependencies": { "ms-rest": "^2.3.3", "ms-rest-azure": "^2.5.5" @@ -22,4 +22,4 @@ "bugs": { "url": "https://github.com/azure/azure-sdk-for-node/issues" } -} \ No newline at end of file +}