diff --git a/lib/services/sqlManagement2/lib/models/index.d.ts b/lib/services/sqlManagement2/lib/models/index.d.ts index 7254e59642..338819aa65 100644 --- a/lib/services/sqlManagement2/lib/models/index.d.ts +++ b/lib/services/sqlManagement2/lib/models/index.d.ts @@ -1364,7 +1364,8 @@ export interface Sku { * instance whose DNS zone this managed instance will share after creation. * @property {boolean} [publicDataEndpointEnabled] Whether or not the public * data endpoint is enabled. - * @property {string} [proxyOverride] Proxy override of the managed instance. + * @property {string} [proxyOverride] Connection type used for connecting to + * the instance. Possible values include: 'Proxy', 'Redirect', 'Default' */ export interface ManagedInstance extends TrackedResource { identity?: ResourceIdentity; @@ -1422,7 +1423,8 @@ export interface ManagedInstance extends TrackedResource { * instance whose DNS zone this managed instance will share after creation. * @property {boolean} [publicDataEndpointEnabled] Whether or not the public * data endpoint is enabled. - * @property {string} [proxyOverride] Proxy override of the managed instance. + * @property {string} [proxyOverride] Connection type used for connecting to + * the instance. Possible values include: 'Proxy', 'Redirect', 'Default' * @property {object} [tags] Resource tags. */ export interface ManagedInstanceUpdate { @@ -3257,6 +3259,24 @@ export interface ManagedServerSecurityAlertPolicy extends ProxyResource { readonly creationTime?: Date; } +/** + * @class + * Initializes a new instance of the SensitivityLabel class. + * @constructor + * A sensitivity label. + * + * @property {string} [labelName] The label name. + * @property {string} [labelId] The label ID. + * @property {string} [informationType] The information type. + * @property {string} [informationTypeId] The information type ID. + */ +export interface SensitivityLabel extends ProxyResource { + labelName?: string; + labelId?: string; + informationType?: string; + informationTypeId?: string; +} + /** * @class * Initializes a new instance of the DatabaseOperation class. @@ -5104,6 +5124,18 @@ export interface RestorePointListResult extends Array { readonly nextLink?: string; } +/** + * @class + * Initializes a new instance of the SensitivityLabelListResult class. + * @constructor + * A list of sensitivity labels. + * + * @property {string} [nextLink] Link to retrieve next page of results. + */ +export interface SensitivityLabelListResult extends Array { + readonly nextLink?: string; +} + /** * @class * Initializes a new instance of the DatabaseOperationListResult class. diff --git a/lib/services/sqlManagement2/lib/models/index.js b/lib/services/sqlManagement2/lib/models/index.js index 7c74c081f5..383baa2d05 100644 --- a/lib/services/sqlManagement2/lib/models/index.js +++ b/lib/services/sqlManagement2/lib/models/index.js @@ -126,6 +126,7 @@ exports.RestorePoint = require('./restorePoint'); exports.CreateDatabaseRestorePointDefinition = require('./createDatabaseRestorePointDefinition'); exports.ManagedDatabaseSecurityAlertPolicy = require('./managedDatabaseSecurityAlertPolicy'); exports.ManagedServerSecurityAlertPolicy = require('./managedServerSecurityAlertPolicy'); +exports.SensitivityLabel = require('./sensitivityLabel'); exports.DatabaseOperation = require('./databaseOperation'); exports.ElasticPoolOperation = require('./elasticPoolOperation'); exports.MaxSizeCapability = require('./maxSizeCapability'); @@ -216,6 +217,7 @@ exports.ManagedDatabaseListResult = require('./managedDatabaseListResult'); exports.ServerDnsAliasListResult = require('./serverDnsAliasListResult'); exports.RestorableDroppedManagedDatabaseListResult = require('./restorableDroppedManagedDatabaseListResult'); exports.RestorePointListResult = require('./restorePointListResult'); +exports.SensitivityLabelListResult = require('./sensitivityLabelListResult'); exports.DatabaseOperationListResult = require('./databaseOperationListResult'); exports.ElasticPoolOperationListResult = require('./elasticPoolOperationListResult'); exports.VulnerabilityAssessmentScanRecordListResult = require('./vulnerabilityAssessmentScanRecordListResult'); diff --git a/lib/services/sqlManagement2/lib/models/managedInstance.js b/lib/services/sqlManagement2/lib/models/managedInstance.js index 4837501e84..49aab03d2f 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstance.js +++ b/lib/services/sqlManagement2/lib/models/managedInstance.js @@ -62,7 +62,8 @@ class ManagedInstance extends models['TrackedResource'] { * instance whose DNS zone this managed instance will share after creation. * @property {boolean} [publicDataEndpointEnabled] Whether or not the public * data endpoint is enabled. - * @property {string} [proxyOverride] Proxy override of the managed instance. + * @property {string} [proxyOverride] Connection type used for connecting to + * the instance. Possible values include: 'Proxy', 'Redirect', 'Default' */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceUpdate.js b/lib/services/sqlManagement2/lib/models/managedInstanceUpdate.js index 5c16187cf3..861a3b8f79 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceUpdate.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceUpdate.js @@ -50,7 +50,8 @@ class ManagedInstanceUpdate { * instance whose DNS zone this managed instance will share after creation. * @property {boolean} [publicDataEndpointEnabled] Whether or not the public * data endpoint is enabled. - * @property {string} [proxyOverride] Proxy override of the managed instance. + * @property {string} [proxyOverride] Connection type used for connecting to + * the instance. Possible values include: 'Proxy', 'Redirect', 'Default' * @property {object} [tags] Resource tags. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/operations/index.d.ts b/lib/services/sqlManagement2/lib/operations/index.d.ts index 70e7bb59f1..7307c5496d 100644 --- a/lib/services/sqlManagement2/lib/operations/index.d.ts +++ b/lib/services/sqlManagement2/lib/operations/index.d.ts @@ -10838,8 +10838,9 @@ export interface ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -10923,8 +10924,9 @@ export interface ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -11081,8 +11083,9 @@ export interface ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * @@ -11156,8 +11159,9 @@ export interface ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * @@ -11258,8 +11262,9 @@ export interface ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -11343,8 +11348,9 @@ export interface ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -11501,8 +11507,9 @@ export interface ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * @@ -11576,8 +11583,9 @@ export interface ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * @@ -28778,15 +28786,15 @@ export interface ManagedServerSecurityAlertPolicies { /** * @class - * DatabaseOperations + * SensitivityLabels * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface DatabaseOperations { +export interface SensitivityLabels { /** - * Cancels the asynchronous operation on the database. + * Gets the sensitivity labels of a given database * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -28796,23 +28804,24 @@ export interface DatabaseOperations { * * @param {string} databaseName The name of the database. * - * @param {uuid} operationId The operation identifier. - * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - cancelWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listCurrentByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Cancels the asynchronous operation on the database. + * Gets the sensitivity labels of a given database * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -28822,10 +28831,11 @@ export interface DatabaseOperations { * * @param {string} databaseName The name of the database. * - * @param {uuid} operationId The operation identifier. - * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -28836,7 +28846,7 @@ export interface DatabaseOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28844,19 +28854,21 @@ export interface DatabaseOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SensitivityLabelListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabelListResult} 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. */ - cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, callback: ServiceCallback): void; - cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listCurrentByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listCurrentByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: ServiceCallback): void; + listCurrentByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of operations performed on the database. + * Gets the sensitivity labels of a given database * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -28868,19 +28880,24 @@ export interface DatabaseOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @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>; + listRecommendedByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { skipToken? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of operations performed on the database. + * Gets the sensitivity labels of a given database * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -28892,6 +28909,11 @@ export interface DatabaseOperations { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -28902,7 +28924,7 @@ export interface DatabaseOperations { * * {Promise} A promise is returned. * - * @resolve {DatabaseOperationListResult} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28910,24 +28932,38 @@ export interface DatabaseOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseOperationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseOperationListResult} for more + * {SensitivityLabelListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabelListResult} 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. */ - 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; + listRecommendedByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options?: { skipToken? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRecommendedByDatabase(resourceGroupName: string, serverName: string, databaseName: string, callback: ServiceCallback): void; + listRecommendedByDatabase(resourceGroupName: string, serverName: string, databaseName: string, options: { skipToken? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of operations performed on the database. + * Gets the sensitivity label of a given column * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {string} sensitivityLabelSource The source of the sensitivity label. + * Possible values include: 'current', 'recommended' * * @param {object} [options] Optional Parameters. * @@ -28936,17 +28972,31 @@ export interface DatabaseOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of operations performed on the database. + * Gets the sensitivity label of a given column * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {string} sensitivityLabelSource The source of the sensitivity label. + * Possible values include: 'current', 'recommended' * * @param {object} [options] Optional Parameters. * @@ -28960,7 +29010,7 @@ export interface DatabaseOperations { * * {Promise} A promise is returned. * - * @resolve {DatabaseOperationListResult} - The deserialized result object. + * @resolve {SensitivityLabel} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28968,30 +29018,20 @@ export interface DatabaseOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseOperationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseOperationListResult} for more - * information. + * {SensitivityLabel} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabel} 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. */ - listByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; - listByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ElasticPoolOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ElasticPoolOperations { + get(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Cancels the asynchronous operation on the elastic pool. + * Creates or updates the sensitivity label of a given column * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -28999,9 +29039,23 @@ export interface ElasticPoolOperations { * * @param {string} serverName The name of the server. * - * @param {string} elasticPoolName + * @param {string} databaseName The name of the database. * - * @param {uuid} operationId The operation identifier. + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {object} parameters The column sensitivity label resource. + * + * @param {string} [parameters.labelName] The label name. + * + * @param {string} [parameters.labelId] The label ID. + * + * @param {string} [parameters.informationType] The information type. + * + * @param {string} [parameters.informationTypeId] The information type ID. * * @param {object} [options] Optional Parameters. * @@ -29010,14 +29064,14 @@ export interface ElasticPoolOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - cancelWithHttpOperationResponse(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: models.SensitivityLabel, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Cancels the asynchronous operation on the elastic pool. + * Creates or updates the sensitivity label of a given column * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29025,9 +29079,23 @@ export interface ElasticPoolOperations { * * @param {string} serverName The name of the server. * - * @param {string} elasticPoolName + * @param {string} databaseName The name of the database. * - * @param {uuid} operationId The operation identifier. + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {object} parameters The column sensitivity label resource. + * + * @param {string} [parameters.labelName] The label name. + * + * @param {string} [parameters.labelId] The label ID. + * + * @param {string} [parameters.informationType] The information type. + * + * @param {string} [parameters.informationTypeId] The information type ID. * * @param {object} [options] Optional Parameters. * @@ -29041,7 +29109,7 @@ export interface ElasticPoolOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SensitivityLabel} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29049,19 +29117,20 @@ export interface ElasticPoolOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SensitivityLabel} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabel} 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. */ - cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, callback: ServiceCallback): void; - cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: models.SensitivityLabel, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: models.SensitivityLabel, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: models.SensitivityLabel, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of operations performed on the elastic pool. + * Deletes the sensitivity label of a given column * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29069,7 +29138,13 @@ export interface ElasticPoolOperations { * * @param {string} serverName The name of the server. * - * @param {string} elasticPoolName + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. * * @param {object} [options] Optional Parameters. * @@ -29078,14 +29153,14 @@ export interface ElasticPoolOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByElasticPoolWithHttpOperationResponse(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of operations performed on the elastic pool. + * Deletes the sensitivity label of a given column * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29093,7 +29168,13 @@ export interface ElasticPoolOperations { * * @param {string} serverName The name of the server. * - * @param {string} elasticPoolName + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. * * @param {object} [options] Optional Parameters. * @@ -29107,7 +29188,7 @@ export interface ElasticPoolOperations { * * {Promise} A promise is returned. * - * @resolve {ElasticPoolOperationListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29115,21 +29196,19 @@ export interface ElasticPoolOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ElasticPoolOperationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ElasticPoolOperationListResult} 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. */ - listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, callback: ServiceCallback): void; - listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of operations performed on the elastic pool. + * Gets the sensitivity labels of a given database * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -29141,14 +29220,14 @@ export interface ElasticPoolOperations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByElasticPoolNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listCurrentByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of operations performed on the elastic pool. + * Gets the sensitivity labels of a given database * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -29165,7 +29244,7 @@ export interface ElasticPoolOperations { * * {Promise} A promise is returned. * - * @resolve {ElasticPoolOperationListResult} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29173,65 +29252,46 @@ export interface ElasticPoolOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ElasticPoolOperationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ElasticPoolOperationListResult} for more + * {SensitivityLabelListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabelListResult} 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. */ - listByElasticPoolNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByElasticPoolNext(nextPageLink: string, callback: ServiceCallback): void; - listByElasticPoolNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Capabilities - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface Capabilities { + listCurrentByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listCurrentByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; + listCurrentByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the subscription capabilities available for the specified location. + * Gets the sensitivity labels of a given database * - * @param {string} locationName The location name whose capabilities are - * retrieved. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.include] If specified, restricts the response to - * only include the selected item. Possible values include: - * 'supportedEditions', 'supportedElasticPoolEditions', - * 'supportedManagedInstanceVersions' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByLocationWithHttpOperationResponse(locationName: string, options?: { include? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listRecommendedByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the subscription capabilities available for the specified location. + * Gets the sensitivity labels of a given database * - * @param {string} locationName The location name whose capabilities are - * retrieved. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.include] If specified, restricts the response to - * only include the selected item. Possible values include: - * 'supportedEditions', 'supportedElasticPoolEditions', - * 'supportedManagedInstanceVersions' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -29242,7 +29302,7 @@ export interface Capabilities { * * {Promise} A promise is returned. * - * @resolve {LocationCapabilities} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29250,29 +29310,30 @@ export interface Capabilities { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LocationCapabilities} [result] - The deserialized result object if an error did not occur. - * See {@link LocationCapabilities} for more information. + * {SensitivityLabelListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabelListResult} 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. */ - listByLocation(locationName: string, options?: { include? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByLocation(locationName: string, callback: ServiceCallback): void; - listByLocation(locationName: string, options: { include? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listRecommendedByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRecommendedByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; + listRecommendedByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * DatabaseVulnerabilityAssessmentScans + * DatabaseOperations * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface DatabaseVulnerabilityAssessmentScans { +export interface DatabaseOperations { /** - * Lists the vulnerability assessment scans of a database. + * Cancels the asynchronous operation on the database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29282,6 +29343,8 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * + * @param {uuid} operationId The operation identifier. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -29289,14 +29352,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>; + cancelWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment scans of a database. + * Cancels the asynchronous operation on the database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29306,6 +29369,8 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @param {string} databaseName The name of the database. * + * @param {uuid} operationId The operation identifier. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -29318,7 +29383,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. * @@ -29326,21 +29391,19 @@ 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; + cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, callback: ServiceCallback): void; + cancel(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a vulnerability assessment scan record of a database. + * Gets a list of operations performed on the database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29350,9 +29413,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 @@ -29360,14 +29420,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. + * Gets a list of operations performed on the database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29377,9 +29437,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 @@ -29392,7 +29449,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. + * @resolve {DatabaseOperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29400,32 +29457,24 @@ 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 + * {DatabaseOperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseOperationListResult} 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 list of operations performed on the 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 {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -29434,25 +29483,17 @@ 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>; + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * 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. + * Gets a list of operations performed on the database. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -29466,7 +29507,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DatabaseOperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29474,20 +29515,30 @@ 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. + * {DatabaseOperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseOperationListResult} 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; + listByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ElasticPoolOperations + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ElasticPoolOperations { /** - * Convert an existing scan result to a human readable format. If already - * exists nothing happens + * Cancels the asynchronous operation on the elastic pool. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29495,9 +29546,9 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the scanned database. + * @param {string} elasticPoolName * - * @param {string} scanId The vulnerability assessment scan Id. + * @param {uuid} operationId The operation identifier. * * @param {object} [options] Optional Parameters. * @@ -29506,15 +29557,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. */ - exportMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + cancelWithHttpOperationResponse(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Convert an existing scan result to a human readable format. If already - * exists nothing happens + * Cancels the asynchronous operation on the elastic pool. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29522,9 +29572,9 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the scanned database. + * @param {string} elasticPoolName * - * @param {string} scanId The vulnerability assessment scan Id. + * @param {uuid} operationId The operation identifier. * * @param {object} [options] Optional Parameters. * @@ -29538,7 +29588,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentScansExport} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29546,21 +29596,19 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseVulnerabilityAssessmentScansExport} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseVulnerabilityAssessmentScansExport} - * 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. */ - exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; - exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, callback: ServiceCallback): void; + cancel(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Executes a Vulnerability Assessment database scan. + * Gets a list of operations performed on the elastic pool. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29568,10 +29616,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @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 {string} elasticPoolName * * @param {object} [options] Optional Parameters. * @@ -29580,14 +29625,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. */ - beginInitiateScanWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByElasticPoolWithHttpOperationResponse(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Executes a Vulnerability Assessment database scan. + * Gets a list of operations performed on the elastic pool. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -29595,10 +29640,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @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 {string} elasticPoolName * * @param {object} [options] Optional Parameters. * @@ -29612,7 +29654,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ElasticPoolOperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29620,19 +29662,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. + * {ElasticPoolOperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ElasticPoolOperationListResult} 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. */ - beginInitiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginInitiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; - beginInitiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, callback: ServiceCallback): void; + listByElasticPool(resourceGroupName: string, serverName: string, elasticPoolName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the vulnerability assessment scans of a database. + * Gets a list of operations performed on the elastic pool. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -29644,14 +29688,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. */ - listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByElasticPoolNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment scans of a database. + * Gets a list of operations performed on the elastic pool. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -29668,7 +29712,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. + * @resolve {ElasticPoolOperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29676,79 +29720,65 @@ 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. + * {ElasticPoolOperationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ElasticPoolOperationListResult} 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. */ - listByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; - listByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByElasticPoolNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByElasticPoolNext(nextPageLink: string, callback: ServiceCallback): void; + listByElasticPoolNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * ManagedDatabaseVulnerabilityAssessmentRuleBaselines + * Capabilities * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { +export interface Capabilities { /** - * Gets a database's vulnerability assessment rule baseline. - * - * @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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. - * - * @param {string} ruleId The vulnerability assessment rule ID. + * Gets the subscription capabilities available for the specified location. * - * @param {string} baselineName The name of the vulnerability assessment rule - * baseline (default implies a baseline on a database level rule and master for - * server level rule). Possible values include: 'master', 'default' + * @param {string} locationName The location name whose capabilities are + * retrieved. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.include] If specified, restricts the response to + * only include the selected item. Possible values include: + * 'supportedEditions', 'supportedElasticPoolEditions', + * 'supportedManagedInstanceVersions' + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @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, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByLocationWithHttpOperationResponse(locationName: string, options?: { include? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's vulnerability assessment rule baseline. - * - * @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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. - * - * @param {string} ruleId The vulnerability assessment rule ID. + * Gets the subscription capabilities available for the specified location. * - * @param {string} baselineName The name of the vulnerability assessment rule - * baseline (default implies a baseline on a database level rule and master for - * server level rule). Possible values include: 'master', 'default' + * @param {string} locationName The location name whose capabilities are + * retrieved. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.include] If specified, restricts the response to + * only include the selected item. Possible values include: + * 'supportedEditions', 'supportedElasticPoolEditions', + * 'supportedManagedInstanceVersions' + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -29759,7 +29789,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. + * @resolve {LocationCapabilities} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29767,40 +29797,37 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseVulnerabilityAssessmentRuleBaseline} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseVulnerabilityAssessmentRuleBaseline} - * for more information. + * {LocationCapabilities} [result] - The deserialized result object if an error did not occur. + * See {@link LocationCapabilities} 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, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByLocation(locationName: string, options?: { include? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByLocation(locationName: string, callback: ServiceCallback): void; + listByLocation(locationName: string, options: { include? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * DatabaseVulnerabilityAssessmentScans + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface DatabaseVulnerabilityAssessmentScans { /** - * Creates or updates a database's vulnerability assessment rule baseline. + * 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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. - * - * @param {string} ruleId The vulnerability assessment rule ID. - * - * @param {string} baselineName The name of the vulnerability assessment rule - * baseline (default implies a baseline on a database level rule and master for - * server level rule). Possible values include: 'master', 'default' - * - * @param {object} parameters The requested rule baseline resource. + * @param {string} serverName The name of the server. * - * @param {array} parameters.baselineResults The rule baseline result + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -29809,33 +29836,22 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a database's vulnerability assessment rule baseline. + * 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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. - * - * @param {string} ruleId The vulnerability assessment rule ID. - * - * @param {string} baselineName The name of the vulnerability assessment rule - * baseline (default implies a baseline on a database level rule and master for - * server level rule). Possible values include: 'master', 'default' - * - * @param {object} parameters The requested rule baseline resource. + * @param {string} serverName The name of the server. * - * @param {array} parameters.baselineResults The rule baseline result + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -29849,7 +29865,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29857,184 +29873,27 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseVulnerabilityAssessmentRuleBaseline} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseVulnerabilityAssessmentRuleBaseline} + * {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. */ - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, 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; /** - * Removes the database's vulnerability assessment rule baseline. + * 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 * Manager API or the portal. * - * @param {string} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. - * - * @param {string} ruleId The vulnerability assessment rule ID. - * - * @param {string} baselineName The name of the vulnerability assessment rule - * baseline (default implies a baseline on a database level rule and master for - * server level rule). Possible values include: 'master', 'default' - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Removes the database's vulnerability assessment rule baseline. - * - * @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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. - * - * @param {string} ruleId The vulnerability assessment rule ID. - * - * @param {string} baselineName The name of the vulnerability assessment rule - * baseline (default implies a baseline on a database level rule and master for - * server level rule). Possible values include: 'master', 'default' - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {null} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {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. - */ - deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ManagedDatabaseVulnerabilityAssessmentScans - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ManagedDatabaseVulnerabilityAssessmentScans { - - - /** - * 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} managedInstanceName The name of the managed instance. - * - * @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 - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * 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} managedInstanceName The name of the managed instance. - * - * @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 {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {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. - * - * {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, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; - listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * 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 - * Manager API or the portal. - * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the database. * @@ -30052,7 +29911,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: 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>; /** * Gets a vulnerability assessment scan record of a database. @@ -30061,7 +29920,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the database. * @@ -30096,9 +29955,9 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; - get(resourceGroupName: string, managedInstanceName: 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; /** @@ -30108,7 +29967,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the database. * @@ -30126,7 +29985,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @reject {Error|ServiceError} - The error object. */ - initiateScanWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + initiateScanWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Executes a Vulnerability Assessment database scan. @@ -30135,7 +29994,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the database. * @@ -30168,9 +30027,9 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - initiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - initiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; - initiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: 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; /** @@ -30181,7 +30040,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the scanned database. * @@ -30198,7 +30057,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @reject {Error|ServiceError} - The error object. */ - exportMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + exportMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Convert an existing scan result to a human readable format. If already @@ -30208,7 +30067,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the scanned database. * @@ -30242,9 +30101,9 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; - exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; + exportMethod(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -30254,7 +30113,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the database. * @@ -30272,7 +30131,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @reject {Error|ServiceError} - The error object. */ - beginInitiateScanWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginInitiateScanWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Executes a Vulnerability Assessment database scan. @@ -30281,7 +30140,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the database. * @@ -30314,9 +30173,9 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginInitiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginInitiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; - beginInitiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginInitiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginInitiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; + beginInitiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -30379,15 +30238,15 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { /** * @class - * ManagedDatabaseVulnerabilityAssessments + * ManagedDatabaseVulnerabilityAssessmentRuleBaselines * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface ManagedDatabaseVulnerabilityAssessments { +export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { /** - * Gets the database's vulnerability assessment. + * Gets a database's vulnerability assessment rule baseline. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -30396,7 +30255,13 @@ export interface ManagedDatabaseVulnerabilityAssessments { * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * vulnerability assessment rule baseline is defined. + * + * @param {string} ruleId The vulnerability assessment rule ID. + * + * @param {string} baselineName The name of the vulnerability assessment rule + * baseline (default implies a baseline on a database level rule and master for + * server level rule). Possible values include: 'master', 'default' * * @param {object} [options] Optional Parameters. * @@ -30405,14 +30270,14 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * @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, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the database's vulnerability assessment. + * Gets a database's vulnerability assessment rule baseline. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -30421,7 +30286,13 @@ export interface ManagedDatabaseVulnerabilityAssessments { * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * vulnerability assessment rule baseline is defined. + * + * @param {string} ruleId The vulnerability assessment rule ID. + * + * @param {string} baselineName The name of the vulnerability assessment rule + * baseline (default implies a baseline on a database level rule and master for + * server level rule). Possible values include: 'master', 'default' * * @param {object} [options] Optional Parameters. * @@ -30435,7 +30306,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30443,21 +30314,21 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseVulnerabilityAssessment} for more - * information. + * {DatabaseVulnerabilityAssessmentRuleBaseline} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseVulnerabilityAssessmentRuleBaseline} + * 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, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates the database's vulnerability assessment. + * Creates or updates a database's vulnerability assessment rule baseline. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -30466,36 +30337,17 @@ export interface ManagedDatabaseVulnerabilityAssessments { * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * vulnerability assessment rule baseline is defined. * - * @param {object} parameters The requested resource. + * @param {string} ruleId The vulnerability assessment rule ID. * - * @param {string} [parameters.storageContainerPath] A blob storage container - * path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). It is required if server - * level vulnerability assessment policy doesn't set - * - * @param {string} [parameters.storageContainerSasKey] A shared access - * signature (SAS Key) that has write access to the blob container specified in - * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't - * specified, StorageContainerSasKey is required. - * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the storage account for vulnerability assessment scan - * results. If 'StorageContainerSasKey' isn't specified, - * storageAccountAccessKey is required. - * - * @param {object} [parameters.recurringScans] The recurring scans settings - * - * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans - * state. + * @param {string} baselineName The name of the vulnerability assessment rule + * baseline (default implies a baseline on a database level rule and master for + * server level rule). Possible values include: 'master', 'default' * - * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] - * Specifies that the schedule scan notification will be is sent to the - * subscription administrators. + * @param {object} parameters The requested rule baseline resource. * - * @param {array} [parameters.recurringScans.emails] Specifies an array of - * e-mail addresses to which the scan notification is sent. + * @param {array} parameters.baselineResults The rule baseline result * * @param {object} [options] Optional Parameters. * @@ -30504,14 +30356,14 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates the database's vulnerability assessment. + * Creates or updates a database's vulnerability assessment rule baseline. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -30520,36 +30372,17 @@ export interface ManagedDatabaseVulnerabilityAssessments { * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. - * - * @param {object} parameters The requested resource. - * - * @param {string} [parameters.storageContainerPath] A blob storage container - * path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). It is required if server - * level vulnerability assessment policy doesn't set - * - * @param {string} [parameters.storageContainerSasKey] A shared access - * signature (SAS Key) that has write access to the blob container specified in - * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't - * specified, StorageContainerSasKey is required. - * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the storage account for vulnerability assessment scan - * results. If 'StorageContainerSasKey' isn't specified, - * storageAccountAccessKey is required. + * vulnerability assessment rule baseline is defined. * - * @param {object} [parameters.recurringScans] The recurring scans settings + * @param {string} ruleId The vulnerability assessment rule ID. * - * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans - * state. + * @param {string} baselineName The name of the vulnerability assessment rule + * baseline (default implies a baseline on a database level rule and master for + * server level rule). Possible values include: 'master', 'default' * - * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] - * Specifies that the schedule scan notification will be is sent to the - * subscription administrators. + * @param {object} parameters The requested rule baseline resource. * - * @param {array} [parameters.recurringScans.emails] Specifies an array of - * e-mail addresses to which the scan notification is sent. + * @param {array} parameters.baselineResults The rule baseline result * * @param {object} [options] Optional Parameters. * @@ -30563,7 +30396,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30571,21 +30404,21 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseVulnerabilityAssessment} for more - * information. + * {DatabaseVulnerabilityAssessmentRuleBaseline} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseVulnerabilityAssessmentRuleBaseline} + * 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. */ - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Removes the database's vulnerability assessment. + * Removes the database's vulnerability assessment rule baseline. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -30594,7 +30427,13 @@ export interface ManagedDatabaseVulnerabilityAssessments { * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * vulnerability assessment rule baseline is defined. + * + * @param {string} ruleId The vulnerability assessment rule ID. + * + * @param {string} baselineName The name of the vulnerability assessment rule + * baseline (default implies a baseline on a database level rule and master for + * server level rule). Possible values include: 'master', 'default' * * @param {object} [options] Optional Parameters. * @@ -30607,10 +30446,10 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Removes the database's vulnerability assessment. + * Removes the database's vulnerability assessment rule baseline. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -30619,7 +30458,13 @@ export interface ManagedDatabaseVulnerabilityAssessments { * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * vulnerability assessment rule baseline is defined. + * + * @param {string} ruleId The vulnerability assessment rule ID. + * + * @param {string} baselineName The name of the vulnerability assessment rule + * baseline (default implies a baseline on a database level rule and master for + * server level rule). Possible values include: 'master', 'default' * * @param {object} [options] Optional Parameters. * @@ -30647,13 +30492,22 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ManagedDatabaseVulnerabilityAssessmentScans + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedDatabaseVulnerabilityAssessmentScans { /** - * Lists the vulnerability assessments of a managed 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 @@ -30661,8 +30515,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -30671,14 +30524,14 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * @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, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessments of a managed 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 @@ -30686,8 +30539,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -30701,7 +30553,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30709,24 +30561,32 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseVulnerabilityAssessmentListResult} + * {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. */ - listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; - listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the vulnerability assessments of a managed database. + * Gets a vulnerability assessment scan record of a database. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} managedInstanceName The name of the managed instance. + * + * @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. * @@ -30735,17 +30595,25 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessments of a managed database. + * Gets a vulnerability assessment scan record of a database. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} managedInstanceName The name of the managed instance. + * + * @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. * @@ -30759,7 +30627,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30767,39 +30635,32 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseVulnerabilityAssessmentListResult} - * for more information. + * {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. */ - listByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; - listByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * InstanceFailoverGroups - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface InstanceFailoverGroups { + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a failover group. + * 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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @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. * @@ -30808,23 +30669,25 @@ export interface InstanceFailoverGroups { * * @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, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + initiateScanWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a failover group. + * 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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @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. * @@ -30838,7 +30701,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroup} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30846,112 +30709,57 @@ export interface InstanceFailoverGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. - * See {@link InstanceFailoverGroup} 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. */ - get(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + initiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + initiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; + initiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a failover group. + * Convert an existing scan result to a human readable format. If already + * exists nothing happens * * @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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @param {string} databaseName The name of the scanned database. * - * @param {object} parameters The failover group parameters. + * @param {string} scanId The vulnerability assessment scan Id. * - * @param {object} parameters.readWriteEndpoint Read-write endpoint of the - * failover group instance. + * @param {object} [options] Optional Parameters. * - * @param {string} parameters.readWriteEndpoint.failoverPolicy Failover policy - * of the read-write endpoint for the failover group. If failoverPolicy is - * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible - * values include: 'Manual', 'Automatic' - * - * @param {number} - * [parameters.readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace - * period before failover with data loss is attempted for the read-write - * endpoint. If failoverPolicy is Automatic then - * failoverWithDataLossGracePeriodMinutes is required. - * - * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the - * failover group instance. - * - * @param {string} [parameters.readOnlyEndpoint.failoverPolicy] Failover policy - * of the read-only endpoint for the failover group. Possible values include: - * 'Disabled', 'Enabled' - * - * @param {array} parameters.partnerRegions Partner region information for the - * failover group. - * - * @param {array} parameters.managedInstancePairs List of managed instance - * pairs in the failover group. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [options.customHeaders] Headers that will be added to the + * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + exportMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a failover group. + * Convert an existing scan result to a human readable format. If already + * exists nothing happens * * @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} locationName The name of the region where the resource is - * located. - * - * @param {string} failoverGroupName The name of the failover group. - * - * @param {object} parameters The failover group parameters. - * - * @param {object} parameters.readWriteEndpoint Read-write endpoint of the - * failover group instance. - * - * @param {string} parameters.readWriteEndpoint.failoverPolicy Failover policy - * of the read-write endpoint for the failover group. If failoverPolicy is - * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible - * values include: 'Manual', 'Automatic' - * - * @param {number} - * [parameters.readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace - * period before failover with data loss is attempted for the read-write - * endpoint. If failoverPolicy is Automatic then - * failoverWithDataLossGracePeriodMinutes is required. - * - * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the - * failover group instance. - * - * @param {string} [parameters.readOnlyEndpoint.failoverPolicy] Failover policy - * of the read-only endpoint for the failover group. Possible values include: - * 'Disabled', 'Enabled' + * @param {string} managedInstanceName The name of the managed instance. * - * @param {array} parameters.partnerRegions Partner region information for the - * failover group. + * @param {string} databaseName The name of the scanned database. * - * @param {array} parameters.managedInstancePairs List of managed instance - * pairs in the failover group. + * @param {string} scanId The vulnerability assessment scan Id. * * @param {object} [options] Optional Parameters. * @@ -30965,7 +30773,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroup} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentScansExport} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30973,29 +30781,32 @@ export interface InstanceFailoverGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. - * See {@link InstanceFailoverGroup} for more information. + * {DatabaseVulnerabilityAssessmentScansExport} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseVulnerabilityAssessmentScansExport} + * 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. */ - createOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; + exportMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a failover group. + * 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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @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. * @@ -31008,19 +30819,21 @@ export interface InstanceFailoverGroups { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginInitiateScanWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a failover group. + * 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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @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. * @@ -31048,20 +30861,16 @@ export interface InstanceFailoverGroups { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginInitiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginInitiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; + beginInitiateScan(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the failover groups in a location. - * - * @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. + * Lists the vulnerability assessment scans of a database. * - * @param {string} locationName The name of the region where the resource is - * located. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -31070,21 +30879,17 @@ export interface InstanceFailoverGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByLocationWithHttpOperationResponse(resourceGroupName: string, locationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the failover groups in a location. - * - * @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. + * Lists the vulnerability assessment scans of a database. * - * @param {string} locationName The name of the region where the resource is - * located. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -31098,7 +30903,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroupListResult} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31106,31 +30911,39 @@ export interface InstanceFailoverGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InstanceFailoverGroupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link InstanceFailoverGroupListResult} 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. */ - listByLocation(resourceGroupName: string, locationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByLocation(resourceGroupName: string, locationName: string, callback: ServiceCallback): void; - listByLocation(resourceGroupName: string, locationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ManagedDatabaseVulnerabilityAssessments + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedDatabaseVulnerabilityAssessments { /** - * Fails over from the current primary managed instance to this managed - * instance. + * Gets the database's vulnerability assessment. * * @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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31139,24 +30952,23 @@ export interface InstanceFailoverGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - failoverWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Fails over from the current primary managed instance to this managed - * instance. + * Gets the database's vulnerability assessment. * * @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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31170,7 +30982,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroup} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31178,30 +30990,59 @@ export interface InstanceFailoverGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. - * See {@link InstanceFailoverGroup} for more information. + * {DatabaseVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseVulnerabilityAssessment} 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. */ - failover(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - failover(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; - failover(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Fails over from the current primary managed instance to this managed - * instance. This operation might result in data loss. + * Creates or updates the database's vulnerability assessment. * * @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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. + * + * @param {object} parameters The requested resource. + * + * @param {string} [parameters.storageContainerPath] A blob storage container + * path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if server + * level vulnerability assessment policy doesn't set + * + * @param {string} [parameters.storageContainerSasKey] A shared access + * signature (SAS Key) that has write access to the blob container specified in + * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + * specified, StorageContainerSasKey is required. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the storage account for vulnerability assessment scan + * results. If 'StorageContainerSasKey' isn't specified, + * storageAccountAccessKey is required. + * + * @param {object} [parameters.recurringScans] The recurring scans settings + * + * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans + * state. + * + * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] + * Specifies that the schedule scan notification will be is sent to the + * subscription administrators. + * + * @param {array} [parameters.recurringScans.emails] Specifies an array of + * e-mail addresses to which the scan notification is sent. * * @param {object} [options] Optional Parameters. * @@ -31210,38 +31051,66 @@ export interface InstanceFailoverGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - forceFailoverAllowDataLossWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Fails over from the current primary managed instance to this managed - * instance. This operation might result in data loss. + * Creates or updates the database's vulnerability assessment. * * @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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters The requested resource. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.storageContainerPath] A blob storage container + * path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). It is required if server + * level vulnerability assessment policy doesn't set * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [parameters.storageContainerSasKey] A shared access + * signature (SAS Key) that has write access to the blob container specified in + * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + * specified, StorageContainerSasKey is required. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the storage account for vulnerability assessment scan + * results. If 'StorageContainerSasKey' isn't specified, + * storageAccountAccessKey is required. * - * {Promise} A promise is returned. + * @param {object} [parameters.recurringScans] The recurring scans settings * - * @resolve {InstanceFailoverGroup} - The deserialized result object. + * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans + * state. + * + * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] + * Specifies that the schedule scan notification will be is sent to the + * subscription administrators. + * + * @param {array} [parameters.recurringScans.emails] Specifies an array of + * e-mail addresses to which the scan notification is sent. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31249,58 +31118,30 @@ export interface InstanceFailoverGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. - * See {@link InstanceFailoverGroup} for more information. + * {DatabaseVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseVulnerabilityAssessment} 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. */ - forceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - forceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; - forceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a failover group. + * Removes the database's vulnerability assessment. * * @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} locationName The name of the region where the resource is - * located. - * - * @param {string} failoverGroupName The name of the failover group. - * - * @param {object} parameters The failover group parameters. - * - * @param {object} parameters.readWriteEndpoint Read-write endpoint of the - * failover group instance. - * - * @param {string} parameters.readWriteEndpoint.failoverPolicy Failover policy - * of the read-write endpoint for the failover group. If failoverPolicy is - * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible - * values include: 'Manual', 'Automatic' - * - * @param {number} - * [parameters.readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace - * period before failover with data loss is attempted for the read-write - * endpoint. If failoverPolicy is Automatic then - * failoverWithDataLossGracePeriodMinutes is required. - * - * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the - * failover group instance. - * - * @param {string} [parameters.readOnlyEndpoint.failoverPolicy] Failover policy - * of the read-only endpoint for the failover group. Possible values include: - * 'Disabled', 'Enabled' - * - * @param {array} parameters.partnerRegions Partner region information for the - * failover group. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {array} parameters.managedInstancePairs List of managed instance - * pairs in the failover group. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31309,52 +31150,23 @@ export interface InstanceFailoverGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a failover group. + * Removes the database's vulnerability assessment. * * @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} locationName The name of the region where the resource is - * located. - * - * @param {string} failoverGroupName The name of the failover group. - * - * @param {object} parameters The failover group parameters. - * - * @param {object} parameters.readWriteEndpoint Read-write endpoint of the - * failover group instance. - * - * @param {string} parameters.readWriteEndpoint.failoverPolicy Failover policy - * of the read-write endpoint for the failover group. If failoverPolicy is - * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible - * values include: 'Manual', 'Automatic' - * - * @param {number} - * [parameters.readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace - * period before failover with data loss is attempted for the read-write - * endpoint. If failoverPolicy is Automatic then - * failoverWithDataLossGracePeriodMinutes is required. - * - * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the - * failover group instance. - * - * @param {string} [parameters.readOnlyEndpoint.failoverPolicy] Failover policy - * of the read-only endpoint for the failover group. Possible values include: - * 'Disabled', 'Enabled' - * - * @param {array} parameters.partnerRegions Partner region information for the - * failover group. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {array} parameters.managedInstancePairs List of managed instance - * pairs in the failover group. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31368,7 +31180,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroup} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31376,29 +31188,28 @@ export interface InstanceFailoverGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. - * See {@link InstanceFailoverGroup} 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. */ - beginCreateOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a failover group. + * Lists the vulnerability assessments of a managed 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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31407,23 +31218,23 @@ export interface InstanceFailoverGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a failover group. + * Lists the vulnerability assessments of a managed 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} locationName The name of the region where the resource is - * located. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} failoverGroupName The name of the failover group. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31437,7 +31248,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31445,29 +31256,24 @@ export interface InstanceFailoverGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DatabaseVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseVulnerabilityAssessmentListResult} + * 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. */ - beginDeleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; + listByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Fails over from the current primary managed instance to this managed - * instance. - * - * @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} locationName The name of the region where the resource is - * located. + * Lists the vulnerability assessments of a managed database. * - * @param {string} failoverGroupName The name of the failover group. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -31476,24 +31282,17 @@ export interface InstanceFailoverGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginFailoverWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Fails over from the current primary managed instance to this managed - * instance. - * - * @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} locationName The name of the region where the resource is - * located. + * Lists the vulnerability assessments of a managed database. * - * @param {string} failoverGroupName The name of the failover group. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -31507,7 +31306,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroup} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31515,21 +31314,30 @@ export interface InstanceFailoverGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. - * See {@link InstanceFailoverGroup} for more information. + * {DatabaseVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseVulnerabilityAssessmentListResult} + * 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. */ - beginFailover(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginFailover(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; - beginFailover(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * InstanceFailoverGroups + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface InstanceFailoverGroups { /** - * Fails over from the current primary managed instance to this managed - * instance. This operation might result in data loss. + * Gets a failover group. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -31551,11 +31359,10 @@ export interface InstanceFailoverGroups { * * @reject {Error|ServiceError} - The error object. */ - beginForceFailoverAllowDataLossWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Fails over from the current primary managed instance to this managed - * instance. This operation might result in data loss. + * Gets a failover group. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -31593,112 +31400,105 @@ export interface InstanceFailoverGroups { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginForceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginForceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; - beginForceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the failover groups in a location. + * Creates or updates a failover group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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 {object} [options] Optional Parameters. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} failoverGroupName The name of the failover group. * - * @returns {Promise} A promise is returned + * @param {object} parameters The failover group parameters. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {object} parameters.readWriteEndpoint Read-write endpoint of the + * failover group instance. * - * @reject {Error|ServiceError} - The error object. - */ - listByLocationNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Lists the failover groups in a location. + * @param {string} parameters.readWriteEndpoint.failoverPolicy Failover policy + * of the read-write endpoint for the failover group. If failoverPolicy is + * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible + * values include: 'Manual', 'Automatic' * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {number} + * [parameters.readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace + * period before failover with data loss is attempted for the read-write + * endpoint. If failoverPolicy is Automatic then + * failoverWithDataLossGracePeriodMinutes is required. * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the + * failover group instance. * - * {Promise} A promise is returned. + * @param {string} [parameters.readOnlyEndpoint.failoverPolicy] Failover policy + * of the read-only endpoint for the failover group. Possible values include: + * 'Disabled', 'Enabled' * - * @resolve {InstanceFailoverGroupListResult} - The deserialized result object. + * @param {array} parameters.partnerRegions Partner region information for the + * failover group. * - * @reject {Error|ServiceError} - The error object. + * @param {array} parameters.managedInstancePairs List of managed instance + * pairs in the failover group. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [options] Optional Parameters. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * {InstanceFailoverGroupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link InstanceFailoverGroupListResult} for more - * information. + * @returns {Promise} A promise is returned * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @reject {Error|ServiceError} - The error object. */ - listByLocationNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByLocationNext(nextPageLink: string, callback: ServiceCallback): void; - listByLocationNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * BackupShortTermRetentionPolicies - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface BackupShortTermRetentionPolicies { - + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's short term retention policy. + * Creates or updates a failover group. * * @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} locationName The name of the region where the resource is + * located. * - * @param {string} databaseName The name of the database. + * @param {string} failoverGroupName The name of the failover group. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters The failover group parameters. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} parameters.readWriteEndpoint Read-write endpoint of the + * failover group instance. * - * @returns {Promise} A promise is returned + * @param {string} parameters.readWriteEndpoint.failoverPolicy Failover policy + * of the read-write endpoint for the failover group. If failoverPolicy is + * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible + * values include: 'Manual', 'Automatic' * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {number} + * [parameters.readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace + * period before failover with data loss is attempted for the read-write + * endpoint. If failoverPolicy is Automatic then + * failoverWithDataLossGracePeriodMinutes is required. * - * @reject {Error|ServiceError} - The error object. - */ - getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a database's short term retention policy. + * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the + * failover group instance. * - * @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} [parameters.readOnlyEndpoint.failoverPolicy] Failover policy + * of the read-only endpoint for the failover group. Possible values include: + * 'Disabled', 'Enabled' * - * @param {string} serverName The name of the server. + * @param {array} parameters.partnerRegions Partner region information for the + * failover group. * - * @param {string} databaseName The name of the database. + * @param {array} parameters.managedInstancePairs List of managed instance + * pairs in the failover group. * * @param {object} [options] Optional Parameters. * @@ -31712,7 +31512,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31720,34 +31520,29 @@ export interface BackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link BackupShortTermRetentionPolicy} for more - * information. + * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. + * See {@link InstanceFailoverGroup} 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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, databaseName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a database's short term retention policy. + * Deletes a failover group. * * @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} parameters The short term retention policy info. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -31756,27 +31551,23 @@ export interface BackupShortTermRetentionPolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a database's short term retention policy. + * Deletes a failover group. * * @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} parameters The short term retention policy info. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -31790,7 +31581,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31798,34 +31589,26 @@ export interface BackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link BackupShortTermRetentionPolicy} 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. */ - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a database's short term retention policy. + * Lists the failover groups in a location. * * @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} parameters The short term retention policy info. - * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} locationName The name of the region where the resource is + * located. * * @param {object} [options] Optional Parameters. * @@ -31834,27 +31617,21 @@ export interface BackupShortTermRetentionPolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByLocationWithHttpOperationResponse(resourceGroupName: string, locationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a database's short term retention policy. + * Lists the failover groups in a location. * * @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} parameters The short term retention policy info. - * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} locationName The name of the region where the resource is + * located. * * @param {object} [options] Optional Parameters. * @@ -31868,7 +31645,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {InstanceFailoverGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31876,29 +31653,31 @@ export interface BackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link BackupShortTermRetentionPolicy} for more + * {InstanceFailoverGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link InstanceFailoverGroupListResult} 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. */ - update(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, callback: ServiceCallback): void; - update(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByLocation(resourceGroupName: string, locationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByLocation(resourceGroupName: string, locationName: string, callback: ServiceCallback): void; + listByLocation(resourceGroupName: string, locationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a database's short term retention policy. + * Fails over from the current primary managed instance to this managed + * instance. * * @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} locationName The name of the region where the resource is + * located. * - * @param {string} databaseName The name of the database. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -31907,22 +31686,24 @@ export interface BackupShortTermRetentionPolicies { * * @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>; + failoverWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's short term retention policy. + * Fails over from the current primary managed instance to this managed + * instance. * * @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} locationName The name of the region where the resource is + * located. * - * @param {string} databaseName The name of the database. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -31936,7 +31717,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicyListResult} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31944,34 +31725,30 @@ export interface BackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. - * See {@link BackupShortTermRetentionPolicyListResult} - * for more information. + * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. + * See {@link InstanceFailoverGroup} 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. */ - 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; + failover(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + failover(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; + failover(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a database's short term retention policy. + * Fails over from the current primary managed instance to this managed + * instance. This operation might result in data loss. * * @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} parameters The short term retention policy info. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -31980,27 +31757,24 @@ export interface BackupShortTermRetentionPolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + forceFailoverAllowDataLossWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a database's short term retention policy. + * Fails over from the current primary managed instance to this managed + * instance. This operation might result in data loss. * * @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} parameters The short term retention policy info. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -32014,7 +31788,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32022,21 +31796,1017 @@ export interface BackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link BackupShortTermRetentionPolicy} for more - * information. + * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. + * See {@link InstanceFailoverGroup} 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. */ - beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + forceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + forceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; + forceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a failover group. + * + * @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} locationName The name of the region where the resource is + * located. + * + * @param {string} failoverGroupName The name of the failover group. + * + * @param {object} parameters The failover group parameters. + * + * @param {object} parameters.readWriteEndpoint Read-write endpoint of the + * failover group instance. + * + * @param {string} parameters.readWriteEndpoint.failoverPolicy Failover policy + * of the read-write endpoint for the failover group. If failoverPolicy is + * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible + * values include: 'Manual', 'Automatic' + * + * @param {number} + * [parameters.readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace + * period before failover with data loss is attempted for the read-write + * endpoint. If failoverPolicy is Automatic then + * failoverWithDataLossGracePeriodMinutes is required. + * + * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the + * failover group instance. + * + * @param {string} [parameters.readOnlyEndpoint.failoverPolicy] Failover policy + * of the read-only endpoint for the failover group. Possible values include: + * 'Disabled', 'Enabled' + * + * @param {array} parameters.partnerRegions Partner region information for the + * failover group. + * + * @param {array} parameters.managedInstancePairs List of managed instance + * pairs in the failover group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a failover group. + * + * @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} locationName The name of the region where the resource is + * located. + * + * @param {string} failoverGroupName The name of the failover group. + * + * @param {object} parameters The failover group parameters. + * + * @param {object} parameters.readWriteEndpoint Read-write endpoint of the + * failover group instance. + * + * @param {string} parameters.readWriteEndpoint.failoverPolicy Failover policy + * of the read-write endpoint for the failover group. If failoverPolicy is + * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible + * values include: 'Manual', 'Automatic' + * + * @param {number} + * [parameters.readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace + * period before failover with data loss is attempted for the read-write + * endpoint. If failoverPolicy is Automatic then + * failoverWithDataLossGracePeriodMinutes is required. + * + * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the + * failover group instance. + * + * @param {string} [parameters.readOnlyEndpoint.failoverPolicy] Failover policy + * of the read-only endpoint for the failover group. Possible values include: + * 'Disabled', 'Enabled' + * + * @param {array} parameters.partnerRegions Partner region information for the + * failover group. + * + * @param {array} parameters.managedInstancePairs List of managed instance + * pairs in the failover group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {InstanceFailoverGroup} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. + * See {@link InstanceFailoverGroup} 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. + */ + beginCreateOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a failover group. + * + * @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} locationName The name of the region where the resource is + * located. + * + * @param {string} failoverGroupName The name of the failover group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a failover group. + * + * @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} locationName The name of the region where the resource is + * located. + * + * @param {string} failoverGroupName The name of the failover group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {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. + */ + beginDeleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Fails over from the current primary managed instance to this managed + * instance. + * + * @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} locationName The name of the region where the resource is + * located. + * + * @param {string} failoverGroupName The name of the failover group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginFailoverWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Fails over from the current primary managed instance to this managed + * instance. + * + * @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} locationName The name of the region where the resource is + * located. + * + * @param {string} failoverGroupName The name of the failover group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {InstanceFailoverGroup} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. + * See {@link InstanceFailoverGroup} 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. + */ + beginFailover(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginFailover(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; + beginFailover(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Fails over from the current primary managed instance to this managed + * instance. This operation might result in data loss. + * + * @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} locationName The name of the region where the resource is + * located. + * + * @param {string} failoverGroupName The name of the failover group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginForceFailoverAllowDataLossWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Fails over from the current primary managed instance to this managed + * instance. This operation might result in data loss. + * + * @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} locationName The name of the region where the resource is + * located. + * + * @param {string} failoverGroupName The name of the failover group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {InstanceFailoverGroup} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {InstanceFailoverGroup} [result] - The deserialized result object if an error did not occur. + * See {@link InstanceFailoverGroup} 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. + */ + beginForceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginForceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, callback: ServiceCallback): void; + beginForceFailoverAllowDataLoss(resourceGroupName: string, locationName: string, failoverGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists the failover groups in a location. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByLocationNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists the failover groups in a location. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {InstanceFailoverGroupListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {InstanceFailoverGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link InstanceFailoverGroupListResult} 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. + */ + listByLocationNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByLocationNext(nextPageLink: string, callback: ServiceCallback): void; + listByLocationNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * BackupShortTermRetentionPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface BackupShortTermRetentionPolicies { + + + /** + * Gets a database's short term retention policy. + * + * @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 + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a database's short term retention policy. + * + * @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 {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link BackupShortTermRetentionPolicy} 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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, databaseName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates a database's short term retention policy. + * + * @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} parameters The short term retention policy info. + * + * @param {number} [parameters.retentionDays] The backup retention period in + * days. This is how many days Point-in-Time Restore will be supported. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates a database's short term retention policy. + * + * @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} parameters The short term retention policy info. + * + * @param {number} [parameters.retentionDays] The backup retention period in + * days. This is how many days Point-in-Time Restore will be supported. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link BackupShortTermRetentionPolicy} 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. + */ + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates a database's short term retention policy. + * + * @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} parameters The short term retention policy info. + * + * @param {number} [parameters.retentionDays] The backup retention period in + * days. This is how many days Point-in-Time Restore will be supported. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates a database's short term retention policy. + * + * @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} parameters The short term retention policy info. + * + * @param {number} [parameters.retentionDays] The backup retention period in + * days. This is how many days Point-in-Time Restore will be supported. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link BackupShortTermRetentionPolicy} 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. + */ + update(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, callback: ServiceCallback): void; + update(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a database's short term retention policy. + * + * @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 + * + * @returns {Promise} A promise is returned + * + * @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>; + + /** + * Gets a database's short term retention policy. + * + * @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 {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {BackupShortTermRetentionPolicyListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {BackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link BackupShortTermRetentionPolicyListResult} + * 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. + */ + 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; + + + /** + * Updates a database's short term retention policy. + * + * @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} parameters The short term retention policy info. + * + * @param {number} [parameters.retentionDays] The backup retention period in + * days. This is how many days Point-in-Time Restore will be supported. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates a database's short term retention policy. + * + * @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} parameters The short term retention policy info. + * + * @param {number} [parameters.retentionDays] The backup retention period in + * days. This is how many days Point-in-Time Restore will be supported. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link BackupShortTermRetentionPolicy} 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. + */ + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, callback: ServiceCallback): void; beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a database's short term retention policy. + * Updates a database's short term retention policy. + * + * @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} parameters The short term retention policy info. + * + * @param {number} [parameters.retentionDays] The backup retention period in + * days. This is how many days Point-in-Time Restore will be supported. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates a database's short term retention policy. + * + * @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} parameters The short term retention policy info. + * + * @param {number} [parameters.retentionDays] The backup retention period in + * days. This is how many days Point-in-Time Restore will be supported. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link BackupShortTermRetentionPolicy} 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. + */ + beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a database's short term retention policy. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a database's short term retention policy. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {BackupShortTermRetentionPolicyListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {BackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link BackupShortTermRetentionPolicyListResult} + * 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. + */ + listByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; + listByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * TdeCertificates + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface TdeCertificates { + + + /** + * Creates a TDE certificate for a given server. + * + * @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 {object} parameters The requested TDE certificate to be created or + * updated. + * + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. + * + * @param {string} [parameters.certPassword] The certificate password. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a TDE certificate for a given server. + * + * @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 {object} parameters The requested TDE certificate to be created or + * updated. + * + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. + * + * @param {string} [parameters.certPassword] The certificate password. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {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. + */ + create(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, callback: ServiceCallback): void; + create(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a TDE certificate for a given server. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32044,12 +32814,13 @@ export interface BackupShortTermRetentionPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The requested TDE certificate to be created or + * updated. * - * @param {object} parameters The short term retention policy info. + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} [parameters.certPassword] The certificate password. * * @param {object} [options] Optional Parameters. * @@ -32058,14 +32829,14 @@ export interface BackupShortTermRetentionPolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a database's short term retention policy. + * Creates a TDE certificate for a given server. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32073,12 +32844,13 @@ export interface BackupShortTermRetentionPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The requested TDE certificate to be created or + * updated. * - * @param {object} parameters The short term retention policy info. + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} [parameters.certPassword] The certificate password. * * @param {object} [options] Optional Parameters. * @@ -32092,7 +32864,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32100,24 +32872,42 @@ export interface BackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link BackupShortTermRetentionPolicy} 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. */ - beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ManagedInstanceTdeCertificates + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedInstanceTdeCertificates { /** - * Gets a database's short term retention policy. + * Creates a TDE certificate for a given server. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The requested TDE certificate to be created or + * updated. + * + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. + * + * @param {string} [parameters.certPassword] The certificate password. * * @param {object} [options] Optional Parameters. * @@ -32126,17 +32916,28 @@ export interface BackupShortTermRetentionPolicies { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's short term retention policy. + * Creates a TDE certificate for a given server. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The requested TDE certificate to be created or + * updated. + * + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. + * + * @param {string} [parameters.certPassword] The certificate password. * * @param {object} [options] Optional Parameters. * @@ -32150,7 +32951,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicyListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32158,44 +32959,185 @@ export interface BackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. - * See {@link BackupShortTermRetentionPolicyListResult} - * 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. */ - listByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; - listByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, callback: ServiceCallback): void; + create(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates a TDE certificate for a given server. + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The requested TDE certificate to be created or + * updated. + * + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. + * + * @param {string} [parameters.certPassword] The certificate password. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a TDE certificate for a given server. + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The requested TDE certificate to be created or + * updated. + * + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. + * + * @param {string} [parameters.certPassword] The certificate password. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {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. + */ + beginCreate(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * TdeCertificates + * ManagedInstanceKeys * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface TdeCertificates { +export interface ManagedInstanceKeys { + + + /** + * Gets a list of managed instance keys. + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of managed instance keys. + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ManagedInstanceKeyListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ManagedInstanceKeyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceKeyListResult} 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. + */ + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates a TDE certificate for a given server. + * Gets a managed instance key. * * @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 {object} parameters The requested TDE certificate to be created or - * updated. - * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} [parameters.certPassword] The certificate password. + * @param {string} keyName The name of the managed instance key to be + * retrieved. * * @param {object} [options] Optional Parameters. * @@ -32204,28 +33146,23 @@ export interface TdeCertificates { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a TDE certificate for a given server. + * Gets a managed instance key. * * @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 {object} parameters The requested TDE certificate to be created or - * updated. - * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} [parameters.certPassword] The certificate password. + * @param {string} keyName The name of the managed instance key to be + * retrieved. * * @param {object} [options] Optional Parameters. * @@ -32239,7 +33176,7 @@ export interface TdeCertificates { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedInstanceKey} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32247,33 +33184,38 @@ export interface TdeCertificates { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ManagedInstanceKey} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceKey} 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. */ - create(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, callback: ServiceCallback): void; - create(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, keyName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, keyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates a TDE certificate for a given server. + * Creates or updates a managed instance key. * * @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} managedInstanceName The name of the managed instance. * - * @param {object} parameters The requested TDE certificate to be created or - * updated. + * @param {string} keyName The name of the managed instance key to be operated + * on (updated or created). * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. + * @param {object} parameters The requested managed instance key resource + * state. * - * @param {string} [parameters.certPassword] The certificate password. + * @param {string} parameters.serverKeyType The key type like 'ServiceManaged', + * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' + * + * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is + * AzureKeyVault, then the URI is required. * * @param {object} [options] Optional Parameters. * @@ -32282,28 +33224,32 @@ export interface TdeCertificates { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a TDE certificate for a given server. + * Creates or updates a managed instance key. * * @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} managedInstanceName The name of the managed instance. * - * @param {object} parameters The requested TDE certificate to be created or - * updated. + * @param {string} keyName The name of the managed instance key to be operated + * on (updated or created). * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. + * @param {object} parameters The requested managed instance key resource + * state. * - * @param {string} [parameters.certPassword] The certificate password. + * @param {string} parameters.serverKeyType The key type like 'ServiceManaged', + * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' + * + * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is + * AzureKeyVault, then the URI is required. * * @param {object} [options] Optional Parameters. * @@ -32317,7 +33263,7 @@ export interface TdeCertificates { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedInstanceKey} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32325,28 +33271,20 @@ export interface TdeCertificates { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ManagedInstanceKey} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceKey} 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. */ - beginCreate(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ManagedInstanceTdeCertificates - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ManagedInstanceTdeCertificates { + createOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates a TDE certificate for a given server. + * Deletes the managed instance key with the given name. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32354,13 +33292,7 @@ export interface ManagedInstanceTdeCertificates { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} parameters The requested TDE certificate to be created or - * updated. - * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. - * - * @param {string} [parameters.certPassword] The certificate password. + * @param {string} keyName The name of the managed instance key to be deleted. * * @param {object} [options] Optional Parameters. * @@ -32373,10 +33305,10 @@ export interface ManagedInstanceTdeCertificates { * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a TDE certificate for a given server. + * Deletes the managed instance key with the given name. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32384,13 +33316,7 @@ export interface ManagedInstanceTdeCertificates { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} parameters The requested TDE certificate to be created or - * updated. - * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. - * - * @param {string} [parameters.certPassword] The certificate password. + * @param {string} keyName The name of the managed instance key to be deleted. * * @param {object} [options] Optional Parameters. * @@ -32418,13 +33344,13 @@ export interface ManagedInstanceTdeCertificates { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, callback: ServiceCallback): void; - create(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates a TDE certificate for a given server. + * Creates or updates a managed instance key. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32432,13 +33358,17 @@ export interface ManagedInstanceTdeCertificates { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} parameters The requested TDE certificate to be created or - * updated. + * @param {string} keyName The name of the managed instance key to be operated + * on (updated or created). * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. + * @param {object} parameters The requested managed instance key resource + * state. * - * @param {string} [parameters.certPassword] The certificate password. + * @param {string} parameters.serverKeyType The key type like 'ServiceManaged', + * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' + * + * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is + * AzureKeyVault, then the URI is required. * * @param {object} [options] Optional Parameters. * @@ -32447,14 +33377,14 @@ export interface ManagedInstanceTdeCertificates { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a TDE certificate for a given server. + * Creates or updates a managed instance key. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32462,13 +33392,17 @@ export interface ManagedInstanceTdeCertificates { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} parameters The requested TDE certificate to be created or - * updated. + * @param {string} keyName The name of the managed instance key to be operated + * on (updated or created). * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. + * @param {object} parameters The requested managed instance key resource + * state. * - * @param {string} [parameters.certPassword] The certificate password. + * @param {string} parameters.serverKeyType The key type like 'ServiceManaged', + * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' + * + * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is + * AzureKeyVault, then the URI is required. * * @param {object} [options] Optional Parameters. * @@ -32482,7 +33416,7 @@ export interface ManagedInstanceTdeCertificates { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedInstanceKey} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32490,28 +33424,20 @@ export interface ManagedInstanceTdeCertificates { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ManagedInstanceKey} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceKey} 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. */ - beginCreate(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ManagedInstanceKeys - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ManagedInstanceKeys { + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of managed instance keys. + * Deletes the managed instance key with the given name. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32519,24 +33445,23 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} [options] Optional Parameters. + * @param {string} keyName The name of the managed instance key to be deleted. * - * @param {string} [options.filter] An OData filter expression that filters - * elements in the collection. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of managed instance keys. + * Deletes the managed instance key with the given name. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32544,10 +33469,9 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} [options] Optional Parameters. + * @param {string} keyName The name of the managed instance key to be deleted. * - * @param {string} [options.filter] An OData filter expression that filters - * elements in the collection. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -32559,7 +33483,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKeyListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32567,30 +33491,22 @@ export interface ManagedInstanceKeys { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceKeyListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceKeyListResult} 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. */ - listByInstance(resourceGroupName: string, managedInstanceName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByInstance(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; - listByInstance(resourceGroupName: string, managedInstanceName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a managed instance key. - * - * @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} managedInstanceName The name of the managed instance. + * Gets a list of managed instance keys. * - * @param {string} keyName The name of the managed instance key to be - * retrieved. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -32599,23 +33515,17 @@ export interface ManagedInstanceKeys { * * @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, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a managed instance key. - * - * @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} managedInstanceName The name of the managed instance. + * Gets a list of managed instance keys. * - * @param {string} keyName The name of the managed instance key to be - * retrieved. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -32629,7 +33539,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKey} - The deserialized result object. + * @resolve {ManagedInstanceKeyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32637,20 +33547,30 @@ export interface ManagedInstanceKeys { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceKey} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceKey} for more information. + * {ManagedInstanceKeyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceKeyListResult} 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, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, managedInstanceName: string, keyName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, managedInstanceName: string, keyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByInstanceNext(nextPageLink: string, callback: ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ManagedInstanceEncryptionProtectors + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedInstanceEncryptionProtectors { /** - * Creates or updates a managed instance key. + * Gets a list of managed instance encryption protectors * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32658,18 +33578,6 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} keyName The name of the managed instance key to be operated - * on (updated or created). - * - * @param {object} parameters The requested managed instance key resource - * state. - * - * @param {string} parameters.serverKeyType The key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' - * - * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is - * AzureKeyVault, then the URI is required. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -32677,14 +33585,14 @@ export interface ManagedInstanceKeys { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a managed instance key. + * Gets a list of managed instance encryption protectors * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32692,18 +33600,6 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} keyName The name of the managed instance key to be operated - * on (updated or created). - * - * @param {object} parameters The requested managed instance key resource - * state. - * - * @param {string} parameters.serverKeyType The key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' - * - * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is - * AzureKeyVault, then the URI is required. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -32716,7 +33612,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKey} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtectorListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32724,20 +33620,22 @@ export interface ManagedInstanceKeys { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceKey} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceKey} for more information. + * {ManagedInstanceEncryptionProtectorListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ManagedInstanceEncryptionProtectorListResult} 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. */ - createOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the managed instance key with the given name. + * Gets a managed instance encryption protector. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32745,8 +33643,6 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} keyName The name of the managed instance key to be deleted. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -32754,14 +33650,14 @@ export interface ManagedInstanceKeys { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the managed instance key with the given name. + * Gets a managed instance encryption protector. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32769,8 +33665,6 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} keyName The name of the managed instance key to be deleted. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -32783,7 +33677,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32791,19 +33685,21 @@ export interface ManagedInstanceKeys { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ManagedInstanceEncryptionProtector} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceEncryptionProtector} 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. */ - deleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a managed instance key. + * Updates an existing encryption protector. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32811,17 +33707,15 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} keyName The name of the managed instance key to be operated - * on (updated or created). - * - * @param {object} parameters The requested managed instance key resource + * @param {object} parameters The requested encryption protector resource * state. * - * @param {string} parameters.serverKeyType The key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' + * @param {string} [parameters.serverKeyName] The name of the managed instance + * key. * - * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is - * AzureKeyVault, then the URI is required. + * @param {string} parameters.serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' * * @param {object} [options] Optional Parameters. * @@ -32830,14 +33724,14 @@ export interface ManagedInstanceKeys { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a managed instance key. + * Updates an existing encryption protector. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32845,17 +33739,15 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} keyName The name of the managed instance key to be operated - * on (updated or created). - * - * @param {object} parameters The requested managed instance key resource + * @param {object} parameters The requested encryption protector resource * state. * - * @param {string} parameters.serverKeyType The key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' + * @param {string} [parameters.serverKeyName] The name of the managed instance + * key. * - * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is - * AzureKeyVault, then the URI is required. + * @param {string} parameters.serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' * * @param {object} [options] Optional Parameters. * @@ -32869,7 +33761,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKey} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32877,20 +33769,21 @@ export interface ManagedInstanceKeys { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceKey} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceKey} for more information. + * {ManagedInstanceEncryptionProtector} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceEncryptionProtector} 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. */ - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the managed instance key with the given name. + * Updates an existing encryption protector. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32898,7 +33791,15 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} keyName The name of the managed instance key to be deleted. + * @param {object} parameters The requested encryption protector resource + * state. + * + * @param {string} [parameters.serverKeyName] The name of the managed instance + * key. + * + * @param {string} parameters.serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' * * @param {object} [options] Optional Parameters. * @@ -32907,14 +33808,14 @@ export interface ManagedInstanceKeys { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the managed instance key with the given name. + * Updates an existing encryption protector. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -32922,7 +33823,15 @@ export interface ManagedInstanceKeys { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} keyName The name of the managed instance key to be deleted. + * @param {object} parameters The requested encryption protector resource + * state. + * + * @param {string} [parameters.serverKeyName] The name of the managed instance + * key. + * + * @param {string} parameters.serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' * * @param {object} [options] Optional Parameters. * @@ -32936,7 +33845,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32944,19 +33853,21 @@ export interface ManagedInstanceKeys { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ManagedInstanceEncryptionProtector} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceEncryptionProtector} 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. */ - beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, keyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of managed instance keys. + * Gets a list of managed instance encryption protectors * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -32968,14 +33879,14 @@ export interface ManagedInstanceKeys { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of managed instance keys. + * Gets a list of managed instance encryption protectors * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -32992,7 +33903,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKeyListResult} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtectorListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33000,30 +33911,31 @@ export interface ManagedInstanceKeys { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceKeyListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceKeyListResult} for more + * {ManagedInstanceEncryptionProtectorListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ManagedInstanceEncryptionProtectorListResult} 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. */ - listByInstanceNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByInstanceNext(nextPageLink: string, callback: ServiceCallback): void; - listByInstanceNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByInstanceNext(nextPageLink: string, callback: ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * ManagedInstanceEncryptionProtectors + * RecoverableManagedDatabases * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface ManagedInstanceEncryptionProtectors { +export interface RecoverableManagedDatabases { /** - * Gets a list of managed instance encryption protectors + * Gets a list of recoverable managed databases. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -33038,14 +33950,14 @@ export interface ManagedInstanceEncryptionProtectors { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of managed instance encryption protectors + * Gets a list of recoverable managed databases. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -33065,7 +33977,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtectorListResult} - The deserialized result object. + * @resolve {RecoverableManagedDatabaseListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33073,22 +33985,21 @@ export interface ManagedInstanceEncryptionProtectors { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceEncryptionProtectorListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * ManagedInstanceEncryptionProtectorListResult} for more - * information. + * {RecoverableManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RecoverableManagedDatabaseListResult} 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. */ - listByInstance(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByInstance(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; - listByInstance(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a managed instance encryption protector. + * Gets a recoverable managed database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -33096,6 +34007,8 @@ export interface ManagedInstanceEncryptionProtectors { * * @param {string} managedInstanceName The name of the managed instance. * + * @param {string} recoverableDatabaseName + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -33103,14 +34016,14 @@ export interface ManagedInstanceEncryptionProtectors { * * @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, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a managed instance encryption protector. + * Gets a recoverable managed database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -33118,6 +34031,8 @@ export interface ManagedInstanceEncryptionProtectors { * * @param {string} managedInstanceName The name of the managed instance. * + * @param {string} recoverableDatabaseName + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -33130,7 +34045,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. + * @resolve {RecoverableManagedDatabase} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33138,37 +34053,24 @@ export interface ManagedInstanceEncryptionProtectors { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceEncryptionProtector} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceEncryptionProtector} for more + * {RecoverableManagedDatabase} [result] - The deserialized result object if an error did not occur. + * See {@link RecoverableManagedDatabase} 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, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Updates an existing encryption protector. - * - * @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} managedInstanceName The name of the managed instance. - * - * @param {object} parameters The requested encryption protector resource - * state. - * - * @param {string} [parameters.serverKeyName] The name of the managed instance - * key. + get(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of recoverable managed databases. * - * @param {string} parameters.serverKeyType The encryption protector type like - * 'ServiceManaged', 'AzureKeyVault'. Possible values include: - * 'ServiceManaged', 'AzureKeyVault' + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -33177,30 +34079,17 @@ export interface ManagedInstanceEncryptionProtectors { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates an existing encryption protector. - * - * @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} managedInstanceName The name of the managed instance. - * - * @param {object} parameters The requested encryption protector resource - * state. - * - * @param {string} [parameters.serverKeyName] The name of the managed instance - * key. + * Gets a list of recoverable managed databases. * - * @param {string} parameters.serverKeyType The encryption protector type like - * 'ServiceManaged', 'AzureKeyVault'. Possible values include: - * 'ServiceManaged', 'AzureKeyVault' + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -33214,7 +34103,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. + * @resolve {RecoverableManagedDatabaseListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33222,37 +34111,37 @@ export interface ManagedInstanceEncryptionProtectors { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceEncryptionProtector} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceEncryptionProtector} for more - * information. + * {RecoverableManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RecoverableManagedDatabaseListResult} 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. */ - createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByInstanceNext(nextPageLink: string, callback: ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ManagedInstanceVulnerabilityAssessments + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedInstanceVulnerabilityAssessments { /** - * Updates an existing encryption protector. + * Gets the managed instance's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance. - * - * @param {object} parameters The requested encryption protector resource - * state. - * - * @param {string} [parameters.serverKeyName] The name of the managed instance - * key. - * - * @param {string} parameters.serverKeyType The encryption protector type like - * 'ServiceManaged', 'AzureKeyVault'. Possible values include: - * 'ServiceManaged', 'AzureKeyVault' + * @param {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -33261,30 +34150,21 @@ export interface ManagedInstanceEncryptionProtectors { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates an existing encryption protector. + * Gets the managed instance's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance. - * - * @param {object} parameters The requested encryption protector resource - * state. - * - * @param {string} [parameters.serverKeyName] The name of the managed instance - * key. - * - * @param {string} parameters.serverKeyType The encryption protector type like - * 'ServiceManaged', 'AzureKeyVault'. Possible values include: - * 'ServiceManaged', 'AzureKeyVault' + * @param {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -33298,7 +34178,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. + * @resolve {ManagedInstanceVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33306,24 +34186,56 @@ export interface ManagedInstanceEncryptionProtectors { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceEncryptionProtector} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceEncryptionProtector} for more - * information. + * {ManagedInstanceVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceVulnerabilityAssessment} 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. */ - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of managed instance encryption protectors + * Creates or updates the managed instance's vulnerability assessment. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. + * + * @param {object} parameters The requested resource. + * + * @param {string} parameters.storageContainerPath A blob storage container + * path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). + * + * @param {string} [parameters.storageContainerSasKey] A shared access + * signature (SAS Key) that has write access to the blob container specified in + * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + * specified, StorageContainerSasKey is required. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the storage account for vulnerability assessment scan + * results. If 'StorageContainerSasKey' isn't specified, + * storageAccountAccessKey is required. + * + * @param {object} [parameters.recurringScans] The recurring scans settings + * + * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans + * state. + * + * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] + * Specifies that the schedule scan notification will be is sent to the + * subscription administrators. + * + * @param {array} [parameters.recurringScans.emails] Specifies an array of + * e-mail addresses to which the scan notification is sent. * * @param {object} [options] Optional Parameters. * @@ -33332,17 +34244,49 @@ export interface ManagedInstanceEncryptionProtectors { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of managed instance encryption protectors + * Creates or updates the managed instance's vulnerability assessment. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. + * + * @param {object} parameters The requested resource. + * + * @param {string} parameters.storageContainerPath A blob storage container + * path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). + * + * @param {string} [parameters.storageContainerSasKey] A shared access + * signature (SAS Key) that has write access to the blob container specified in + * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't + * specified, StorageContainerSasKey is required. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the storage account for vulnerability assessment scan + * results. If 'StorageContainerSasKey' isn't specified, + * storageAccountAccessKey is required. + * + * @param {object} [parameters.recurringScans] The recurring scans settings + * + * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans + * state. + * + * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] + * Specifies that the schedule scan notification will be is sent to the + * subscription administrators. + * + * @param {array} [parameters.recurringScans.emails] Specifies an array of + * e-mail addresses to which the scan notification is sent. * * @param {object} [options] Optional Parameters. * @@ -33356,7 +34300,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtectorListResult} - The deserialized result object. + * @resolve {ManagedInstanceVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33364,37 +34308,28 @@ export interface ManagedInstanceEncryptionProtectors { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceEncryptionProtectorListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * ManagedInstanceEncryptionProtectorListResult} for more - * information. + * {ManagedInstanceVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedInstanceVulnerabilityAssessment} 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. */ - listByInstanceNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByInstanceNext(nextPageLink: string, callback: ServiceCallback): void; - listByInstanceNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * RecoverableManagedDatabases - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface RecoverableManagedDatabases { + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceVulnerabilityAssessment, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceVulnerabilityAssessment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of recoverable managed databases. + * Removes the managed instance's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance. + * @param {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -33403,20 +34338,21 @@ export interface RecoverableManagedDatabases { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of recoverable managed databases. + * Removes the managed instance's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance. + * @param {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -33430,7 +34366,7 @@ export interface RecoverableManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {RecoverableManagedDatabaseListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33438,29 +34374,26 @@ export interface RecoverableManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RecoverableManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. - * See {@link RecoverableManagedDatabaseListResult} 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. */ - listByInstance(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByInstance(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; - listByInstance(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a recoverable managed database. + * Gets the managed instance's vulnerability assessment policies. * * @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} managedInstanceName The name of the managed instance. - * - * @param {string} recoverableDatabaseName + * @param {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessments is defined. * * @param {object} [options] Optional Parameters. * @@ -33469,22 +34402,21 @@ export interface RecoverableManagedDatabases { * * @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, managedInstanceName: string, recoverableDatabaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a recoverable managed database. + * Gets the managed instance's vulnerability assessment policies. * * @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} managedInstanceName The name of the managed instance. - * - * @param {string} recoverableDatabaseName + * @param {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessments is defined. * * @param {object} [options] Optional Parameters. * @@ -33498,7 +34430,7 @@ export interface RecoverableManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {RecoverableManagedDatabase} - The deserialized result object. + * @resolve {ManagedInstanceVulnerabilityAssessmentListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33506,21 +34438,22 @@ export interface RecoverableManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RecoverableManagedDatabase} [result] - The deserialized result object if an error did not occur. - * See {@link RecoverableManagedDatabase} for more - * information. + * {ManagedInstanceVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ManagedInstanceVulnerabilityAssessmentListResult} 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, managedInstanceName: string, recoverableDatabaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByInstance(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; + listByInstance(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of recoverable managed databases. + * Gets the managed instance's vulnerability assessment policies. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -33532,14 +34465,14 @@ export interface RecoverableManagedDatabases { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of recoverable managed databases. + * Gets the managed instance's vulnerability assessment policies. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -33556,7 +34489,7 @@ export interface RecoverableManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {RecoverableManagedDatabaseListResult} - The deserialized result object. + * @resolve {ManagedInstanceVulnerabilityAssessmentListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33564,37 +34497,38 @@ export interface RecoverableManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RecoverableManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. - * See {@link RecoverableManagedDatabaseListResult} for + * {ManagedInstanceVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ManagedInstanceVulnerabilityAssessmentListResult} 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. */ - listByInstanceNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByInstanceNext(nextPageLink: string, callback: ServiceCallback): void; - listByInstanceNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByInstanceNext(nextPageLink: string, callback: ServiceCallback): void; + listByInstanceNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * ManagedInstanceVulnerabilityAssessments + * ServerVulnerabilityAssessments * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface ManagedInstanceVulnerabilityAssessments { +export interface ServerVulnerabilityAssessments { /** - * Gets the managed instance's vulnerability assessment. + * Gets the server's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance for - * which the vulnerability assessment is defined. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -33603,21 +34537,21 @@ export interface ManagedInstanceVulnerabilityAssessments { * * @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, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the managed instance's vulnerability assessment. + * Gets the server's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance for - * which the vulnerability assessment is defined. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -33631,7 +34565,7 @@ export interface ManagedInstanceVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceVulnerabilityAssessment} - The deserialized result object. + * @resolve {ServerVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33639,28 +34573,28 @@ export interface ManagedInstanceVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceVulnerabilityAssessment} for - * more information. + * {ServerVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. + * See {@link ServerVulnerabilityAssessment} 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, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates the managed instance's vulnerability assessment. + * Creates or updates the server's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance for - * which the vulnerability assessment is defined. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} parameters The requested resource. * @@ -33697,21 +34631,21 @@ export interface ManagedInstanceVulnerabilityAssessments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ServerVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates the managed instance's vulnerability assessment. + * Creates or updates the server's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance for - * which the vulnerability assessment is defined. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} parameters The requested resource. * @@ -33753,7 +34687,7 @@ export interface ManagedInstanceVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceVulnerabilityAssessment} - The deserialized result object. + * @resolve {ServerVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33761,28 +34695,28 @@ export interface ManagedInstanceVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedInstanceVulnerabilityAssessment} for - * more information. + * {ServerVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. + * See {@link ServerVulnerabilityAssessment} 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. */ - createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceVulnerabilityAssessment, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceVulnerabilityAssessment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerVulnerabilityAssessment, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerVulnerabilityAssessment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Removes the managed instance's vulnerability assessment. + * Removes the server's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance for - * which the vulnerability assessment is defined. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -33795,17 +34729,17 @@ export interface ManagedInstanceVulnerabilityAssessments { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Removes the managed instance's vulnerability assessment. + * Removes the server's vulnerability assessment. * * @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} managedInstanceName The name of the managed instance for - * which the vulnerability assessment is defined. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -33833,20 +34767,161 @@ export interface ManagedInstanceVulnerabilityAssessments { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the managed instance's vulnerability assessment policies. + * Lists the vulnerability assessment policies associated with a server. + * + * @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 {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByServerWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists the vulnerability assessment policies associated with a server. + * + * @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 {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ServerVulnerabilityAssessmentListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ServerVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ServerVulnerabilityAssessmentListResult} 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. + */ + listByServer(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByServer(resourceGroupName: string, serverName: string, callback: ServiceCallback): void; + listByServer(resourceGroupName: string, serverName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists the vulnerability assessment policies associated with a server. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByServerNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists the vulnerability assessment policies associated with a server. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ServerVulnerabilityAssessmentListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ServerVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ServerVulnerabilityAssessmentListResult} 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. + */ + listByServerNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByServerNext(nextPageLink: string, callback: ServiceCallback): void; + listByServerNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ManagedDatabaseSensitivityLabels + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedDatabaseSensitivityLabels { + + + /** + * Gets the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the 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} schemaName The name of the schema. * - * @param {string} managedInstanceName The name of the managed instance for - * which the vulnerability assessments is defined. + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {string} sensitivityLabelSource The source of the sensitivity label. + * Possible values include: 'current', 'recommended' * * @param {object} [options] Optional Parameters. * @@ -33855,21 +34930,31 @@ export interface ManagedInstanceVulnerabilityAssessments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the managed instance's vulnerability assessment policies. + * Gets the sensitivity label of a given column * * @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} managedInstanceName The name of the managed instance for - * which the vulnerability assessments is defined. + * @param {string} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {string} sensitivityLabelSource The source of the sensitivity label. + * Possible values include: 'current', 'recommended' * * @param {object} [options] Optional Parameters. * @@ -33883,7 +34968,7 @@ export interface ManagedInstanceVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {SensitivityLabel} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33891,25 +34976,44 @@ export interface ManagedInstanceVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * ManagedInstanceVulnerabilityAssessmentListResult} for - * more information. + * {SensitivityLabel} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabel} 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. */ - listByInstance(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByInstance(resourceGroupName: string, managedInstanceName: string, callback: ServiceCallback): void; - listByInstance(resourceGroupName: string, managedInstanceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the managed instance's vulnerability assessment policies. + * Creates or updates the sensitivity label of a given column * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {object} parameters The column sensitivity label resource. + * + * @param {string} [parameters.labelName] The label name. + * + * @param {string} [parameters.labelId] The label ID. + * + * @param {string} [parameters.informationType] The information type. + * + * @param {string} [parameters.informationTypeId] The information type ID. * * @param {object} [options] Optional Parameters. * @@ -33918,17 +35022,38 @@ export interface ManagedInstanceVulnerabilityAssessments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: models.SensitivityLabel, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the managed instance's vulnerability assessment policies. + * Creates or updates the sensitivity label of a given column * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {object} parameters The column sensitivity label resource. + * + * @param {string} [parameters.labelName] The label name. + * + * @param {string} [parameters.labelId] The label ID. + * + * @param {string} [parameters.informationType] The information type. + * + * @param {string} [parameters.informationTypeId] The information type ID. * * @param {object} [options] Optional Parameters. * @@ -33942,7 +35067,7 @@ export interface ManagedInstanceVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {SensitivityLabel} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -33950,38 +35075,34 @@ export interface ManagedInstanceVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedInstanceVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * ManagedInstanceVulnerabilityAssessmentListResult} for - * more information. + * {SensitivityLabel} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabel} 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. */ - listByInstanceNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByInstanceNext(nextPageLink: string, callback: ServiceCallback): void; - listByInstanceNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ServerVulnerabilityAssessments - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ServerVulnerabilityAssessments { + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: models.SensitivityLabel, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: models.SensitivityLabel, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: models.SensitivityLabel, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the server's vulnerability assessment. + * Deletes the sensitivity label of a given column * * @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 for which the - * vulnerability assessment is defined. + * @param {string} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. * * @param {object} [options] Optional Parameters. * @@ -33990,21 +35111,28 @@ export interface ServerVulnerabilityAssessments { * * @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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the server's vulnerability assessment. + * Deletes the sensitivity label of a given column * * @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 for which the - * vulnerability assessment is defined. + * @param {string} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. * * @param {object} [options] Optional Parameters. * @@ -34018,7 +35146,7 @@ export interface ServerVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {ServerVulnerabilityAssessment} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -34026,110 +35154,60 @@ export interface ServerVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. - * See {@link ServerVulnerabilityAssessment} 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. */ - get(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates the server's vulnerability assessment. + * Gets the sensitivity labels of a given 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 for which the - * vulnerability assessment is defined. - * - * @param {object} parameters The requested resource. - * - * @param {string} parameters.storageContainerPath A blob storage container - * path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). - * - * @param {string} [parameters.storageContainerSasKey] A shared access - * signature (SAS Key) that has write access to the blob container specified in - * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't - * specified, StorageContainerSasKey is required. - * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the storage account for vulnerability assessment scan - * results. If 'StorageContainerSasKey' isn't specified, - * storageAccountAccessKey is required. - * - * @param {object} [parameters.recurringScans] The recurring scans settings - * - * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans - * state. - * - * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] - * Specifies that the schedule scan notification will be is sent to the - * subscription administrators. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {array} [parameters.recurringScans.emails] Specifies an array of - * e-mail addresses to which the scan notification is sent. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ServerVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listCurrentByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates the server's vulnerability assessment. + * Gets the sensitivity labels of a given 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 for which the - * vulnerability assessment is defined. - * - * @param {object} parameters The requested resource. - * - * @param {string} parameters.storageContainerPath A blob storage container - * path to hold the scan results (e.g. - * https://myStorage.blob.core.windows.net/VaScans/). - * - * @param {string} [parameters.storageContainerSasKey] A shared access - * signature (SAS Key) that has write access to the blob container specified in - * 'storageContainerPath' parameter. If 'storageAccountAccessKey' isn't - * specified, StorageContainerSasKey is required. - * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the storage account for vulnerability assessment scan - * results. If 'StorageContainerSasKey' isn't specified, - * storageAccountAccessKey is required. - * - * @param {object} [parameters.recurringScans] The recurring scans settings - * - * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans - * state. - * - * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] - * Specifies that the schedule scan notification will be is sent to the - * subscription administrators. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {array} [parameters.recurringScans.emails] Specifies an array of - * e-mail addresses to which the scan notification is sent. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -34140,7 +35218,7 @@ export interface ServerVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {ServerVulnerabilityAssessment} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -34148,54 +35226,66 @@ export interface ServerVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. - * See {@link ServerVulnerabilityAssessment} for more + * {SensitivityLabelListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabelListResult} 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. */ - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerVulnerabilityAssessment, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerVulnerabilityAssessment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listCurrentByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listCurrentByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; + listCurrentByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Removes the server's vulnerability assessment. + * Gets the sensitivity labels of a given 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 for which the - * vulnerability assessment is defined. + * @param {string} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listRecommendedByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { skipToken? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Removes the server's vulnerability assessment. + * Gets the sensitivity labels of a given 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 for which the - * vulnerability assessment is defined. + * @param {string} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -34206,7 +35296,7 @@ export interface ServerVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -34214,25 +35304,24 @@ export interface ServerVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SensitivityLabelListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabelListResult} 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. */ - deleteMethod(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listRecommendedByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { skipToken? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listRecommendedByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; + listRecommendedByDatabase(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { skipToken? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the vulnerability assessment policies associated with a server. - * - * @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. + * Gets the sensitivity labels of a given database * - * @param {string} serverName The name of the server. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -34241,20 +35330,17 @@ export interface ServerVulnerabilityAssessments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByServerWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listCurrentByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment policies associated with a server. - * - * @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. + * Gets the sensitivity labels of a given database * - * @param {string} serverName The name of the server. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -34268,7 +35354,7 @@ export interface ServerVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {ServerVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -34276,21 +35362,21 @@ export interface ServerVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ServerVulnerabilityAssessmentListResult} for - * more information. + * {SensitivityLabelListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabelListResult} 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. */ - listByServer(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByServer(resourceGroupName: string, serverName: string, callback: ServiceCallback): void; - listByServer(resourceGroupName: string, serverName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listCurrentByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listCurrentByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; + listCurrentByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the vulnerability assessment policies associated with a server. + * Gets the sensitivity labels of a given database * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -34302,14 +35388,14 @@ export interface ServerVulnerabilityAssessments { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByServerNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listRecommendedByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment policies associated with a server. + * Gets the sensitivity labels of a given database * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -34326,7 +35412,7 @@ export interface ServerVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {ServerVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -34334,15 +35420,15 @@ export interface ServerVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerVulnerabilityAssessmentListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ServerVulnerabilityAssessmentListResult} for - * more information. + * {SensitivityLabelListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SensitivityLabelListResult} 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. */ - listByServerNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByServerNext(nextPageLink: string, callback: ServiceCallback): void; - listByServerNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listRecommendedByDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRecommendedByDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; + listRecommendedByDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } diff --git a/lib/services/sqlManagement2/lib/operations/index.js b/lib/services/sqlManagement2/lib/operations/index.js index 9d10213fea..5d0321f485 100644 --- a/lib/services/sqlManagement2/lib/operations/index.js +++ b/lib/services/sqlManagement2/lib/operations/index.js @@ -75,6 +75,7 @@ exports.RestorableDroppedManagedDatabases = require('./restorableDroppedManagedD exports.RestorePoints = require('./restorePoints'); exports.ManagedDatabaseSecurityAlertPolicies = require('./managedDatabaseSecurityAlertPolicies'); exports.ManagedServerSecurityAlertPolicies = require('./managedServerSecurityAlertPolicies'); +exports.SensitivityLabels = require('./sensitivityLabels'); exports.DatabaseOperations = require('./databaseOperations'); exports.ElasticPoolOperations = require('./elasticPoolOperations'); exports.Capabilities = require('./capabilities'); @@ -91,3 +92,4 @@ exports.ManagedInstanceEncryptionProtectors = require('./managedInstanceEncrypti exports.RecoverableManagedDatabases = require('./recoverableManagedDatabases'); exports.ManagedInstanceVulnerabilityAssessments = require('./managedInstanceVulnerabilityAssessments'); exports.ServerVulnerabilityAssessments = require('./serverVulnerabilityAssessments'); +exports.ManagedDatabaseSensitivityLabels = require('./managedDatabaseSensitivityLabels'); diff --git a/lib/services/sqlManagement2/lib/operations/managedDatabaseSensitivityLabels.js b/lib/services/sqlManagement2/lib/operations/managedDatabaseSensitivityLabels.js new file mode 100644 index 0000000000..091a8b1cf9 --- /dev/null +++ b/lib/services/sqlManagement2/lib/operations/managedDatabaseSensitivityLabels.js @@ -0,0 +1,1893 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Gets the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {string} sensitivityLabelSource The source of the sensitivity label. + * Possible values include: 'current', 'recommended' + * + * @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 SensitivityLabel} 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, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, 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.'); + } + let apiVersion = '2018-06-01-preview'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (managedInstanceName === null || managedInstanceName === undefined || typeof managedInstanceName.valueOf() !== 'string') { + throw new Error('managedInstanceName cannot be null or undefined and it must be of type string.'); + } + 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 (schemaName === null || schemaName === undefined || typeof schemaName.valueOf() !== 'string') { + throw new Error('schemaName cannot be null or undefined and it must be of type string.'); + } + if (tableName === null || tableName === undefined || typeof tableName.valueOf() !== 'string') { + throw new Error('tableName cannot be null or undefined and it must be of type string.'); + } + if (columnName === null || columnName === undefined || typeof columnName.valueOf() !== 'string') { + throw new Error('columnName cannot be null or undefined and it must be of type string.'); + } + if (sensitivityLabelSource) { + let allowedValues = [ 'current', 'recommended' ]; + if (!allowedValues.some( function(item) { return item === sensitivityLabelSource; })) { + throw new Error(sensitivityLabelSource + ' is not a valid value. The valid values are: ' + allowedValues); + } + } else { + throw new Error('sensitivityLabelSource cannot be null or undefined.'); + } + 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.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); + requestUrl = requestUrl.replace('{schemaName}', encodeURIComponent(schemaName)); + requestUrl = requestUrl.replace('{tableName}', encodeURIComponent(tableName)); + requestUrl = requestUrl.replace('{columnName}', encodeURIComponent(columnName)); + requestUrl = requestUrl.replace('{sensitivityLabelSource}', encodeURIComponent(sensitivityLabelSource)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SensitivityLabel']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Creates or updates the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {object} parameters The column sensitivity label resource. + * + * @param {string} [parameters.labelName] The label name. + * + * @param {string} [parameters.labelId] The label ID. + * + * @param {string} [parameters.informationType] The information type. + * + * @param {string} [parameters.informationTypeId] The information type ID. + * + * @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 SensitivityLabel} 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 _createOrUpdate(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters, 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.'); + } + let sensitivityLabelSource = 'current'; + let apiVersion = '2018-06-01-preview'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (managedInstanceName === null || managedInstanceName === undefined || typeof managedInstanceName.valueOf() !== 'string') { + throw new Error('managedInstanceName cannot be null or undefined and it must be of type string.'); + } + 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 (schemaName === null || schemaName === undefined || typeof schemaName.valueOf() !== 'string') { + throw new Error('schemaName cannot be null or undefined and it must be of type string.'); + } + if (tableName === null || tableName === undefined || typeof tableName.valueOf() !== 'string') { + throw new Error('tableName cannot be null or undefined and it must be of type string.'); + } + if (columnName === null || columnName === undefined || typeof columnName.valueOf() !== 'string') { + throw new Error('columnName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + 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.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); + requestUrl = requestUrl.replace('{schemaName}', encodeURIComponent(schemaName)); + requestUrl = requestUrl.replace('{tableName}', encodeURIComponent(tableName)); + requestUrl = requestUrl.replace('{columnName}', encodeURIComponent(columnName)); + requestUrl = requestUrl.replace('{sensitivityLabelSource}', encodeURIComponent(sensitivityLabelSource)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['SensitivityLabel']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SensitivityLabel']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SensitivityLabel']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Deletes the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @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 _deleteMethod(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, 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.'); + } + let sensitivityLabelSource = 'current'; + let apiVersion = '2018-06-01-preview'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (managedInstanceName === null || managedInstanceName === undefined || typeof managedInstanceName.valueOf() !== 'string') { + throw new Error('managedInstanceName cannot be null or undefined and it must be of type string.'); + } + 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 (schemaName === null || schemaName === undefined || typeof schemaName.valueOf() !== 'string') { + throw new Error('schemaName cannot be null or undefined and it must be of type string.'); + } + if (tableName === null || tableName === undefined || typeof tableName.valueOf() !== 'string') { + throw new Error('tableName cannot be null or undefined and it must be of type string.'); + } + if (columnName === null || columnName === undefined || typeof columnName.valueOf() !== 'string') { + throw new Error('columnName 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.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/schemas/{schemaName}/tables/{tableName}/columns/{columnName}/sensitivityLabels/{sensitivityLabelSource}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); + requestUrl = requestUrl.replace('{schemaName}', encodeURIComponent(schemaName)); + requestUrl = requestUrl.replace('{tableName}', encodeURIComponent(tableName)); + requestUrl = requestUrl.replace('{columnName}', encodeURIComponent(columnName)); + requestUrl = requestUrl.replace('{sensitivityLabelSource}', encodeURIComponent(sensitivityLabelSource)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets the sensitivity labels of a given 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * + * @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 SensitivityLabelListResult} 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 _listCurrentByDatabase(resourceGroupName, managedInstanceName, databaseName, 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.'); + } + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let apiVersion = '2018-06-01-preview'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (managedInstanceName === null || managedInstanceName === undefined || typeof managedInstanceName.valueOf() !== 'string') { + throw new Error('managedInstanceName cannot be null or undefined and it must be of type string.'); + } + 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter 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.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/currentSensitivityLabels'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SensitivityLabelListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets the sensitivity labels of a given 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * + * @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 SensitivityLabelListResult} 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 _listRecommendedByDatabase(resourceGroupName, managedInstanceName, databaseName, 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.'); + } + let skipToken = (options && options.skipToken !== undefined) ? options.skipToken : undefined; + let filter = (options && options.filter !== undefined) ? options.filter : undefined; + let apiVersion = '2018-06-01-preview'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (managedInstanceName === null || managedInstanceName === undefined || typeof managedInstanceName.valueOf() !== 'string') { + throw new Error('managedInstanceName cannot be null or undefined and it must be of type string.'); + } + 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 (skipToken !== null && skipToken !== undefined && typeof skipToken.valueOf() !== 'string') { + throw new Error('skipToken must be of type string.'); + } + if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { + throw new Error('filter 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.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/recommendedSensitivityLabels'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + if (skipToken !== null && skipToken !== undefined) { + queryParameters.push('$skipToken=' + encodeURIComponent(skipToken)); + } + if (filter !== null && filter !== undefined) { + queryParameters.push('$filter=' + encodeURIComponent(filter)); + } + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SensitivityLabelListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets the sensitivity labels of a given database + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @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 SensitivityLabelListResult} 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 _listCurrentByDatabaseNext(nextPageLink, 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.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SensitivityLabelListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets the sensitivity labels of a given database + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @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 SensitivityLabelListResult} 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 _listRecommendedByDatabaseNext(nextPageLink, 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.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['SensitivityLabelListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a ManagedDatabaseSensitivityLabels. */ +class ManagedDatabaseSensitivityLabels { + /** + * Create a ManagedDatabaseSensitivityLabels. + * @param {SqlManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._listCurrentByDatabase = _listCurrentByDatabase; + this._listRecommendedByDatabase = _listRecommendedByDatabase; + this._listCurrentByDatabaseNext = _listCurrentByDatabaseNext; + this._listRecommendedByDatabaseNext = _listRecommendedByDatabaseNext; + } + + /** + * Gets the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {string} sensitivityLabelSource The source of the sensitivity label. + * Possible values include: 'current', 'recommended' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {string} sensitivityLabelSource The source of the sensitivity label. + * Possible values include: 'current', 'recommended' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SensitivityLabel} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(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 SensitivityLabel} 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, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, sensitivityLabelSource, options, optionalCallback); + } + } + + /** + * Creates or updates the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {object} parameters The column sensitivity label resource. + * + * @param {string} [parameters.labelName] The label name. + * + * @param {string} [parameters.labelId] The label ID. + * + * @param {string} [parameters.informationType] The information type. + * + * @param {string} [parameters.informationTypeId] The information type ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {object} parameters The column sensitivity label resource. + * + * @param {string} [parameters.labelName] The label name. + * + * @param {string} [parameters.labelId] The label ID. + * + * @param {string} [parameters.informationType] The information type. + * + * @param {string} [parameters.informationTypeId] The information type ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SensitivityLabel} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(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 SensitivityLabel} 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. + */ + createOrUpdate(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, parameters, options, optionalCallback); + } + } + + /** + * Deletes the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the sensitivity label of a given column + * + * @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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {string} schemaName The name of the schema. + * + * @param {string} tableName The name of the table. + * + * @param {string} columnName The name of the column. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(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. + */ + deleteMethod(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, managedInstanceName, databaseName, schemaName, tableName, columnName, options, optionalCallback); + } + } + + /** + * Gets the sensitivity labels of a given 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listCurrentByDatabaseWithHttpOperationResponse(resourceGroupName, managedInstanceName, databaseName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listCurrentByDatabase(resourceGroupName, managedInstanceName, databaseName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the sensitivity labels of a given 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SensitivityLabelListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(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 SensitivityLabelListResult} 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. + */ + listCurrentByDatabase(resourceGroupName, managedInstanceName, databaseName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listCurrentByDatabase(resourceGroupName, managedInstanceName, databaseName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listCurrentByDatabase(resourceGroupName, managedInstanceName, databaseName, options, optionalCallback); + } + } + + /** + * Gets the sensitivity labels of a given 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listRecommendedByDatabaseWithHttpOperationResponse(resourceGroupName, managedInstanceName, databaseName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listRecommendedByDatabase(resourceGroupName, managedInstanceName, databaseName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the sensitivity labels of a given 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. + * + * @param {object} [options] Optional Parameters. + * + * @param {string} [options.skipToken] + * + * @param {string} [options.filter] An OData filter expression that filters + * elements in the collection. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SensitivityLabelListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(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 SensitivityLabelListResult} 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. + */ + listRecommendedByDatabase(resourceGroupName, managedInstanceName, databaseName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listRecommendedByDatabase(resourceGroupName, managedInstanceName, databaseName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listRecommendedByDatabase(resourceGroupName, managedInstanceName, databaseName, options, optionalCallback); + } + } + + /** + * Gets the sensitivity labels of a given database + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listCurrentByDatabaseNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listCurrentByDatabaseNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the sensitivity labels of a given database + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SensitivityLabelListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(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 SensitivityLabelListResult} 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. + */ + listCurrentByDatabaseNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listCurrentByDatabaseNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listCurrentByDatabaseNext(nextPageLink, options, optionalCallback); + } + } + + /** + * Gets the sensitivity labels of a given database + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listRecommendedByDatabaseNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listRecommendedByDatabaseNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the sensitivity labels of a given database + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {SensitivityLabelListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(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 SensitivityLabelListResult} 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. + */ + listRecommendedByDatabaseNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listRecommendedByDatabaseNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listRecommendedByDatabaseNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = ManagedDatabaseSensitivityLabels; diff --git a/lib/services/sqlManagement2/lib/operations/managedInstances.js b/lib/services/sqlManagement2/lib/operations/managedInstances.js index dddb9796b5..66633910ab 100644 --- a/lib/services/sqlManagement2/lib/operations/managedInstances.js +++ b/lib/services/sqlManagement2/lib/operations/managedInstances.js @@ -497,8 +497,9 @@ function _get(resourceGroupName, managedInstanceName, options, callback) { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -697,8 +698,9 @@ function _deleteMethod(resourceGroupName, managedInstanceName, options, callback * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * @@ -837,8 +839,9 @@ function _update(resourceGroupName, managedInstanceName, parameters, options, ca * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -1198,8 +1201,9 @@ function _beginDeleteMethod(resourceGroupName, managedInstanceName, options, cal * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * @@ -1954,8 +1958,9 @@ class ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -2051,8 +2056,9 @@ class ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -2251,8 +2257,9 @@ class ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * @@ -2338,8 +2345,9 @@ class ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * @@ -2455,8 +2463,9 @@ class ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -2552,8 +2561,9 @@ class ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {string} parameters.location Resource location. * @@ -2752,8 +2762,9 @@ class ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * @@ -2839,8 +2850,9 @@ class ManagedInstances { * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the * public data endpoint is enabled. * - * @param {string} [parameters.proxyOverride] Proxy override of the managed - * instance. + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' * * @param {object} [parameters.tags] Resource tags. * diff --git a/lib/services/sqlManagement2/lib/operations/sensitivityLabels.js b/lib/services/sqlManagement2/lib/operations/sensitivityLabels.js index a32c2b0614..119005b322 100644 --- a/lib/services/sqlManagement2/lib/operations/sensitivityLabels.js +++ b/lib/services/sqlManagement2/lib/operations/sensitivityLabels.js @@ -189,6 +189,8 @@ function _listCurrentByDatabase(resourceGroupName, serverName, databaseName, opt * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * * @param {string} [options.filter] An OData filter expression that filters * elements in the collection. * @@ -219,6 +221,7 @@ function _listRecommendedByDatabase(resourceGroupName, serverName, databaseName, if (!callback) { throw new Error('callback cannot be null.'); } + let skipToken = (options && options.skipToken !== undefined) ? options.skipToken : undefined; let filter = (options && options.filter !== undefined) ? options.filter : undefined; let apiVersion = '2017-03-01-preview'; // Validate @@ -232,6 +235,9 @@ function _listRecommendedByDatabase(resourceGroupName, serverName, databaseName, 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 (skipToken !== null && skipToken !== undefined && typeof skipToken.valueOf() !== 'string') { + throw new Error('skipToken must be of type string.'); + } if (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { throw new Error('filter must be of type string.'); } @@ -253,168 +259,9 @@ function _listRecommendedByDatabase(resourceGroupName, serverName, databaseName, requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); let queryParameters = []; - if (filter !== null && filter !== undefined) { - queryParameters.push('$filter=' + encodeURIComponent(filter)); - } - queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); - if (queryParameters.length > 0) { - requestUrl += '?' + queryParameters.join('&'); - } - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + if (skipToken !== null && skipToken !== undefined) { + queryParameters.push('$skipToken=' + encodeURIComponent(skipToken)); } - if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { - httpRequest.headers['accept-language'] = this.client.acceptLanguage; - } - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SensitivityLabelListResult']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - -/** - * Gets the sensitivity labels of a given 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 {string} [options.filter] An OData filter expression that filters - * elements in the collection. - * - * @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 SensitivityLabelListResult} 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) { - /* 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.'); - } - let filter = (options && options.filter !== undefined) ? options.filter : undefined; - let apiVersion = '2017-03-01-preview'; - // Validate - try { - if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { - throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); - } - if (serverName === null || serverName === undefined || typeof serverName.valueOf() !== 'string') { - throw new Error('serverName cannot be null or undefined and it must be of type string.'); - } - 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 (filter !== null && filter !== undefined && typeof filter.valueOf() !== 'string') { - throw new Error('filter 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.'); - } - if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { - throw new Error('this.client.acceptLanguage must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels'; - requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); - requestUrl = requestUrl.replace('{serverName}', encodeURIComponent(serverName)); - requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); - requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); - let queryParameters = []; if (filter !== null && filter !== undefined) { queryParameters.push('$filter=' + encodeURIComponent(filter)); } @@ -1305,134 +1152,6 @@ function _listRecommendedByDatabaseNext(nextPageLink, options, callback) { }); } -/** - * Gets the sensitivity labels of a given database - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @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 SensitivityLabelListResult} 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 _listByDatabaseNext(nextPageLink, 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.'); - } - // Validate - try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); - } - if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { - throw new Error('this.client.acceptLanguage must be of type string.'); - } - } catch (error) { - return callback(error); - } - - // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); - - // Create HTTP transport objects - let httpRequest = new WebResource(); - httpRequest.method = 'GET'; - httpRequest.url = requestUrl; - httpRequest.headers = {}; - // Set Headers - httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; - if (this.client.generateClientRequestId) { - httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); - } - if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { - httpRequest.headers['accept-language'] = this.client.acceptLanguage; - } - if(options) { - for(let headerName in options['customHeaders']) { - if (options['customHeaders'].hasOwnProperty(headerName)) { - httpRequest.headers[headerName] = options['customHeaders'][headerName]; - } - } - } - httpRequest.body = null; - // Send Request - return client.pipeline(httpRequest, (err, response, responseBody) => { - if (err) { - return callback(err); - } - let statusCode = response.statusCode; - if (statusCode !== 200) { - let error = new Error(responseBody); - error.statusCode = response.statusCode; - error.request = msRest.stripRequest(httpRequest); - error.response = msRest.stripResponse(response); - if (responseBody === '') responseBody = null; - let parsedErrorResponse; - try { - parsedErrorResponse = JSON.parse(responseBody); - if (parsedErrorResponse) { - if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; - if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; - if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; - } - if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { - let resultMapper = new client.models['CloudError']().mapper(); - error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); - } - } catch (defaultError) { - error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + - `- "${responseBody}" for the default response.`; - return callback(error); - } - return callback(error); - } - // Create Result - let result = null; - if (responseBody === '') responseBody = null; - // Deserialize Response - if (statusCode === 200) { - let parsedResponse = null; - try { - parsedResponse = JSON.parse(responseBody); - result = JSON.parse(responseBody); - if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['SensitivityLabelListResult']().mapper(); - result = client.deserialize(resultMapper, parsedResponse, 'result'); - } - } catch (error) { - let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); - deserializationError.request = msRest.stripRequest(httpRequest); - deserializationError.response = msRest.stripResponse(response); - return callback(deserializationError); - } - } - - return callback(null, result, httpRequest, response); - }); -} - /** Class representing a SensitivityLabels. */ class SensitivityLabels { /** @@ -1443,13 +1162,11 @@ class SensitivityLabels { this.client = client; this._listCurrentByDatabase = _listCurrentByDatabase; this._listRecommendedByDatabase = _listRecommendedByDatabase; - this._listByDatabase = _listByDatabase; this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; this._listCurrentByDatabaseNext = _listCurrentByDatabaseNext; this._listRecommendedByDatabaseNext = _listRecommendedByDatabaseNext; - this._listByDatabaseNext = _listByDatabaseNext; } /** @@ -1566,6 +1283,8 @@ class SensitivityLabels { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * * @param {string} [options.filter] An OData filter expression that filters * elements in the collection. * @@ -1605,6 +1324,8 @@ class SensitivityLabels { * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * * @param {string} [options.filter] An OData filter expression that filters * elements in the collection. * @@ -1654,107 +1375,6 @@ class SensitivityLabels { } } - /** - * Gets the sensitivity labels of a given 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 {string} [options.filter] An OData filter expression that filters - * elements in the collection. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - listByDatabaseWithHttpOperationResponse(resourceGroupName, serverName, databaseName, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._listByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * Gets the sensitivity labels of a given 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 {string} [options.filter] An OData filter expression that filters - * elements in the collection. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {SensitivityLabelListResult} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(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 SensitivityLabelListResult} 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. - */ - listByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback) { - let client = this.client; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._listByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._listByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback); - } - } - /** * Gets the sensitivity label of a given column * @@ -2268,91 +1888,6 @@ class SensitivityLabels { } } - /** - * Gets the sensitivity labels of a given database - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error} - The error object. - */ - listByDatabaseNextWithHttpOperationResponse(nextPageLink, options) { - let client = this.client; - let self = this; - return new Promise((resolve, reject) => { - self._listByDatabaseNext(nextPageLink, options, (err, result, request, response) => { - let httpOperationResponse = new msRest.HttpOperationResponse(request, response); - httpOperationResponse.body = result; - if (err) { reject(err); } - else { resolve(httpOperationResponse); } - return; - }); - }); - } - - /** - * Gets the sensitivity labels of a given database - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {function} [optionalCallback] - The optional callback. - * - * @returns {function|Promise} If a callback was passed as the last parameter - * then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned - * - * @resolve {SensitivityLabelListResult} - The deserialized result object. - * - * @reject {Error} - The error object. - * - * {function} optionalCallback(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 SensitivityLabelListResult} 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. - */ - listByDatabaseNext(nextPageLink, options, optionalCallback) { - let client = this.client; - let self = this; - if (!optionalCallback && typeof options === 'function') { - optionalCallback = options; - options = null; - } - if (!optionalCallback) { - return new Promise((resolve, reject) => { - self._listByDatabaseNext(nextPageLink, options, (err, result, request, response) => { - if (err) { reject(err); } - else { resolve(result); } - return; - }); - }); - } else { - return self._listByDatabaseNext(nextPageLink, options, optionalCallback); - } - } - } module.exports = SensitivityLabels; diff --git a/lib/services/sqlManagement2/lib/sqlManagementClient.d.ts b/lib/services/sqlManagement2/lib/sqlManagementClient.d.ts index 07fd537e24..fa115ecb7a 100644 --- a/lib/services/sqlManagement2/lib/sqlManagementClient.d.ts +++ b/lib/services/sqlManagement2/lib/sqlManagementClient.d.ts @@ -115,6 +115,7 @@ export default class SqlManagementClient extends AzureServiceClient { restorePoints: operations.RestorePoints; managedDatabaseSecurityAlertPolicies: operations.ManagedDatabaseSecurityAlertPolicies; managedServerSecurityAlertPolicies: operations.ManagedServerSecurityAlertPolicies; + sensitivityLabels: operations.SensitivityLabels; databaseOperations: operations.DatabaseOperations; elasticPoolOperations: operations.ElasticPoolOperations; capabilities: operations.Capabilities; @@ -131,6 +132,7 @@ export default class SqlManagementClient extends AzureServiceClient { recoverableManagedDatabases: operations.RecoverableManagedDatabases; managedInstanceVulnerabilityAssessments: operations.ManagedInstanceVulnerabilityAssessments; serverVulnerabilityAssessments: operations.ServerVulnerabilityAssessments; + managedDatabaseSensitivityLabels: operations.ManagedDatabaseSensitivityLabels; } export { SqlManagementClient, models as SqlManagementModels }; diff --git a/lib/services/sqlManagement2/lib/sqlManagementClient.js b/lib/services/sqlManagement2/lib/sqlManagementClient.js index 3e47ee0c05..546740e164 100644 --- a/lib/services/sqlManagement2/lib/sqlManagementClient.js +++ b/lib/services/sqlManagement2/lib/sqlManagementClient.js @@ -132,6 +132,7 @@ class SqlManagementClient extends ServiceClient { this.restorePoints = new operations.RestorePoints(this); this.managedDatabaseSecurityAlertPolicies = new operations.ManagedDatabaseSecurityAlertPolicies(this); this.managedServerSecurityAlertPolicies = new operations.ManagedServerSecurityAlertPolicies(this); + this.sensitivityLabels = new operations.SensitivityLabels(this); this.databaseOperations = new operations.DatabaseOperations(this); this.elasticPoolOperations = new operations.ElasticPoolOperations(this); this.capabilities = new operations.Capabilities(this); @@ -148,6 +149,7 @@ class SqlManagementClient extends ServiceClient { this.recoverableManagedDatabases = new operations.RecoverableManagedDatabases(this); this.managedInstanceVulnerabilityAssessments = new operations.ManagedInstanceVulnerabilityAssessments(this); this.serverVulnerabilityAssessments = new operations.ServerVulnerabilityAssessments(this); + this.managedDatabaseSensitivityLabels = new operations.ManagedDatabaseSensitivityLabels(this); this.models = models; msRest.addSerializationMixin(this); }