diff --git a/lib/services/sqlManagement2/lib/models/databaseBlobAuditingPolicy.js b/lib/services/sqlManagement2/lib/models/databaseBlobAuditingPolicy.js index 7ebef40ed5..8aa7fdbf10 100644 --- a/lib/services/sqlManagement2/lib/models/databaseBlobAuditingPolicy.js +++ b/lib/services/sqlManagement2/lib/models/databaseBlobAuditingPolicy.js @@ -90,11 +90,11 @@ class DatabaseBlobAuditingPolicy extends models['ProxyResource'] { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a * table, view, or stored procedure, or an entire database or schema. For the - * latter cases, the forms DATABASE:: and SCHEMA:: are + * latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are * used, respectively. * * For example: @@ -117,10 +117,11 @@ class DatabaseBlobAuditingPolicy extends models['ProxyResource'] { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should * be also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) diff --git a/lib/services/sqlManagement2/lib/models/extendedDatabaseBlobAuditingPolicy.js b/lib/services/sqlManagement2/lib/models/extendedDatabaseBlobAuditingPolicy.js index a953b459ee..00bbe39ca9 100644 --- a/lib/services/sqlManagement2/lib/models/extendedDatabaseBlobAuditingPolicy.js +++ b/lib/services/sqlManagement2/lib/models/extendedDatabaseBlobAuditingPolicy.js @@ -91,11 +91,11 @@ class ExtendedDatabaseBlobAuditingPolicy extends models['ProxyResource'] { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a * table, view, or stored procedure, or an entire database or schema. For the - * latter cases, the forms DATABASE:: and SCHEMA:: are + * latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are * used, respectively. * * For example: @@ -118,10 +118,11 @@ class ExtendedDatabaseBlobAuditingPolicy extends models['ProxyResource'] { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should * be also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) diff --git a/lib/services/sqlManagement2/lib/models/extendedServerBlobAuditingPolicy.js b/lib/services/sqlManagement2/lib/models/extendedServerBlobAuditingPolicy.js index 52ce7668cf..c104d030a6 100644 --- a/lib/services/sqlManagement2/lib/models/extendedServerBlobAuditingPolicy.js +++ b/lib/services/sqlManagement2/lib/models/extendedServerBlobAuditingPolicy.js @@ -91,11 +91,11 @@ class ExtendedServerBlobAuditingPolicy extends models['ProxyResource'] { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a * table, view, or stored procedure, or an entire database or schema. For the - * latter cases, the forms DATABASE:: and SCHEMA:: are + * latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are * used, respectively. * * For example: @@ -118,10 +118,11 @@ class ExtendedServerBlobAuditingPolicy extends models['ProxyResource'] { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should * be also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) diff --git a/lib/services/sqlManagement2/lib/models/index.d.ts b/lib/services/sqlManagement2/lib/models/index.d.ts index f39672a466..b1601cde32 100644 --- a/lib/services/sqlManagement2/lib/models/index.d.ts +++ b/lib/services/sqlManagement2/lib/models/index.d.ts @@ -1946,11 +1946,11 @@ export interface VirtualNetworkRule extends ProxyResource { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -1973,10 +1973,11 @@ export interface VirtualNetworkRule extends ProxyResource { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -2072,11 +2073,11 @@ export interface ExtendedDatabaseBlobAuditingPolicy extends ProxyResource { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -2099,10 +2100,11 @@ export interface ExtendedDatabaseBlobAuditingPolicy extends ProxyResource { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -2196,11 +2198,11 @@ export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -2223,10 +2225,11 @@ export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -2320,11 +2323,11 @@ export interface ServerBlobAuditingPolicy extends ProxyResource { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -2347,10 +2350,11 @@ export interface ServerBlobAuditingPolicy extends ProxyResource { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) diff --git a/lib/services/sqlManagement2/lib/models/serverBlobAuditingPolicy.js b/lib/services/sqlManagement2/lib/models/serverBlobAuditingPolicy.js index 715f2ce262..0d7fce9d01 100644 --- a/lib/services/sqlManagement2/lib/models/serverBlobAuditingPolicy.js +++ b/lib/services/sqlManagement2/lib/models/serverBlobAuditingPolicy.js @@ -89,11 +89,11 @@ class ServerBlobAuditingPolicy extends models['ProxyResource'] { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a * table, view, or stored procedure, or an entire database or schema. For the - * latter cases, the forms DATABASE:: and SCHEMA:: are + * latter cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are * used, respectively. * * For example: @@ -116,10 +116,11 @@ class ServerBlobAuditingPolicy extends models['ProxyResource'] { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should * be also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) diff --git a/lib/services/sqlManagement2/lib/operations/databaseBlobAuditingPolicies.js b/lib/services/sqlManagement2/lib/operations/databaseBlobAuditingPolicies.js index ea3b28efa3..8ae8b90550 100644 --- a/lib/services/sqlManagement2/lib/operations/databaseBlobAuditingPolicies.js +++ b/lib/services/sqlManagement2/lib/operations/databaseBlobAuditingPolicies.js @@ -254,11 +254,11 @@ function _get(resourceGroupName, serverName, databaseName, options, callback) { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -284,10 +284,11 @@ function _get(resourceGroupName, serverName, databaseName, options, callback) { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -665,11 +666,11 @@ class DatabaseBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -695,10 +696,11 @@ class DatabaseBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -817,11 +819,11 @@ class DatabaseBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -847,10 +849,11 @@ class DatabaseBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) 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/extendedDatabaseBlobAuditingPolicies.js b/lib/services/sqlManagement2/lib/operations/extendedDatabaseBlobAuditingPolicies.js index 4ee490d6f6..730f5fe391 100644 --- a/lib/services/sqlManagement2/lib/operations/extendedDatabaseBlobAuditingPolicies.js +++ b/lib/services/sqlManagement2/lib/operations/extendedDatabaseBlobAuditingPolicies.js @@ -257,11 +257,11 @@ function _get(resourceGroupName, serverName, databaseName, options, callback) { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -287,10 +287,11 @@ function _get(resourceGroupName, serverName, databaseName, options, callback) { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -671,11 +672,11 @@ class ExtendedDatabaseBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -701,10 +702,11 @@ class ExtendedDatabaseBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -826,11 +828,11 @@ class ExtendedDatabaseBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -856,10 +858,11 @@ class ExtendedDatabaseBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) diff --git a/lib/services/sqlManagement2/lib/operations/extendedServerBlobAuditingPolicies.js b/lib/services/sqlManagement2/lib/operations/extendedServerBlobAuditingPolicies.js index 0d453363cc..c47b1a5300 100644 --- a/lib/services/sqlManagement2/lib/operations/extendedServerBlobAuditingPolicies.js +++ b/lib/services/sqlManagement2/lib/operations/extendedServerBlobAuditingPolicies.js @@ -250,11 +250,11 @@ function _get(resourceGroupName, serverName, options, callback) { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -280,10 +280,11 @@ function _get(resourceGroupName, serverName, options, callback) { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -449,11 +450,11 @@ function _createOrUpdate(resourceGroupName, serverName, parameters, options, cal * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -479,10 +480,11 @@ function _createOrUpdate(resourceGroupName, serverName, parameters, options, cal * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -837,11 +839,11 @@ class ExtendedServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -867,10 +869,11 @@ class ExtendedServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -990,11 +993,11 @@ class ExtendedServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -1020,10 +1023,11 @@ class ExtendedServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -1166,11 +1170,11 @@ class ExtendedServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -1196,10 +1200,11 @@ class ExtendedServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -1319,11 +1324,11 @@ class ExtendedServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -1349,10 +1354,11 @@ class ExtendedServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) diff --git a/lib/services/sqlManagement2/lib/operations/index.d.ts b/lib/services/sqlManagement2/lib/operations/index.d.ts index 6b48777e12..d7629e6fe0 100644 --- a/lib/services/sqlManagement2/lib/operations/index.d.ts +++ b/lib/services/sqlManagement2/lib/operations/index.d.ts @@ -16592,11 +16592,11 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -16622,10 +16622,11 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -16735,11 +16736,11 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -16765,10 +16766,11 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -16969,11 +16971,11 @@ export interface ExtendedServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -16999,10 +17001,11 @@ export interface ExtendedServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -17110,11 +17113,11 @@ export interface ExtendedServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -17140,10 +17143,11 @@ export interface ExtendedServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -17271,11 +17275,11 @@ export interface ExtendedServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -17301,10 +17305,11 @@ export interface ExtendedServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -17412,11 +17417,11 @@ export interface ExtendedServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -17442,10 +17447,11 @@ export interface ExtendedServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -17643,11 +17649,11 @@ export interface ServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -17673,10 +17679,11 @@ export interface ServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -17781,11 +17788,11 @@ export interface ServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -17811,10 +17818,11 @@ export interface ServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -17939,11 +17947,11 @@ export interface ServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -17969,10 +17977,11 @@ export interface ServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -18077,11 +18086,11 @@ export interface ServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -18107,10 +18116,11 @@ export interface ServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -18314,11 +18324,11 @@ export interface DatabaseBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -18344,10 +18354,11 @@ export interface DatabaseBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -18454,11 +18465,11 @@ export interface DatabaseBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -18484,10 +18495,11 @@ export interface DatabaseBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -27379,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 @@ -27389,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 @@ -27399,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 @@ -27416,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 @@ -27431,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. * @@ -27439,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 @@ -27473,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 @@ -27505,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. * @@ -27513,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 @@ -27535,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 @@ -27542,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 @@ -27559,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 @@ -27571,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. * @@ -27579,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; /** diff --git a/lib/services/sqlManagement2/lib/operations/serverBlobAuditingPolicies.js b/lib/services/sqlManagement2/lib/operations/serverBlobAuditingPolicies.js index c5c5df1473..6cb5ce1e82 100644 --- a/lib/services/sqlManagement2/lib/operations/serverBlobAuditingPolicies.js +++ b/lib/services/sqlManagement2/lib/operations/serverBlobAuditingPolicies.js @@ -247,11 +247,11 @@ function _get(resourceGroupName, serverName, options, callback) { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -277,10 +277,11 @@ function _get(resourceGroupName, serverName, options, callback) { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -443,11 +444,11 @@ function _createOrUpdate(resourceGroupName, serverName, parameters, options, cal * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -473,10 +474,11 @@ function _createOrUpdate(resourceGroupName, serverName, parameters, options, cal * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -828,11 +830,11 @@ class ServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -858,10 +860,11 @@ class ServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -978,11 +981,11 @@ class ServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -1008,10 +1011,11 @@ class ServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -1151,11 +1155,11 @@ class ServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -1181,10 +1185,11 @@ class ServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207) @@ -1301,11 +1306,11 @@ class ServerBlobAuditingPolicies { * REFERENCES * * The general form for defining an action to be audited is: - * ON BY + * {action} ON {object} BY {principal} * * Note that in the above format can refer to an object like a table, * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE:: and SCHEMA:: are used, + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, * respectively. * * For example: @@ -1331,10 +1336,11 @@ class ServerBlobAuditingPolicies { * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be * also created. * Note that for server level audit you should use the 'master' database as - * . + * {databaseName}. + * * Diagnostic Settings URI format: * PUT - * https://management.azure.com/subscriptions//resourceGroups//providers/Microsoft.Sql/servers//databases//providers/microsoft.insights/diagnosticSettings/?api-version=2017-05-01-preview + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview * * For more information, see [Diagnostic Settings REST * API](https://go.microsoft.com/fwlink/?linkid=2033207)