diff --git a/lib/services/sqlManagement2/LICENSE.txt b/lib/services/sqlManagement2/LICENSE.txt index 5431ba98b9..8f3d856145 100644 --- a/lib/services/sqlManagement2/LICENSE.txt +++ b/lib/services/sqlManagement2/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +Copyright (c) 2019 Microsoft Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/lib/services/sqlManagement2/README.md b/lib/services/sqlManagement2/README.md index 9083240548..5016fe28cf 100644 --- a/lib/services/sqlManagement2/README.md +++ b/lib/services/sqlManagement2/README.md @@ -3,41 +3,44 @@ uid: azure-arm-sql summary: *content --- -# Microsoft Azure SDK for Node.js - SqlManagementClient +**This SDK will be deprecated next year and will be replaced by a new TypeScript-based isomorphic SDK (found at https://github.com/Azure/azure-sdk-for-js) which works on Node.js and browsers.** +## Microsoft Azure SDK for Node.js - SqlManagementClient + This project provides a Node.js package for accessing Azure. Right now it supports: - **Node.js version 6.x.x or higher** -## Features +### Features -## How to Install +### How to Install ```bash npm install azure-arm-sql ``` -## How to use +### How to use -### Authentication, client creation and get recoverableDatabases as an example. +#### Authentication, client creation, and get recoverableDatabases as an example. ```javascript const msRestAzure = require("ms-rest-azure"); const SqlManagementClient = require("azure-arm-sql"); msRestAzure.interactiveLogin().then((creds) => { - const subscriptionId = ""; - const client = new SqlManagementClient(creds, subscriptionId); - const resourceGroupName = "testresourceGroupName"; - const serverName = "testserverName"; - const databaseName = "testdatabaseName"; - return client.recoverableDatabases.get(resourceGroupName, serverName, databaseName).then((result) => { - console.log("The result is:"); - console.log(result); - }); + const subscriptionId = ""; + const client = new SqlManagementClient(creds, subscriptionId); + const resourceGroupName = "testresourceGroupName"; + const serverName = "testserverName"; + const databaseName = "testdatabaseName"; + + return client.recoverableDatabases.get(resourceGroupName, serverName, databaseName).then((result) => { + console.log("The result is:"); + console.log(result); + }); }).catch((err) => { console.log('An error occurred:'); console.dir(err, {depth: null, colors: true}); }); - -## Related projects +``` +### Related projects - [Microsoft Azure SDK for Node.js](https://github.com/Azure/azure-sdk-for-node) diff --git a/lib/services/sqlManagement2/lib/models/automaticTuningOptions.js b/lib/services/sqlManagement2/lib/models/automaticTuningOptions.js index cc8a4107e0..a9ea3e6f49 100644 --- a/lib/services/sqlManagement2/lib/models/automaticTuningOptions.js +++ b/lib/services/sqlManagement2/lib/models/automaticTuningOptions.js @@ -17,13 +17,13 @@ class AutomaticTuningOptions { /** * Create a AutomaticTuningOptions. - * @member {string} [desiredState] Automatic tuning option desired state. + * @property {string} [desiredState] Automatic tuning option desired state. * Possible values include: 'Off', 'On', 'Default' - * @member {string} [actualState] Automatic tuning option actual state. + * @property {string} [actualState] Automatic tuning option actual state. * Possible values include: 'Off', 'On' - * @member {number} [reasonCode] Reason code if desired and actual state are - * different. - * @member {string} [reasonDesc] Reason description if desired and actual + * @property {number} [reasonCode] Reason code if desired and actual state + * are different. + * @property {string} [reasonDesc] Reason description if desired and actual * state are different. Possible values include: 'Default', 'Disabled', * 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', * 'QueryStoreReadOnly', 'NotSupported' diff --git a/lib/services/sqlManagement2/lib/models/automaticTuningServerOptions.js b/lib/services/sqlManagement2/lib/models/automaticTuningServerOptions.js index 139c420e84..6dd25a26c7 100644 --- a/lib/services/sqlManagement2/lib/models/automaticTuningServerOptions.js +++ b/lib/services/sqlManagement2/lib/models/automaticTuningServerOptions.js @@ -17,13 +17,13 @@ class AutomaticTuningServerOptions { /** * Create a AutomaticTuningServerOptions. - * @member {string} [desiredState] Automatic tuning option desired state. + * @property {string} [desiredState] Automatic tuning option desired state. * Possible values include: 'Off', 'On', 'Default' - * @member {string} [actualState] Automatic tuning option actual state. + * @property {string} [actualState] Automatic tuning option actual state. * Possible values include: 'Off', 'On' - * @member {number} [reasonCode] Reason code if desired and actual state are - * different. - * @member {string} [reasonDesc] Reason description if desired and actual + * @property {number} [reasonCode] Reason code if desired and actual state + * are different. + * @property {string} [reasonDesc] Reason description if desired and actual * state are different. Possible values include: 'Default', 'Disabled', * 'AutoConfigured' */ diff --git a/lib/services/sqlManagement2/lib/models/backupLongTermRetentionPolicy.js b/lib/services/sqlManagement2/lib/models/backupLongTermRetentionPolicy.js index 7eb9cd128c..4c5042bd1c 100644 --- a/lib/services/sqlManagement2/lib/models/backupLongTermRetentionPolicy.js +++ b/lib/services/sqlManagement2/lib/models/backupLongTermRetentionPolicy.js @@ -20,13 +20,13 @@ const models = require('./index'); class BackupLongTermRetentionPolicy extends models['ProxyResource'] { /** * Create a BackupLongTermRetentionPolicy. - * @member {string} [weeklyRetention] The weekly retention policy for an LTR - * backup in an ISO 8601 format. - * @member {string} [monthlyRetention] The monthly retention policy for an + * @property {string} [weeklyRetention] The weekly retention policy for an * LTR backup in an ISO 8601 format. - * @member {string} [yearlyRetention] The yearly retention policy for an LTR - * backup in an ISO 8601 format. - * @member {number} [weekOfYear] The week of year to take the yearly backup + * @property {string} [monthlyRetention] The monthly retention policy for an + * LTR backup in an ISO 8601 format. + * @property {string} [yearlyRetention] The yearly retention policy for an + * LTR backup in an ISO 8601 format. + * @property {number} [weekOfYear] The week of year to take the yearly backup * in an ISO 8601 format. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/backupShortTermRetentionPolicy.js b/lib/services/sqlManagement2/lib/models/backupShortTermRetentionPolicy.js index 1cad08c8c8..02af78013a 100644 --- a/lib/services/sqlManagement2/lib/models/backupShortTermRetentionPolicy.js +++ b/lib/services/sqlManagement2/lib/models/backupShortTermRetentionPolicy.js @@ -20,8 +20,8 @@ const models = require('./index'); class BackupShortTermRetentionPolicy extends models['ProxyResource'] { /** * Create a BackupShortTermRetentionPolicy. - * @member {number} [retentionDays] The backup retention period in days. This - * is how many days Point-in-Time Restore will be supported. + * @property {number} [retentionDays] The backup retention period in days. + * This is how many days Point-in-Time Restore will be supported. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/backupShortTermRetentionPolicyListResult.js b/lib/services/sqlManagement2/lib/models/backupShortTermRetentionPolicyListResult.js index e373fcff28..6802488f39 100644 --- a/lib/services/sqlManagement2/lib/models/backupShortTermRetentionPolicyListResult.js +++ b/lib/services/sqlManagement2/lib/models/backupShortTermRetentionPolicyListResult.js @@ -16,7 +16,7 @@ class BackupShortTermRetentionPolicyListResult extends Array { /** * Create a BackupShortTermRetentionPolicyListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/checkNameAvailabilityRequest.js b/lib/services/sqlManagement2/lib/models/checkNameAvailabilityRequest.js index 7f4a0ea255..14f4260bfd 100644 --- a/lib/services/sqlManagement2/lib/models/checkNameAvailabilityRequest.js +++ b/lib/services/sqlManagement2/lib/models/checkNameAvailabilityRequest.js @@ -17,7 +17,7 @@ class CheckNameAvailabilityRequest { /** * Create a CheckNameAvailabilityRequest. - * @member {string} name The name whose availability is to be checked. + * @property {string} name The name whose availability is to be checked. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/checkNameAvailabilityResponse.js b/lib/services/sqlManagement2/lib/models/checkNameAvailabilityResponse.js index 809bc5094e..3478737e0a 100644 --- a/lib/services/sqlManagement2/lib/models/checkNameAvailabilityResponse.js +++ b/lib/services/sqlManagement2/lib/models/checkNameAvailabilityResponse.js @@ -18,12 +18,12 @@ class CheckNameAvailabilityResponse { /** * Create a CheckNameAvailabilityResponse. - * @member {boolean} [available] True if the name is available, otherwise + * @property {boolean} [available] True if the name is available, otherwise * false. - * @member {string} [message] A message explaining why the name is + * @property {string} [message] A message explaining why the name is * unavailable. Will be null if the name is available. - * @member {string} [name] The name whose availability was checked. - * @member {string} [reason] The reason code explaining why the name is + * @property {string} [name] The name whose availability was checked. + * @property {string} [reason] The reason code explaining why the name is * unavailable. Will be null if the name is available. Possible values * include: 'Invalid', 'AlreadyExists' */ diff --git a/lib/services/sqlManagement2/lib/models/completeDatabaseRestoreDefinition.js b/lib/services/sqlManagement2/lib/models/completeDatabaseRestoreDefinition.js index 65d3fbb01b..af16949c5e 100644 --- a/lib/services/sqlManagement2/lib/models/completeDatabaseRestoreDefinition.js +++ b/lib/services/sqlManagement2/lib/models/completeDatabaseRestoreDefinition.js @@ -18,7 +18,7 @@ class CompleteDatabaseRestoreDefinition { /** * Create a CompleteDatabaseRestoreDefinition. - * @member {string} lastBackupName The last backup name to apply + * @property {string} lastBackupName The last backup name to apply */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/createDatabaseRestorePointDefinition.js b/lib/services/sqlManagement2/lib/models/createDatabaseRestorePointDefinition.js index da8769ff34..088a6fbf34 100644 --- a/lib/services/sqlManagement2/lib/models/createDatabaseRestorePointDefinition.js +++ b/lib/services/sqlManagement2/lib/models/createDatabaseRestorePointDefinition.js @@ -18,7 +18,7 @@ class CreateDatabaseRestorePointDefinition { /** * Create a CreateDatabaseRestorePointDefinition. - * @member {string} restorePointLabel The restore point label to apply + * @property {string} restorePointLabel The restore point label to apply */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/dataMaskingPolicy.js b/lib/services/sqlManagement2/lib/models/dataMaskingPolicy.js index 3c9a7edaa8..06d1b30544 100644 --- a/lib/services/sqlManagement2/lib/models/dataMaskingPolicy.js +++ b/lib/services/sqlManagement2/lib/models/dataMaskingPolicy.js @@ -20,18 +20,18 @@ const models = require('./index'); class DataMaskingPolicy extends models['ProxyResource'] { /** * Create a DataMaskingPolicy. - * @member {string} dataMaskingState The state of the data masking policy. + * @property {string} dataMaskingState The state of the data masking policy. * Possible values include: 'Disabled', 'Enabled' - * @member {string} [exemptPrincipals] The list of the exempt principals. + * @property {string} [exemptPrincipals] The list of the exempt principals. * Specifies the semicolon-separated list of database users for which the * data masking policy does not apply. The specified users receive data * results without masking for all of the database queries. - * @member {string} [applicationPrincipals] The list of the application + * @property {string} [applicationPrincipals] The list of the application * principals. This is a legacy parameter and is no longer used. - * @member {string} [maskingLevel] The masking level. This is a legacy + * @property {string} [maskingLevel] The masking level. This is a legacy * parameter and is no longer used. - * @member {string} [location] The location of the data masking policy. - * @member {string} [kind] The kind of data masking policy. Metadata, used + * @property {string} [location] The location of the data masking policy. + * @property {string} [kind] The kind of data masking policy. Metadata, used * for Azure portal. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/dataMaskingRule.js b/lib/services/sqlManagement2/lib/models/dataMaskingRule.js index b614679731..dc0b56eb13 100644 --- a/lib/services/sqlManagement2/lib/models/dataMaskingRule.js +++ b/lib/services/sqlManagement2/lib/models/dataMaskingRule.js @@ -20,42 +20,42 @@ const models = require('./index'); class DataMaskingRule extends models['ProxyResource'] { /** * Create a DataMaskingRule. - * @member {string} [dataMaskingRuleId] The rule Id. - * @member {string} [aliasName] The alias name. This is a legacy parameter + * @property {string} [dataMaskingRuleId] The rule Id. + * @property {string} [aliasName] The alias name. This is a legacy parameter * and is no longer used. - * @member {string} [ruleState] The rule state. Used to delete a rule. To + * @property {string} [ruleState] The rule state. Used to delete a rule. To * delete an existing rule, specify the schemaName, tableName, columnName, * maskingFunction, and specify ruleState as disabled. However, if the rule * doesn't already exist, the rule will be created with ruleState set to * enabled, regardless of the provided value of ruleState. Possible values * include: 'Disabled', 'Enabled' - * @member {string} schemaName The schema name on which the data masking rule + * @property {string} schemaName The schema name on which the data masking + * rule is applied. + * @property {string} tableName The table name on which the data masking rule * is applied. - * @member {string} tableName The table name on which the data masking rule - * is applied. - * @member {string} columnName The column name on which the data masking rule - * is applied. - * @member {string} maskingFunction The masking function that is used for the - * data masking rule. Possible values include: 'Default', 'CCN', 'Email', + * @property {string} columnName The column name on which the data masking + * rule is applied. + * @property {string} maskingFunction The masking function that is used for + * the data masking rule. Possible values include: 'Default', 'CCN', 'Email', * 'Number', 'SSN', 'Text' - * @member {string} [numberFrom] The numberFrom property of the masking rule. - * Required if maskingFunction is set to Number, otherwise this parameter - * will be ignored. - * @member {string} [numberTo] The numberTo property of the data masking + * @property {string} [numberFrom] The numberFrom property of the masking + * rule. Required if maskingFunction is set to Number, otherwise this + * parameter will be ignored. + * @property {string} [numberTo] The numberTo property of the data masking * rule. Required if maskingFunction is set to Number, otherwise this * parameter will be ignored. - * @member {string} [prefixSize] If maskingFunction is set to Text, the + * @property {string} [prefixSize] If maskingFunction is set to Text, the * number of characters to show unmasked in the beginning of the string. * Otherwise, this parameter will be ignored. - * @member {string} [suffixSize] If maskingFunction is set to Text, the + * @property {string} [suffixSize] If maskingFunction is set to Text, the * number of characters to show unmasked at the end of the string. Otherwise, * this parameter will be ignored. - * @member {string} [replacementString] If maskingFunction is set to Text, + * @property {string} [replacementString] If maskingFunction is set to Text, * the character to use for masking the unexposed part of the string. * Otherwise, this parameter will be ignored. - * @member {string} [location] The location of the data masking rule. - * @member {string} [kind] The kind of Data Masking Rule. Metadata, used for - * Azure portal. + * @property {string} [location] The location of the data masking rule. + * @property {string} [kind] The kind of Data Masking Rule. Metadata, used + * for Azure portal. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/database.js b/lib/services/sqlManagement2/lib/models/database.js index 7ec6a4ab28..017023e5db 100644 --- a/lib/services/sqlManagement2/lib/models/database.js +++ b/lib/services/sqlManagement2/lib/models/database.js @@ -20,24 +20,24 @@ const models = require('./index'); class Database extends models['TrackedResource'] { /** * Create a Database. - * @member {object} [sku] The name and tier of the SKU. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically - * a letter+number code - * @member {string} [sku.tier] This field is required to be implemented by + * @property {object} [sku] The name and tier of the SKU. + * @property {string} [sku.name] The name of the SKU. Ex - P3. It is + * typically a letter+number code + * @property {string} [sku.tier] This field is required to be implemented by * the Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the + * @property {string} [sku.size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {string} [kind] Kind of database. This is metadata used for the + * @property {string} [sku.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * @property {number} [sku.capacity] If the SKU supports scale out/in then + * the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + * @property {string} [kind] Kind of database. This is metadata used for the * Azure portal experience. - * @member {string} [managedBy] Resource that manages the database. - * @member {string} [createMode] Specifies the mode of database creation. + * @property {string} [managedBy] Resource that manages the database. + * @property {string} [createMode] Specifies the mode of database creation. * * Default: regular database creation. * @@ -74,74 +74,76 @@ class Database extends models['TrackedResource'] { * 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', * 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', * 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - * @member {string} [collation] The collation of the database. - * @member {number} [maxSizeBytes] The max size of the database expressed in - * bytes. - * @member {string} [sampleName] The name of the sample schema to apply when - * creating this database. Possible values include: 'AdventureWorksLT', + * @property {string} [collation] The collation of the database. + * @property {number} [maxSizeBytes] The max size of the database expressed + * in bytes. + * @property {string} [sampleName] The name of the sample schema to apply + * when creating this database. Possible values include: 'AdventureWorksLT', * 'WideWorldImportersStd', 'WideWorldImportersFull' - * @member {string} [elasticPoolId] The resource identifier of the elastic + * @property {string} [elasticPoolId] The resource identifier of the elastic * pool containing this database. - * @member {string} [sourceDatabaseId] The resource identifier of the source - * database associated with create operation of this database. - * @member {string} [status] The status of the database. Possible values + * @property {string} [sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. + * @property {string} [status] The status of the database. Possible values * include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', * 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', * 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', * 'Pausing', 'Paused', 'Resuming', 'Scaling' - * @member {uuid} [databaseId] The ID of the database. - * @member {date} [creationDate] The creation date of the database (ISO8601 + * @property {uuid} [databaseId] The ID of the database. + * @property {date} [creationDate] The creation date of the database (ISO8601 * format). - * @member {string} [currentServiceObjectiveName] The current service level + * @property {string} [currentServiceObjectiveName] The current service level * objective name of the database. - * @member {string} [requestedServiceObjectiveName] The requested service + * @property {string} [requestedServiceObjectiveName] The requested service * level objective name of the database. - * @member {string} [defaultSecondaryLocation] The default secondary region + * @property {string} [defaultSecondaryLocation] The default secondary region * for this database. - * @member {string} [failoverGroupId] Failover Group resource identifier that - * this database belongs to. - * @member {date} [restorePointInTime] Specifies the point in time (ISO8601 + * @property {string} [failoverGroupId] Failover Group resource identifier + * that this database belongs to. + * @property {date} [restorePointInTime] Specifies the point in time (ISO8601 * format) of the source database that will be restored to create the new * database. - * @member {date} [sourceDatabaseDeletionDate] Specifies the time that the + * @property {date} [sourceDatabaseDeletionDate] Specifies the time that the * database was deleted. - * @member {string} [recoveryServicesRecoveryPointId] The resource identifier - * of the recovery point associated with create operation of this database. - * @member {string} [longTermRetentionBackupResourceId] The resource + * @property {string} [recoveryServicesRecoveryPointId] The resource + * identifier of the recovery point associated with create operation of this + * database. + * @property {string} [longTermRetentionBackupResourceId] The resource * identifier of the long term retention backup associated with create * operation of this database. - * @member {string} [recoverableDatabaseId] The resource identifier of the + * @property {string} [recoverableDatabaseId] The resource identifier of the * recoverable database associated with create operation of this database. - * @member {string} [restorableDroppedDatabaseId] The resource identifier of - * the restorable dropped database associated with create operation of this - * database. - * @member {string} [catalogCollation] Collation of the metadata catalog. + * @property {string} [restorableDroppedDatabaseId] The resource identifier + * of the restorable dropped database associated with create operation of + * this database. + * @property {string} [catalogCollation] Collation of the metadata catalog. * Possible values include: 'DATABASE_DEFAULT', * 'SQL_Latin1_General_CP1_CI_AS' - * @member {boolean} [zoneRedundant] Whether or not this database is zone + * @property {boolean} [zoneRedundant] Whether or not this database is zone * redundant, which means the replicas of this database will be spread across * multiple availability zones. - * @member {string} [licenseType] The license type to apply for this + * @property {string} [licenseType] The license type to apply for this * database. Possible values include: 'LicenseIncluded', 'BasePrice' - * @member {number} [maxLogSizeBytes] The max log size for this database. - * @member {date} [earliestRestoreDate] This records the earliest start date - * and time that restore is available for this database (ISO8601 format). - * @member {string} [readScale] The state of read-only routing. If enabled, + * @property {number} [maxLogSizeBytes] The max log size for this database. + * @property {date} [earliestRestoreDate] This records the earliest start + * date and time that restore is available for this database (ISO8601 + * format). + * @property {string} [readScale] The state of read-only routing. If enabled, * connections that have application intent set to readonly in their * connection string may be routed to a readonly secondary replica in the * same region. Possible values include: 'Enabled', 'Disabled' - * @member {object} [currentSku] The name and tier of the SKU. - * @member {string} [currentSku.name] The name of the SKU. Ex - P3. It is + * @property {object} [currentSku] The name and tier of the SKU. + * @property {string} [currentSku.name] The name of the SKU. Ex - P3. It is * typically a letter+number code - * @member {string} [currentSku.tier] This field is required to be + * @property {string} [currentSku.tier] This field is required to be * implemented by the Resource Provider if the service has more than one * tier, but is not required on a PUT. - * @member {string} [currentSku.size] The SKU size. When the name field is + * @property {string} [currentSku.size] The SKU size. When the name field is * the combination of tier and some other value, this would be the standalone * code. - * @member {string} [currentSku.family] If the service has different + * @property {string} [currentSku.family] If the service has different * generations of hardware, for the same SKU, then that can be captured here. - * @member {number} [currentSku.capacity] If the SKU supports scale out/in + * @property {number} [currentSku.capacity] If the SKU supports scale out/in * then the capacity integer should be included. If scale out/in is not * possible for the resource this may be omitted. */ diff --git a/lib/services/sqlManagement2/lib/models/databaseAutomaticTuning.js b/lib/services/sqlManagement2/lib/models/databaseAutomaticTuning.js index c8e4237526..005b702887 100644 --- a/lib/services/sqlManagement2/lib/models/databaseAutomaticTuning.js +++ b/lib/services/sqlManagement2/lib/models/databaseAutomaticTuning.js @@ -20,11 +20,11 @@ const models = require('./index'); class DatabaseAutomaticTuning extends models['ProxyResource'] { /** * Create a DatabaseAutomaticTuning. - * @member {string} [desiredState] Automatic tuning desired state. Possible + * @property {string} [desiredState] Automatic tuning desired state. Possible * values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - * @member {string} [actualState] Automatic tuning actual state. Possible + * @property {string} [actualState] Automatic tuning actual state. Possible * values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - * @member {object} [options] Automatic tuning options definition. + * @property {object} [options] Automatic tuning options definition. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/databaseBlobAuditingPolicy.js b/lib/services/sqlManagement2/lib/models/databaseBlobAuditingPolicy.js index 8aa7fdbf10..508446e8d4 100644 --- a/lib/services/sqlManagement2/lib/models/databaseBlobAuditingPolicy.js +++ b/lib/services/sqlManagement2/lib/models/databaseBlobAuditingPolicy.js @@ -20,19 +20,19 @@ const models = require('./index'); class DatabaseBlobAuditingPolicy extends models['ProxyResource'] { /** * Create a DatabaseBlobAuditingPolicy. - * @member {string} [kind] Resource kind. - * @member {string} state Specifies the state of the policy. If state is + * @property {string} [kind] Resource kind. + * @property {string} state Specifies the state of the policy. If state is * Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. * Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * @property {string} [storageEndpoint] Specifies the blob storage endpoint * (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, * storageEndpoint is required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the auditing storage account. If state is Enabled and storageEndpoint is - * specified, storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the auditing storage account. If state is Enabled and storageEndpoint + * is specified, storageAccountAccessKey is required. + * @property {number} [retentionDays] Specifies the number of days to keep in * the audit logs in the storage account. - * @member {array} [auditActionsAndGroups] Specifies the Actions-Groups and + * @property {array} [auditActionsAndGroups] Specifies the Actions-Groups and * Actions to audit. * * The recommended set of action groups to use is the following combination - @@ -104,11 +104,11 @@ class DatabaseBlobAuditingPolicy extends models['ProxyResource'] { * * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - * @member {uuid} [storageAccountSubscriptionId] Specifies the blob storage + * @property {uuid} [storageAccountSubscriptionId] Specifies the blob storage * subscription Id. - * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether + * @property {boolean} [isStorageSecondaryKeyInUse] Specifies whether * storageAccountAccessKey value is the storage's secondary key. - * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit + * @property {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit * events are sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' * and 'IsAzureMonitorTargetEnabled' as true. diff --git a/lib/services/sqlManagement2/lib/models/databaseListResult.js b/lib/services/sqlManagement2/lib/models/databaseListResult.js index 7e34d7100c..e11db42dd6 100644 --- a/lib/services/sqlManagement2/lib/models/databaseListResult.js +++ b/lib/services/sqlManagement2/lib/models/databaseListResult.js @@ -16,7 +16,7 @@ class DatabaseListResult extends Array { /** * Create a DatabaseListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/databaseOperation.js b/lib/services/sqlManagement2/lib/models/databaseOperation.js index f38745c1c9..65706485f7 100644 --- a/lib/services/sqlManagement2/lib/models/databaseOperation.js +++ b/lib/services/sqlManagement2/lib/models/databaseOperation.js @@ -20,25 +20,27 @@ const models = require('./index'); class DatabaseOperation extends models['ProxyResource'] { /** * Create a DatabaseOperation. - * @member {string} [databaseName] The name of the database the operation is - * being performed on. - * @member {string} [operation] The name of operation. - * @member {string} [operationFriendlyName] The friendly name of operation. - * @member {number} [percentComplete] The percentage of the operation + * @property {string} [databaseName] The name of the database the operation + * is being performed on. + * @property {string} [operation] The name of operation. + * @property {string} [operationFriendlyName] The friendly name of operation. + * @property {number} [percentComplete] The percentage of the operation * completed. - * @member {string} [serverName] The name of the server. - * @member {date} [startTime] The operation start time. - * @member {string} [state] The operation state. Possible values include: + * @property {string} [serverName] The name of the server. + * @property {date} [startTime] The operation start time. + * @property {string} [state] The operation state. Possible values include: * 'Pending', 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', * 'Cancelled' - * @member {number} [errorCode] The operation error code. - * @member {string} [errorDescription] The operation error description. - * @member {number} [errorSeverity] The operation error severity. - * @member {boolean} [isUserError] Whether or not the error is a user error. - * @member {date} [estimatedCompletionTime] The estimated completion time of - * the operation. - * @member {string} [description] The operation description. - * @member {boolean} [isCancellable] Whether the operation can be cancelled. + * @property {number} [errorCode] The operation error code. + * @property {string} [errorDescription] The operation error description. + * @property {number} [errorSeverity] The operation error severity. + * @property {boolean} [isUserError] Whether or not the error is a user + * error. + * @property {date} [estimatedCompletionTime] The estimated completion time + * of the operation. + * @property {string} [description] The operation description. + * @property {boolean} [isCancellable] Whether the operation can be + * cancelled. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/databaseOperationListResult.js b/lib/services/sqlManagement2/lib/models/databaseOperationListResult.js index 691af26f28..d73553bd61 100644 --- a/lib/services/sqlManagement2/lib/models/databaseOperationListResult.js +++ b/lib/services/sqlManagement2/lib/models/databaseOperationListResult.js @@ -16,7 +16,7 @@ class DatabaseOperationListResult extends Array { /** * Create a DatabaseOperationListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/databaseSecurityAlertPolicy.js b/lib/services/sqlManagement2/lib/models/databaseSecurityAlertPolicy.js index fa640a2222..481dbc1218 100644 --- a/lib/services/sqlManagement2/lib/models/databaseSecurityAlertPolicy.js +++ b/lib/services/sqlManagement2/lib/models/databaseSecurityAlertPolicy.js @@ -20,29 +20,30 @@ const models = require('./index'); class DatabaseSecurityAlertPolicy extends models['ProxyResource'] { /** * Create a DatabaseSecurityAlertPolicy. - * @member {string} [location] The geo-location where the resource lives - * @member {string} [kind] Resource kind. - * @member {string} state Specifies the state of the policy. If state is + * @property {string} [location] The geo-location where the resource lives + * @property {string} [kind] Resource kind. + * @property {string} state Specifies the state of the policy. If state is * Enabled, storageEndpoint and storageAccountAccessKey are required. * Possible values include: 'New', 'Enabled', 'Disabled' - * @member {string} [disabledAlerts] Specifies the semicolon-separated list + * @property {string} [disabledAlerts] Specifies the semicolon-separated list * of alerts that are disabled, or empty string to disable no alerts. * Possible values: Sql_Injection; Sql_Injection_Vulnerability; * Access_Anomaly; Data_Exfiltration; Unsafe_Action. - * @member {string} [emailAddresses] Specifies the semicolon-separated list + * @property {string} [emailAddresses] Specifies the semicolon-separated list * of e-mail addresses to which the alert is sent. - * @member {string} [emailAccountAdmins] Specifies that the alert is sent to - * the account administrators. Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * @property {string} [emailAccountAdmins] Specifies that the alert is sent + * to the account administrators. Possible values include: 'Enabled', + * 'Disabled' + * @property {string} [storageEndpoint] Specifies the blob storage endpoint * (e.g. https://MyAccount.blob.core.windows.net). This blob storage will * hold all Threat Detection audit logs. If state is Enabled, storageEndpoint * is required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the Threat Detection audit storage account. If state is Enabled, + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the Threat Detection audit storage account. If state is Enabled, * storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in + * @property {number} [retentionDays] Specifies the number of days to keep in * the Threat Detection audit logs. - * @member {string} [useServerDefault] Specifies whether to use the default + * @property {string} [useServerDefault] Specifies whether to use the default * server policy. Possible values include: 'Enabled', 'Disabled' */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/databaseUpdate.js b/lib/services/sqlManagement2/lib/models/databaseUpdate.js index 0f939e0ed1..a6990c3577 100644 --- a/lib/services/sqlManagement2/lib/models/databaseUpdate.js +++ b/lib/services/sqlManagement2/lib/models/databaseUpdate.js @@ -17,21 +17,21 @@ class DatabaseUpdate { /** * Create a DatabaseUpdate. - * @member {object} [sku] The name and tier of the SKU. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically - * a letter+number code - * @member {string} [sku.tier] This field is required to be implemented by + * @property {object} [sku] The name and tier of the SKU. + * @property {string} [sku.name] The name of the SKU. Ex - P3. It is + * typically a letter+number code + * @property {string} [sku.tier] This field is required to be implemented by * the Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the + * @property {string} [sku.size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {string} [createMode] Specifies the mode of database creation. + * @property {string} [sku.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * @property {number} [sku.capacity] If the SKU supports scale out/in then + * the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + * @property {string} [createMode] Specifies the mode of database creation. * * Default: regular database creation. * @@ -68,77 +68,79 @@ class DatabaseUpdate { * 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', * 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', * 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - * @member {string} [collation] The collation of the database. - * @member {number} [maxSizeBytes] The max size of the database expressed in - * bytes. - * @member {string} [sampleName] The name of the sample schema to apply when - * creating this database. Possible values include: 'AdventureWorksLT', + * @property {string} [collation] The collation of the database. + * @property {number} [maxSizeBytes] The max size of the database expressed + * in bytes. + * @property {string} [sampleName] The name of the sample schema to apply + * when creating this database. Possible values include: 'AdventureWorksLT', * 'WideWorldImportersStd', 'WideWorldImportersFull' - * @member {string} [elasticPoolId] The resource identifier of the elastic + * @property {string} [elasticPoolId] The resource identifier of the elastic * pool containing this database. - * @member {string} [sourceDatabaseId] The resource identifier of the source - * database associated with create operation of this database. - * @member {string} [status] The status of the database. Possible values + * @property {string} [sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. + * @property {string} [status] The status of the database. Possible values * include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', * 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', * 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', * 'Pausing', 'Paused', 'Resuming', 'Scaling' - * @member {uuid} [databaseId] The ID of the database. - * @member {date} [creationDate] The creation date of the database (ISO8601 + * @property {uuid} [databaseId] The ID of the database. + * @property {date} [creationDate] The creation date of the database (ISO8601 * format). - * @member {string} [currentServiceObjectiveName] The current service level + * @property {string} [currentServiceObjectiveName] The current service level * objective name of the database. - * @member {string} [requestedServiceObjectiveName] The requested service + * @property {string} [requestedServiceObjectiveName] The requested service * level objective name of the database. - * @member {string} [defaultSecondaryLocation] The default secondary region + * @property {string} [defaultSecondaryLocation] The default secondary region * for this database. - * @member {string} [failoverGroupId] Failover Group resource identifier that - * this database belongs to. - * @member {date} [restorePointInTime] Specifies the point in time (ISO8601 + * @property {string} [failoverGroupId] Failover Group resource identifier + * that this database belongs to. + * @property {date} [restorePointInTime] Specifies the point in time (ISO8601 * format) of the source database that will be restored to create the new * database. - * @member {date} [sourceDatabaseDeletionDate] Specifies the time that the + * @property {date} [sourceDatabaseDeletionDate] Specifies the time that the * database was deleted. - * @member {string} [recoveryServicesRecoveryPointId] The resource identifier - * of the recovery point associated with create operation of this database. - * @member {string} [longTermRetentionBackupResourceId] The resource + * @property {string} [recoveryServicesRecoveryPointId] The resource + * identifier of the recovery point associated with create operation of this + * database. + * @property {string} [longTermRetentionBackupResourceId] The resource * identifier of the long term retention backup associated with create * operation of this database. - * @member {string} [recoverableDatabaseId] The resource identifier of the + * @property {string} [recoverableDatabaseId] The resource identifier of the * recoverable database associated with create operation of this database. - * @member {string} [restorableDroppedDatabaseId] The resource identifier of - * the restorable dropped database associated with create operation of this - * database. - * @member {string} [catalogCollation] Collation of the metadata catalog. + * @property {string} [restorableDroppedDatabaseId] The resource identifier + * of the restorable dropped database associated with create operation of + * this database. + * @property {string} [catalogCollation] Collation of the metadata catalog. * Possible values include: 'DATABASE_DEFAULT', * 'SQL_Latin1_General_CP1_CI_AS' - * @member {boolean} [zoneRedundant] Whether or not this database is zone + * @property {boolean} [zoneRedundant] Whether or not this database is zone * redundant, which means the replicas of this database will be spread across * multiple availability zones. - * @member {string} [licenseType] The license type to apply for this + * @property {string} [licenseType] The license type to apply for this * database. Possible values include: 'LicenseIncluded', 'BasePrice' - * @member {number} [maxLogSizeBytes] The max log size for this database. - * @member {date} [earliestRestoreDate] This records the earliest start date - * and time that restore is available for this database (ISO8601 format). - * @member {string} [readScale] The state of read-only routing. If enabled, + * @property {number} [maxLogSizeBytes] The max log size for this database. + * @property {date} [earliestRestoreDate] This records the earliest start + * date and time that restore is available for this database (ISO8601 + * format). + * @property {string} [readScale] The state of read-only routing. If enabled, * connections that have application intent set to readonly in their * connection string may be routed to a readonly secondary replica in the * same region. Possible values include: 'Enabled', 'Disabled' - * @member {object} [currentSku] The name and tier of the SKU. - * @member {string} [currentSku.name] The name of the SKU. Ex - P3. It is + * @property {object} [currentSku] The name and tier of the SKU. + * @property {string} [currentSku.name] The name of the SKU. Ex - P3. It is * typically a letter+number code - * @member {string} [currentSku.tier] This field is required to be + * @property {string} [currentSku.tier] This field is required to be * implemented by the Resource Provider if the service has more than one * tier, but is not required on a PUT. - * @member {string} [currentSku.size] The SKU size. When the name field is + * @property {string} [currentSku.size] The SKU size. When the name field is * the combination of tier and some other value, this would be the standalone * code. - * @member {string} [currentSku.family] If the service has different + * @property {string} [currentSku.family] If the service has different * generations of hardware, for the same SKU, then that can be captured here. - * @member {number} [currentSku.capacity] If the SKU supports scale out/in + * @property {number} [currentSku.capacity] If the SKU supports scale out/in * then the capacity integer should be included. If scale out/in is not * possible for the resource this may be omitted. - * @member {object} [tags] Resource tags. + * @property {object} [tags] Resource tags. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/databaseUsage.js b/lib/services/sqlManagement2/lib/models/databaseUsage.js index 39145ae398..76ff2c4b57 100644 --- a/lib/services/sqlManagement2/lib/models/databaseUsage.js +++ b/lib/services/sqlManagement2/lib/models/databaseUsage.js @@ -17,13 +17,13 @@ class DatabaseUsage { /** * Create a DatabaseUsage. - * @member {string} [name] The name of the usage metric. - * @member {string} [resourceName] The name of the resource. - * @member {string} [displayName] The usage metric display name. - * @member {number} [currentValue] The current value of the usage metric. - * @member {number} [limit] The current limit of the usage metric. - * @member {string} [unit] The units of the usage metric. - * @member {date} [nextResetTime] The next reset time for the usage metric + * @property {string} [name] The name of the usage metric. + * @property {string} [resourceName] The name of the resource. + * @property {string} [displayName] The usage metric display name. + * @property {number} [currentValue] The current value of the usage metric. + * @property {number} [limit] The current limit of the usage metric. + * @property {string} [unit] The units of the usage metric. + * @property {date} [nextResetTime] The next reset time for the usage metric * (ISO8601 format). */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessment.js b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessment.js index 9ec9b0bde6..fcba9f74db 100644 --- a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessment.js +++ b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessment.js @@ -20,24 +20,24 @@ const models = require('./index'); class DatabaseVulnerabilityAssessment extends models['ProxyResource'] { /** * Create a DatabaseVulnerabilityAssessment. - * @member {string} [storageContainerPath] A blob storage container path to + * @property {string} [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 - * @member {string} [storageContainerSasKey] A shared access signature (SAS + * @property {string} [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. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the storage account for vulnerability assessment scan results. If + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the storage account for vulnerability assessment scan results. If * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is * required. - * @member {object} [recurringScans] The recurring scans settings - * @member {boolean} [recurringScans.isEnabled] Recurring scans state. - * @member {boolean} [recurringScans.emailSubscriptionAdmins] Specifies that - * the schedule scan notification will be is sent to the subscription + * @property {object} [recurringScans] The recurring scans settings + * @property {boolean} [recurringScans.isEnabled] Recurring scans state. + * @property {boolean} [recurringScans.emailSubscriptionAdmins] Specifies + * that the schedule scan notification will be is sent to the subscription * administrators. - * @member {array} [recurringScans.emails] Specifies an array of e-mail + * @property {array} [recurringScans.emails] Specifies an array of e-mail * addresses to which the scan notification is sent. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentListResult.js b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentListResult.js index 9ecd67425f..2018818ddf 100644 --- a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentListResult.js +++ b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentListResult.js @@ -16,7 +16,7 @@ class DatabaseVulnerabilityAssessmentListResult extends Array { /** * Create a DatabaseVulnerabilityAssessmentListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentRuleBaseline.js b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentRuleBaseline.js index 7428613ad7..b321086c4b 100644 --- a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentRuleBaseline.js +++ b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentRuleBaseline.js @@ -20,7 +20,7 @@ const models = require('./index'); class DatabaseVulnerabilityAssessmentRuleBaseline extends models['ProxyResource'] { /** * Create a DatabaseVulnerabilityAssessmentRuleBaseline. - * @member {array} baselineResults The rule baseline result + * @property {array} baselineResults The rule baseline result */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentRuleBaselineItem.js b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentRuleBaselineItem.js index cec3924952..091bd5b063 100644 --- a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentRuleBaselineItem.js +++ b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentRuleBaselineItem.js @@ -18,7 +18,7 @@ class DatabaseVulnerabilityAssessmentRuleBaselineItem { /** * Create a DatabaseVulnerabilityAssessmentRuleBaselineItem. - * @member {array} result The rule baseline result + * @property {array} result The rule baseline result */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentScansExport.js b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentScansExport.js index 0a46456038..abb7f7d0b9 100644 --- a/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentScansExport.js +++ b/lib/services/sqlManagement2/lib/models/databaseVulnerabilityAssessmentScansExport.js @@ -20,8 +20,8 @@ const models = require('./index'); class DatabaseVulnerabilityAssessmentScansExport extends models['ProxyResource'] { /** * Create a DatabaseVulnerabilityAssessmentScansExport. - * @member {string} [exportedReportLocation] Location of the exported report - * (e.g. + * @property {string} [exportedReportLocation] Location of the exported + * report (e.g. * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/editionCapability.js b/lib/services/sqlManagement2/lib/models/editionCapability.js index 6c5c215d90..f1a851ff5f 100644 --- a/lib/services/sqlManagement2/lib/models/editionCapability.js +++ b/lib/services/sqlManagement2/lib/models/editionCapability.js @@ -17,14 +17,14 @@ class EditionCapability { /** * Create a EditionCapability. - * @member {string} [name] The database edition name. - * @member {array} [supportedServiceLevelObjectives] The list of supported + * @property {string} [name] The database edition name. + * @property {array} [supportedServiceLevelObjectives] The list of supported * service objectives for the edition. - * @member {boolean} [zoneRedundant] Whether or not zone redundancy is + * @property {boolean} [zoneRedundant] Whether or not zone redundancy is * supported for the edition. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/elasticPool.js b/lib/services/sqlManagement2/lib/models/elasticPool.js index dc8982ea45..081430e63d 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPool.js +++ b/lib/services/sqlManagement2/lib/models/elasticPool.js @@ -20,39 +20,39 @@ const models = require('./index'); class ElasticPool extends models['TrackedResource'] { /** * Create a ElasticPool. - * @member {object} [sku] - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically - * a letter+number code - * @member {string} [sku.tier] This field is required to be implemented by + * @property {object} [sku] + * @property {string} [sku.name] The name of the SKU. Ex - P3. It is + * typically a letter+number code + * @property {string} [sku.tier] This field is required to be implemented by * the Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the + * @property {string} [sku.size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {string} [kind] Kind of elastic pool. This is metadata used for + * @property {string} [sku.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * @property {number} [sku.capacity] If the SKU supports scale out/in then + * the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + * @property {string} [kind] Kind of elastic pool. This is metadata used for * the Azure portal experience. - * @member {string} [state] The state of the elastic pool. Possible values + * @property {string} [state] The state of the elastic pool. Possible values * include: 'Creating', 'Ready', 'Disabled' - * @member {date} [creationDate] The creation date of the elastic pool + * @property {date} [creationDate] The creation date of the elastic pool * (ISO8601 format). - * @member {number} [maxSizeBytes] The storage limit for the database elastic - * pool in bytes. - * @member {object} [perDatabaseSettings] The per database settings for the + * @property {number} [maxSizeBytes] The storage limit for the database + * elastic pool in bytes. + * @property {object} [perDatabaseSettings] The per database settings for the * elastic pool. - * @member {number} [perDatabaseSettings.minCapacity] The minimum capacity + * @property {number} [perDatabaseSettings.minCapacity] The minimum capacity * all databases are guaranteed. - * @member {number} [perDatabaseSettings.maxCapacity] The maximum capacity + * @property {number} [perDatabaseSettings.maxCapacity] The maximum capacity * any one database can consume. - * @member {boolean} [zoneRedundant] Whether or not this elastic pool is zone - * redundant, which means the replicas of this elastic pool will be spread - * across multiple availability zones. - * @member {string} [licenseType] The license type to apply for this elastic - * pool. Possible values include: 'LicenseIncluded', 'BasePrice' + * @property {boolean} [zoneRedundant] Whether or not this elastic pool is + * zone redundant, which means the replicas of this elastic pool will be + * spread across multiple availability zones. + * @property {string} [licenseType] The license type to apply for this + * elastic pool. Possible values include: 'LicenseIncluded', 'BasePrice' */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolActivity.js b/lib/services/sqlManagement2/lib/models/elasticPoolActivity.js index d454e58f24..507a5e212a 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolActivity.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolActivity.js @@ -20,37 +20,38 @@ const models = require('./index'); class ElasticPoolActivity extends models['ProxyResource'] { /** * Create a ElasticPoolActivity. - * @member {string} [location] The geo-location where the resource lives - * @member {date} [endTime] The time the operation finished (ISO8601 format). - * @member {number} [errorCode] The error code if available. - * @member {string} [errorMessage] The error message if available. - * @member {number} [errorSeverity] The error severity if available. - * @member {string} [operation] The operation name. - * @member {uuid} [operationId] The unique operation ID. - * @member {number} [percentComplete] The percentage complete if available. - * @member {number} [requestedDatabaseDtuMax] The requested max DTU per + * @property {string} [location] The geo-location where the resource lives + * @property {date} [endTime] The time the operation finished (ISO8601 + * format). + * @property {number} [errorCode] The error code if available. + * @property {string} [errorMessage] The error message if available. + * @property {number} [errorSeverity] The error severity if available. + * @property {string} [operation] The operation name. + * @property {uuid} [operationId] The unique operation ID. + * @property {number} [percentComplete] The percentage complete if available. + * @property {number} [requestedDatabaseDtuMax] The requested max DTU per * database if available. - * @member {number} [requestedDatabaseDtuMin] The requested min DTU per + * @property {number} [requestedDatabaseDtuMin] The requested min DTU per * database if available. - * @member {number} [requestedDtu] The requested DTU for the pool if + * @property {number} [requestedDtu] The requested DTU for the pool if * available. - * @member {string} [requestedElasticPoolName] The requested name for the + * @property {string} [requestedElasticPoolName] The requested name for the * elastic pool if available. - * @member {number} [requestedStorageLimitInGB] The requested storage limit + * @property {number} [requestedStorageLimitInGB] The requested storage limit * for the pool in GB if available. - * @member {string} [elasticPoolName] The name of the elastic pool. - * @member {string} [serverName] The name of the server the elastic pool is + * @property {string} [elasticPoolName] The name of the elastic pool. + * @property {string} [serverName] The name of the server the elastic pool is * in. - * @member {date} [startTime] The time the operation started (ISO8601 + * @property {date} [startTime] The time the operation started (ISO8601 * format). - * @member {string} [state] The current state of the operation. - * @member {number} [requestedStorageLimitInMB] The requested storage limit + * @property {string} [state] The current state of the operation. + * @property {number} [requestedStorageLimitInMB] The requested storage limit * in MB. - * @member {number} [requestedDatabaseDtuGuarantee] The requested per + * @property {number} [requestedDatabaseDtuGuarantee] The requested per * database DTU guarantee. - * @member {number} [requestedDatabaseDtuCap] The requested per database DTU - * cap. - * @member {number} [requestedDtuGuarantee] The requested DTU guarantee. + * @property {number} [requestedDatabaseDtuCap] The requested per database + * DTU cap. + * @property {number} [requestedDtuGuarantee] The requested DTU guarantee. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolDatabaseActivity.js b/lib/services/sqlManagement2/lib/models/elasticPoolDatabaseActivity.js index 428f6c163e..0471364168 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolDatabaseActivity.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolDatabaseActivity.js @@ -20,28 +20,29 @@ const models = require('./index'); class ElasticPoolDatabaseActivity extends models['ProxyResource'] { /** * Create a ElasticPoolDatabaseActivity. - * @member {string} [location] The geo-location where the resource lives - * @member {string} [databaseName] The database name. - * @member {date} [endTime] The time the operation finished (ISO8601 format). - * @member {number} [errorCode] The error code if available. - * @member {string} [errorMessage] The error message if available. - * @member {number} [errorSeverity] The error severity if available. - * @member {string} [operation] The operation name. - * @member {uuid} [operationId] The unique operation ID. - * @member {number} [percentComplete] The percentage complete if available. - * @member {string} [requestedElasticPoolName] The name for the elastic pool - * the database is moving into if available. - * @member {string} [currentElasticPoolName] The name of the current elastic - * pool the database is in if available. - * @member {string} [currentServiceObjective] The name of the current service - * objective if available. - * @member {string} [requestedServiceObjective] The name of the requested + * @property {string} [location] The geo-location where the resource lives + * @property {string} [databaseName] The database name. + * @property {date} [endTime] The time the operation finished (ISO8601 + * format). + * @property {number} [errorCode] The error code if available. + * @property {string} [errorMessage] The error message if available. + * @property {number} [errorSeverity] The error severity if available. + * @property {string} [operation] The operation name. + * @property {uuid} [operationId] The unique operation ID. + * @property {number} [percentComplete] The percentage complete if available. + * @property {string} [requestedElasticPoolName] The name for the elastic + * pool the database is moving into if available. + * @property {string} [currentElasticPoolName] The name of the current + * elastic pool the database is in if available. + * @property {string} [currentServiceObjective] The name of the current + * service objective if available. + * @property {string} [requestedServiceObjective] The name of the requested * service objective if available. - * @member {string} [serverName] The name of the server the elastic pool is + * @property {string} [serverName] The name of the server the elastic pool is * in. - * @member {date} [startTime] The time the operation started (ISO8601 + * @property {date} [startTime] The time the operation started (ISO8601 * format). - * @member {string} [state] The current state of the operation. + * @property {string} [state] The current state of the operation. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolEditionCapability.js b/lib/services/sqlManagement2/lib/models/elasticPoolEditionCapability.js index d04d7bc292..a5aeb901c1 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolEditionCapability.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolEditionCapability.js @@ -17,14 +17,14 @@ class ElasticPoolEditionCapability { /** * Create a ElasticPoolEditionCapability. - * @member {string} [name] The elastic pool edition name. - * @member {array} [supportedElasticPoolPerformanceLevels] The list of + * @property {string} [name] The elastic pool edition name. + * @property {array} [supportedElasticPoolPerformanceLevels] The list of * supported elastic pool DTU levels for the edition. - * @member {boolean} [zoneRedundant] Whether or not zone redundancy is + * @property {boolean} [zoneRedundant] Whether or not zone redundancy is * supported for the edition. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolListResult.js b/lib/services/sqlManagement2/lib/models/elasticPoolListResult.js index d0c17d09a4..093245c3ba 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolListResult.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolListResult.js @@ -16,7 +16,7 @@ class ElasticPoolListResult extends Array { /** * Create a ElasticPoolListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolOperation.js b/lib/services/sqlManagement2/lib/models/elasticPoolOperation.js index 3a9d43357b..ceada6a892 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolOperation.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolOperation.js @@ -20,23 +20,25 @@ const models = require('./index'); class ElasticPoolOperation extends models['ProxyResource'] { /** * Create a ElasticPoolOperation. - * @member {string} [elasticPoolName] The name of the elastic pool the + * @property {string} [elasticPoolName] The name of the elastic pool the * operation is being performed on. - * @member {string} [operation] The name of operation. - * @member {string} [operationFriendlyName] The friendly name of operation. - * @member {number} [percentComplete] The percentage of the operation + * @property {string} [operation] The name of operation. + * @property {string} [operationFriendlyName] The friendly name of operation. + * @property {number} [percentComplete] The percentage of the operation * completed. - * @member {string} [serverName] The name of the server. - * @member {date} [startTime] The operation start time. - * @member {string} [state] The operation state. - * @member {number} [errorCode] The operation error code. - * @member {string} [errorDescription] The operation error description. - * @member {number} [errorSeverity] The operation error severity. - * @member {boolean} [isUserError] Whether or not the error is a user error. - * @member {date} [estimatedCompletionTime] The estimated completion time of - * the operation. - * @member {string} [description] The operation description. - * @member {boolean} [isCancellable] Whether the operation can be cancelled. + * @property {string} [serverName] The name of the server. + * @property {date} [startTime] The operation start time. + * @property {string} [state] The operation state. + * @property {number} [errorCode] The operation error code. + * @property {string} [errorDescription] The operation error description. + * @property {number} [errorSeverity] The operation error severity. + * @property {boolean} [isUserError] Whether or not the error is a user + * error. + * @property {date} [estimatedCompletionTime] The estimated completion time + * of the operation. + * @property {string} [description] The operation description. + * @property {boolean} [isCancellable] Whether the operation can be + * cancelled. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolOperationListResult.js b/lib/services/sqlManagement2/lib/models/elasticPoolOperationListResult.js index c389d12c01..91a54d17e8 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolOperationListResult.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolOperationListResult.js @@ -16,7 +16,7 @@ class ElasticPoolOperationListResult extends Array { /** * Create a ElasticPoolOperationListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseMaxPerformanceLevelCapability.js b/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseMaxPerformanceLevelCapability.js index e7bc6fa05e..654d5d580c 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseMaxPerformanceLevelCapability.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseMaxPerformanceLevelCapability.js @@ -17,14 +17,14 @@ class ElasticPoolPerDatabaseMaxPerformanceLevelCapability { /** * Create a ElasticPoolPerDatabaseMaxPerformanceLevelCapability. - * @member {number} [limit] The maximum performance level per database. - * @member {string} [unit] Unit type used to measure performance level. + * @property {number} [limit] The maximum performance level per database. + * @property {string} [unit] Unit type used to measure performance level. * Possible values include: 'DTU', 'VCores' - * @member {array} [supportedPerDatabaseMinPerformanceLevels] The list of + * @property {array} [supportedPerDatabaseMinPerformanceLevels] The list of * supported min database performance levels. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseMinPerformanceLevelCapability.js b/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseMinPerformanceLevelCapability.js index 679c62dc47..b2436c7536 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseMinPerformanceLevelCapability.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseMinPerformanceLevelCapability.js @@ -17,12 +17,12 @@ class ElasticPoolPerDatabaseMinPerformanceLevelCapability { /** * Create a ElasticPoolPerDatabaseMinPerformanceLevelCapability. - * @member {number} [limit] The minimum performance level per database. - * @member {string} [unit] Unit type used to measure performance level. + * @property {number} [limit] The minimum performance level per database. + * @property {string} [unit] Unit type used to measure performance level. * Possible values include: 'DTU', 'VCores' - * @member {string} [status] The status of the capability. Possible values + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseSettings.js b/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseSettings.js index 5810f7eca6..cb854e0d91 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseSettings.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolPerDatabaseSettings.js @@ -17,9 +17,9 @@ class ElasticPoolPerDatabaseSettings { /** * Create a ElasticPoolPerDatabaseSettings. - * @member {number} [minCapacity] The minimum capacity all databases are + * @property {number} [minCapacity] The minimum capacity all databases are * guaranteed. - * @member {number} [maxCapacity] The maximum capacity any one database can + * @property {number} [maxCapacity] The maximum capacity any one database can * consume. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolPerformanceLevelCapability.js b/lib/services/sqlManagement2/lib/models/elasticPoolPerformanceLevelCapability.js index 60d33e1c8b..efe37bf13e 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolPerformanceLevelCapability.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolPerformanceLevelCapability.js @@ -17,42 +17,42 @@ class ElasticPoolPerformanceLevelCapability { /** * Create a ElasticPoolPerformanceLevelCapability. - * @member {object} [performanceLevel] The performance level for the pool. - * @member {number} [performanceLevel.value] Performance level value. - * @member {string} [performanceLevel.unit] Unit type used to measure + * @property {object} [performanceLevel] The performance level for the pool. + * @property {number} [performanceLevel.value] Performance level value. + * @property {string} [performanceLevel.unit] Unit type used to measure * performance level. Possible values include: 'DTU', 'VCores' - * @member {object} [sku] The sku. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically - * a letter+number code - * @member {string} [sku.tier] This field is required to be implemented by + * @property {object} [sku] The sku. + * @property {string} [sku.name] The name of the SKU. Ex - P3. It is + * typically a letter+number code + * @property {string} [sku.tier] This field is required to be implemented by * the Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the + * @property {string} [sku.size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {array} [supportedLicenseTypes] List of supported license types. - * @member {number} [maxDatabaseCount] The maximum number of databases + * @property {string} [sku.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * @property {number} [sku.capacity] If the SKU supports scale out/in then + * the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + * @property {array} [supportedLicenseTypes] List of supported license types. + * @property {number} [maxDatabaseCount] The maximum number of databases * supported. - * @member {object} [includedMaxSize] The included (free) max size for this + * @property {object} [includedMaxSize] The included (free) max size for this * performance level. - * @member {number} [includedMaxSize.limit] The maximum size limit (see + * @property {number} [includedMaxSize.limit] The maximum size limit (see * 'unit' for the units). - * @member {string} [includedMaxSize.unit] The units that the limit is + * @property {string} [includedMaxSize.unit] The units that the limit is * expressed in. Possible values include: 'Megabytes', 'Gigabytes', * 'Terabytes', 'Petabytes' - * @member {array} [supportedMaxSizes] The list of supported max sizes. - * @member {array} [supportedPerDatabaseMaxSizes] The list of supported per + * @property {array} [supportedMaxSizes] The list of supported max sizes. + * @property {array} [supportedPerDatabaseMaxSizes] The list of supported per * database max sizes. - * @member {array} [supportedPerDatabaseMaxPerformanceLevels] The list of + * @property {array} [supportedPerDatabaseMaxPerformanceLevels] The list of * supported per database max performance levels. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/elasticPoolUpdate.js b/lib/services/sqlManagement2/lib/models/elasticPoolUpdate.js index 072b9fe6f3..124d637969 100644 --- a/lib/services/sqlManagement2/lib/models/elasticPoolUpdate.js +++ b/lib/services/sqlManagement2/lib/models/elasticPoolUpdate.js @@ -17,34 +17,34 @@ class ElasticPoolUpdate { /** * Create a ElasticPoolUpdate. - * @member {object} [sku] - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically - * a letter+number code - * @member {string} [sku.tier] This field is required to be implemented by + * @property {object} [sku] + * @property {string} [sku.name] The name of the SKU. Ex - P3. It is + * typically a letter+number code + * @property {string} [sku.tier] This field is required to be implemented by * the Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the + * @property {string} [sku.size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {number} [maxSizeBytes] The storage limit for the database elastic - * pool in bytes. - * @member {object} [perDatabaseSettings] The per database settings for the + * @property {string} [sku.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * @property {number} [sku.capacity] If the SKU supports scale out/in then + * the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + * @property {number} [maxSizeBytes] The storage limit for the database + * elastic pool in bytes. + * @property {object} [perDatabaseSettings] The per database settings for the * elastic pool. - * @member {number} [perDatabaseSettings.minCapacity] The minimum capacity + * @property {number} [perDatabaseSettings.minCapacity] The minimum capacity * all databases are guaranteed. - * @member {number} [perDatabaseSettings.maxCapacity] The maximum capacity + * @property {number} [perDatabaseSettings.maxCapacity] The maximum capacity * any one database can consume. - * @member {boolean} [zoneRedundant] Whether or not this elastic pool is zone - * redundant, which means the replicas of this elastic pool will be spread - * across multiple availability zones. - * @member {string} [licenseType] The license type to apply for this elastic - * pool. Possible values include: 'LicenseIncluded', 'BasePrice' - * @member {object} [tags] Resource tags. + * @property {boolean} [zoneRedundant] Whether or not this elastic pool is + * zone redundant, which means the replicas of this elastic pool will be + * spread across multiple availability zones. + * @property {string} [licenseType] The license type to apply for this + * elastic pool. Possible values include: 'LicenseIncluded', 'BasePrice' + * @property {object} [tags] Resource tags. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/encryptionProtector.js b/lib/services/sqlManagement2/lib/models/encryptionProtector.js index 5ad16ca040..0706609a87 100644 --- a/lib/services/sqlManagement2/lib/models/encryptionProtector.js +++ b/lib/services/sqlManagement2/lib/models/encryptionProtector.js @@ -20,16 +20,16 @@ const models = require('./index'); class EncryptionProtector extends models['ProxyResource'] { /** * Create a EncryptionProtector. - * @member {string} [kind] Kind of encryption protector. This is metadata + * @property {string} [kind] Kind of encryption protector. This is metadata * used for the Azure portal experience. - * @member {string} [location] Resource location. - * @member {string} [subregion] Subregion of the encryption protector. - * @member {string} [serverKeyName] The name of the server key. - * @member {string} serverKeyType The encryption protector type like + * @property {string} [location] Resource location. + * @property {string} [subregion] Subregion of the encryption protector. + * @property {string} [serverKeyName] The name of the server key. + * @property {string} serverKeyType The encryption protector type like * 'ServiceManaged', 'AzureKeyVault'. Possible values include: * 'ServiceManaged', 'AzureKeyVault' - * @member {string} [uri] The URI of the server key. - * @member {string} [thumbprint] Thumbprint of the server key. + * @property {string} [uri] The URI of the server key. + * @property {string} [thumbprint] Thumbprint of the server key. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/encryptionProtectorListResult.js b/lib/services/sqlManagement2/lib/models/encryptionProtectorListResult.js index a3edae3876..d33a4d2cdd 100644 --- a/lib/services/sqlManagement2/lib/models/encryptionProtectorListResult.js +++ b/lib/services/sqlManagement2/lib/models/encryptionProtectorListResult.js @@ -16,7 +16,7 @@ class EncryptionProtectorListResult extends Array { /** * Create a EncryptionProtectorListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/exportRequest.js b/lib/services/sqlManagement2/lib/models/exportRequest.js index 990b46c4b6..386c94ea64 100644 --- a/lib/services/sqlManagement2/lib/models/exportRequest.js +++ b/lib/services/sqlManagement2/lib/models/exportRequest.js @@ -17,15 +17,15 @@ class ExportRequest { /** * Create a ExportRequest. - * @member {string} storageKeyType The type of the storage key to use. + * @property {string} storageKeyType The type of the storage key to use. * Possible values include: 'StorageAccessKey', 'SharedAccessKey' - * @member {string} storageKey The storage key to use. If storage key type + * @property {string} storageKey The storage key to use. If storage key type * is SharedAccessKey, it must be preceded with a "?." - * @member {string} storageUri The storage uri to use. - * @member {string} administratorLogin The name of the SQL administrator. - * @member {string} administratorLoginPassword The password of the SQL + * @property {string} storageUri The storage uri to use. + * @property {string} administratorLogin The name of the SQL administrator. + * @property {string} administratorLoginPassword The password of the SQL * administrator. - * @member {string} [authenticationType] The authentication type. Possible + * @property {string} [authenticationType] The authentication type. Possible * values include: 'SQL', 'ADPassword'. Default value: 'SQL' . */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/extendedDatabaseBlobAuditingPolicy.js b/lib/services/sqlManagement2/lib/models/extendedDatabaseBlobAuditingPolicy.js index 00bbe39ca9..894d584e74 100644 --- a/lib/services/sqlManagement2/lib/models/extendedDatabaseBlobAuditingPolicy.js +++ b/lib/services/sqlManagement2/lib/models/extendedDatabaseBlobAuditingPolicy.js @@ -20,20 +20,20 @@ const models = require('./index'); class ExtendedDatabaseBlobAuditingPolicy extends models['ProxyResource'] { /** * Create a ExtendedDatabaseBlobAuditingPolicy. - * @member {string} [predicateExpression] Specifies condition of where clause - * when creating an audit. - * @member {string} state Specifies the state of the policy. If state is + * @property {string} [predicateExpression] Specifies condition of where + * clause when creating an audit. + * @property {string} state Specifies the state of the policy. If state is * Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. * Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * @property {string} [storageEndpoint] Specifies the blob storage endpoint * (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, * storageEndpoint is required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the auditing storage account. If state is Enabled and storageEndpoint is - * specified, storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the auditing storage account. If state is Enabled and storageEndpoint + * is specified, storageAccountAccessKey is required. + * @property {number} [retentionDays] Specifies the number of days to keep in * the audit logs in the storage account. - * @member {array} [auditActionsAndGroups] Specifies the Actions-Groups and + * @property {array} [auditActionsAndGroups] Specifies the Actions-Groups and * Actions to audit. * * The recommended set of action groups to use is the following combination - @@ -105,11 +105,11 @@ class ExtendedDatabaseBlobAuditingPolicy extends models['ProxyResource'] { * * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - * @member {uuid} [storageAccountSubscriptionId] Specifies the blob storage + * @property {uuid} [storageAccountSubscriptionId] Specifies the blob storage * subscription Id. - * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether + * @property {boolean} [isStorageSecondaryKeyInUse] Specifies whether * storageAccountAccessKey value is the storage's secondary key. - * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit + * @property {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit * events are sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' * and 'IsAzureMonitorTargetEnabled' as true. diff --git a/lib/services/sqlManagement2/lib/models/extendedServerBlobAuditingPolicy.js b/lib/services/sqlManagement2/lib/models/extendedServerBlobAuditingPolicy.js index c104d030a6..e46a107948 100644 --- a/lib/services/sqlManagement2/lib/models/extendedServerBlobAuditingPolicy.js +++ b/lib/services/sqlManagement2/lib/models/extendedServerBlobAuditingPolicy.js @@ -20,20 +20,20 @@ const models = require('./index'); class ExtendedServerBlobAuditingPolicy extends models['ProxyResource'] { /** * Create a ExtendedServerBlobAuditingPolicy. - * @member {string} [predicateExpression] Specifies condition of where clause - * when creating an audit. - * @member {string} state Specifies the state of the policy. If state is + * @property {string} [predicateExpression] Specifies condition of where + * clause when creating an audit. + * @property {string} state Specifies the state of the policy. If state is * Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. * Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * @property {string} [storageEndpoint] Specifies the blob storage endpoint * (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, * storageEndpoint is required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the auditing storage account. If state is Enabled and storageEndpoint is - * specified, storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the auditing storage account. If state is Enabled and storageEndpoint + * is specified, storageAccountAccessKey is required. + * @property {number} [retentionDays] Specifies the number of days to keep in * the audit logs in the storage account. - * @member {array} [auditActionsAndGroups] Specifies the Actions-Groups and + * @property {array} [auditActionsAndGroups] Specifies the Actions-Groups and * Actions to audit. * * The recommended set of action groups to use is the following combination - @@ -105,11 +105,11 @@ class ExtendedServerBlobAuditingPolicy extends models['ProxyResource'] { * * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - * @member {uuid} [storageAccountSubscriptionId] Specifies the blob storage + * @property {uuid} [storageAccountSubscriptionId] Specifies the blob storage * subscription Id. - * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether + * @property {boolean} [isStorageSecondaryKeyInUse] Specifies whether * storageAccountAccessKey value is the storage's secondary key. - * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit + * @property {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit * events are sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' * and 'IsAzureMonitorTargetEnabled' as true. diff --git a/lib/services/sqlManagement2/lib/models/failoverGroup.js b/lib/services/sqlManagement2/lib/models/failoverGroup.js index d27e41c1ca..30562af4d7 100644 --- a/lib/services/sqlManagement2/lib/models/failoverGroup.js +++ b/lib/services/sqlManagement2/lib/models/failoverGroup.js @@ -20,31 +20,31 @@ const models = require('./index'); class FailoverGroup extends models['ProxyResource'] { /** * Create a FailoverGroup. - * @member {string} [location] Resource location. - * @member {object} [tags] Resource tags. - * @member {object} readWriteEndpoint Read-write endpoint of the failover + * @property {string} [location] Resource location. + * @property {object} [tags] Resource tags. + * @property {object} readWriteEndpoint Read-write endpoint of the failover * group instance. - * @member {string} [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' - * @member {number} + * @property {string} [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' + * @property {number} * [readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace period * before failover with data loss is attempted for the read-write endpoint. * If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes * is required. - * @member {object} [readOnlyEndpoint] Read-only endpoint of the failover + * @property {object} [readOnlyEndpoint] Read-only endpoint of the failover * group instance. - * @member {string} [readOnlyEndpoint.failoverPolicy] Failover policy of the - * read-only endpoint for the failover group. Possible values include: + * @property {string} [readOnlyEndpoint.failoverPolicy] Failover policy of + * the read-only endpoint for the failover group. Possible values include: * 'Disabled', 'Enabled' - * @member {string} [replicationRole] Local replication role of the failover - * group instance. Possible values include: 'Primary', 'Secondary' - * @member {string} [replicationState] Replication state of the failover + * @property {string} [replicationRole] Local replication role of the + * failover group instance. Possible values include: 'Primary', 'Secondary' + * @property {string} [replicationState] Replication state of the failover * group instance. - * @member {array} partnerServers List of partner server information for the - * failover group. - * @member {array} [databases] List of databases in the failover group. + * @property {array} partnerServers List of partner server information for + * the failover group. + * @property {array} [databases] List of databases in the failover group. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/failoverGroupListResult.js b/lib/services/sqlManagement2/lib/models/failoverGroupListResult.js index 859c8242e6..209b319195 100644 --- a/lib/services/sqlManagement2/lib/models/failoverGroupListResult.js +++ b/lib/services/sqlManagement2/lib/models/failoverGroupListResult.js @@ -16,7 +16,7 @@ class FailoverGroupListResult extends Array { /** * Create a FailoverGroupListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/failoverGroupReadOnlyEndpoint.js b/lib/services/sqlManagement2/lib/models/failoverGroupReadOnlyEndpoint.js index 3e6404a5a1..f34f3634b4 100644 --- a/lib/services/sqlManagement2/lib/models/failoverGroupReadOnlyEndpoint.js +++ b/lib/services/sqlManagement2/lib/models/failoverGroupReadOnlyEndpoint.js @@ -17,7 +17,7 @@ class FailoverGroupReadOnlyEndpoint { /** * Create a FailoverGroupReadOnlyEndpoint. - * @member {string} [failoverPolicy] Failover policy of the read-only + * @property {string} [failoverPolicy] Failover policy of the read-only * endpoint for the failover group. Possible values include: 'Disabled', * 'Enabled' */ diff --git a/lib/services/sqlManagement2/lib/models/failoverGroupReadWriteEndpoint.js b/lib/services/sqlManagement2/lib/models/failoverGroupReadWriteEndpoint.js index 74623717fe..b1b74d3425 100644 --- a/lib/services/sqlManagement2/lib/models/failoverGroupReadWriteEndpoint.js +++ b/lib/services/sqlManagement2/lib/models/failoverGroupReadWriteEndpoint.js @@ -17,11 +17,11 @@ class FailoverGroupReadWriteEndpoint { /** * Create a FailoverGroupReadWriteEndpoint. - * @member {string} failoverPolicy Failover policy of the read-write endpoint - * for the failover group. If failoverPolicy is Automatic then + * @property {string} 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' - * @member {number} [failoverWithDataLossGracePeriodMinutes] Grace period + * @property {number} [failoverWithDataLossGracePeriodMinutes] Grace period * before failover with data loss is attempted for the read-write endpoint. * If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes * is required. diff --git a/lib/services/sqlManagement2/lib/models/failoverGroupUpdate.js b/lib/services/sqlManagement2/lib/models/failoverGroupUpdate.js index 2147497cbc..8e12245903 100644 --- a/lib/services/sqlManagement2/lib/models/failoverGroupUpdate.js +++ b/lib/services/sqlManagement2/lib/models/failoverGroupUpdate.js @@ -17,24 +17,24 @@ class FailoverGroupUpdate { /** * Create a FailoverGroupUpdate. - * @member {object} [readWriteEndpoint] Read-write endpoint of the failover + * @property {object} [readWriteEndpoint] Read-write endpoint of the failover * group instance. - * @member {string} [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' - * @member {number} + * @property {string} [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' + * @property {number} * [readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace period * before failover with data loss is attempted for the read-write endpoint. * If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes * is required. - * @member {object} [readOnlyEndpoint] Read-only endpoint of the failover + * @property {object} [readOnlyEndpoint] Read-only endpoint of the failover * group instance. - * @member {string} [readOnlyEndpoint.failoverPolicy] Failover policy of the - * read-only endpoint for the failover group. Possible values include: + * @property {string} [readOnlyEndpoint.failoverPolicy] Failover policy of + * the read-only endpoint for the failover group. Possible values include: * 'Disabled', 'Enabled' - * @member {array} [databases] List of databases in the failover group. - * @member {object} [tags] Resource tags. + * @property {array} [databases] List of databases in the failover group. + * @property {object} [tags] Resource tags. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/firewallRule.js b/lib/services/sqlManagement2/lib/models/firewallRule.js index 1881861d7f..32cafc42fb 100644 --- a/lib/services/sqlManagement2/lib/models/firewallRule.js +++ b/lib/services/sqlManagement2/lib/models/firewallRule.js @@ -20,13 +20,13 @@ const models = require('./index'); class FirewallRule extends models['ProxyResource'] { /** * Create a FirewallRule. - * @member {string} [kind] Kind of server that contains this firewall rule. - * @member {string} [location] Location of the server that contains this + * @property {string} [kind] Kind of server that contains this firewall rule. + * @property {string} [location] Location of the server that contains this * firewall rule. - * @member {string} startIpAddress The start IP address of the firewall rule. - * Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal - * IP addresses. - * @member {string} endIpAddress The end IP address of the firewall rule. + * @property {string} startIpAddress The start IP address of the firewall + * rule. Must be IPv4 format. Use value '0.0.0.0' to represent all + * Azure-internal IP addresses. + * @property {string} endIpAddress The end IP address of the firewall rule. * Must be IPv4 format. Must be greater than or equal to startIpAddress. Use * value '0.0.0.0' to represent all Azure-internal IP addresses. */ diff --git a/lib/services/sqlManagement2/lib/models/geoBackupPolicy.js b/lib/services/sqlManagement2/lib/models/geoBackupPolicy.js index aadea0ed6c..2efb0c06a5 100644 --- a/lib/services/sqlManagement2/lib/models/geoBackupPolicy.js +++ b/lib/services/sqlManagement2/lib/models/geoBackupPolicy.js @@ -20,12 +20,13 @@ const models = require('./index'); class GeoBackupPolicy extends models['ProxyResource'] { /** * Create a GeoBackupPolicy. - * @member {string} state The state of the geo backup policy. Possible values - * include: 'Disabled', 'Enabled' - * @member {string} [storageType] The storage type of the geo backup policy. - * @member {string} [kind] Kind of geo backup policy. This is metadata used - * for the Azure portal experience. - * @member {string} [location] Backup policy location. + * @property {string} state The state of the geo backup policy. Possible + * values include: 'Disabled', 'Enabled' + * @property {string} [storageType] The storage type of the geo backup + * policy. + * @property {string} [kind] Kind of geo backup policy. This is metadata + * used for the Azure portal experience. + * @property {string} [location] Backup policy location. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/importExportResponse.js b/lib/services/sqlManagement2/lib/models/importExportResponse.js index 7b8469de61..aff284c8a4 100644 --- a/lib/services/sqlManagement2/lib/models/importExportResponse.js +++ b/lib/services/sqlManagement2/lib/models/importExportResponse.js @@ -20,16 +20,16 @@ const models = require('./index'); class ImportExportResponse extends models['ProxyResource'] { /** * Create a ImportExportResponse. - * @member {string} [requestType] The request type of the operation. - * @member {uuid} [requestId] The request type of the operation. - * @member {string} [serverName] The name of the server. - * @member {string} [databaseName] The name of the database. - * @member {string} [status] The status message returned from the server. - * @member {string} [lastModifiedTime] The operation status last modified + * @property {string} [requestType] The request type of the operation. + * @property {uuid} [requestId] The request type of the operation. + * @property {string} [serverName] The name of the server. + * @property {string} [databaseName] The name of the database. + * @property {string} [status] The status message returned from the server. + * @property {string} [lastModifiedTime] The operation status last modified * time. - * @member {string} [queuedTime] The operation queued time. - * @member {string} [blobUri] The blob uri. - * @member {string} [errorMessage] The error message returned from the + * @property {string} [queuedTime] The operation queued time. + * @property {string} [blobUri] The blob uri. + * @property {string} [errorMessage] The error message returned from the * server. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/importExtensionRequest.js b/lib/services/sqlManagement2/lib/models/importExtensionRequest.js index 523e25b61b..69ac7173b4 100644 --- a/lib/services/sqlManagement2/lib/models/importExtensionRequest.js +++ b/lib/services/sqlManagement2/lib/models/importExtensionRequest.js @@ -17,17 +17,17 @@ class ImportExtensionRequest { /** * Create a ImportExtensionRequest. - * @member {string} [name] The name of the extension. - * @member {string} [type] The type of the extension. - * @member {string} storageKeyType The type of the storage key to use. + * @property {string} [name] The name of the extension. + * @property {string} [type] The type of the extension. + * @property {string} storageKeyType The type of the storage key to use. * Possible values include: 'StorageAccessKey', 'SharedAccessKey' - * @member {string} storageKey The storage key to use. If storage key type + * @property {string} storageKey The storage key to use. If storage key type * is SharedAccessKey, it must be preceded with a "?." - * @member {string} storageUri The storage uri to use. - * @member {string} administratorLogin The name of the SQL administrator. - * @member {string} administratorLoginPassword The password of the SQL + * @property {string} storageUri The storage uri to use. + * @property {string} administratorLogin The name of the SQL administrator. + * @property {string} administratorLoginPassword The password of the SQL * administrator. - * @member {string} [authenticationType] The authentication type. Possible + * @property {string} [authenticationType] The authentication type. Possible * values include: 'SQL', 'ADPassword'. Default value: 'SQL' . */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/importRequest.js b/lib/services/sqlManagement2/lib/models/importRequest.js index 474fc662c8..62869f7435 100644 --- a/lib/services/sqlManagement2/lib/models/importRequest.js +++ b/lib/services/sqlManagement2/lib/models/importRequest.js @@ -20,13 +20,13 @@ const models = require('./index'); class ImportRequest extends models['ExportRequest'] { /** * Create a ImportRequest. - * @member {string} databaseName The name of the database to import. - * @member {string} edition The edition for the database being created. + * @property {string} databaseName The name of the database to import. + * @property {string} edition The edition for the database being created. * Possible values include: 'Web', 'Business', 'Basic', 'Standard', * 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', * 'System2' - * @member {string} serviceObjectiveName The name of the service objective to - * assign to the database. Possible values include: 'System', 'System0', + * @property {string} serviceObjectiveName The name of the service objective + * to assign to the database. Possible values include: 'System', 'System0', * 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', * 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', * 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', @@ -35,7 +35,7 @@ class ImportRequest extends models['ExportRequest'] { * 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', * 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', * 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - * @member {string} maxSizeBytes The maximum size for the newly imported + * @property {string} maxSizeBytes The maximum size for the newly imported * database. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/index.d.ts b/lib/services/sqlManagement2/lib/models/index.d.ts index ac0ac0f553..b7eed504e4 100644 --- a/lib/services/sqlManagement2/lib/models/index.d.ts +++ b/lib/services/sqlManagement2/lib/models/index.d.ts @@ -1,4935 +1,5461 @@ /* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ -import { BaseResource } from 'ms-rest-azure'; -import { CloudError } from 'ms-rest-azure'; -import * as moment from 'moment'; +import { BaseResource, CloudError } from "ms-rest-azure"; +import * as moment from "moment"; -export { BaseResource } from 'ms-rest-azure'; -export { CloudError } from 'ms-rest-azure'; +export { + BaseResource, + CloudError +}; /** - * @class - * Initializes a new instance of the Resource class. - * @constructor * ARM resource. - * - * @member {string} [id] Resource ID. - * @member {string} [name] Resource name. - * @member {string} [type] Resource type. */ export interface Resource extends BaseResource { + /** + * Resource ID. + */ readonly id?: string; + /** + * Resource name. + */ readonly name?: string; + /** + * Resource type. + */ readonly type?: string; } /** - * @class - * Initializes a new instance of the ProxyResource class. - * @constructor * ARM proxy resource. - * */ export interface ProxyResource extends Resource { } /** - * @class - * Initializes a new instance of the RecoverableDatabase class. - * @constructor * A recoverable database - * - * @member {string} [edition] The edition of the database - * @member {string} [serviceLevelObjective] The service level objective name of - * the database - * @member {string} [elasticPoolName] The elastic pool name of the database - * @member {date} [lastAvailableBackupDate] The last available backup date of - * the database (ISO8601 format) */ export interface RecoverableDatabase extends ProxyResource { + /** + * The edition of the database + */ readonly edition?: string; + /** + * The service level objective name of the database + */ readonly serviceLevelObjective?: string; + /** + * The elastic pool name of the database + */ readonly elasticPoolName?: string; + /** + * The last available backup date of the database (ISO8601 format) + */ readonly lastAvailableBackupDate?: Date; } /** - * @class - * Initializes a new instance of the RestorableDroppedDatabase class. - * @constructor * A restorable dropped database - * - * @member {string} [location] The geo-location where the resource lives - * @member {string} [databaseName] The name of the database - * @member {string} [edition] The edition of the database - * @member {string} [maxSizeBytes] The max size in bytes of the database - * @member {string} [serviceLevelObjective] The service level objective name of - * the database - * @member {string} [elasticPoolName] The elastic pool name of the database - * @member {date} [creationDate] The creation date of the database (ISO8601 - * format) - * @member {date} [deletionDate] The deletion date of the database (ISO8601 - * format) - * @member {date} [earliestRestoreDate] The earliest restore date of the - * database (ISO8601 format) */ export interface RestorableDroppedDatabase extends ProxyResource { + /** + * The geo-location where the resource lives + */ readonly location?: string; + /** + * The name of the database + */ readonly databaseName?: string; + /** + * The edition of the database + */ readonly edition?: string; + /** + * The max size in bytes of the database + */ readonly maxSizeBytes?: string; + /** + * The service level objective name of the database + */ readonly serviceLevelObjective?: string; + /** + * The elastic pool name of the database + */ readonly elasticPoolName?: string; + /** + * The creation date of the database (ISO8601 format) + */ readonly creationDate?: Date; + /** + * The deletion date of the database (ISO8601 format) + */ readonly deletionDate?: Date; + /** + * The earliest restore date of the database (ISO8601 format) + */ readonly earliestRestoreDate?: Date; } /** - * @class - * Initializes a new instance of the TrackedResource class. - * @constructor * ARM tracked top level resource. - * - * @member {string} location Resource location. - * @member {object} [tags] Resource tags. */ export interface TrackedResource extends Resource { + /** + * Resource location. + */ location: string; + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the CheckNameAvailabilityRequest class. - * @constructor * A request to check whether the specified name for a resource is available. - * - * @member {string} name The name whose availability is to be checked. */ export interface CheckNameAvailabilityRequest { + /** + * The name whose availability is to be checked. + */ name: string; } /** - * @class - * Initializes a new instance of the CheckNameAvailabilityResponse class. - * @constructor - * A response indicating whether the specified name for a resource is - * available. - * - * @member {boolean} [available] True if the name is available, otherwise - * false. - * @member {string} [message] A message explaining why the name is unavailable. - * Will be null if the name is available. - * @member {string} [name] The name whose availability was checked. - * @member {string} [reason] The reason code explaining why the name is - * unavailable. Will be null if the name is available. Possible values include: - * 'Invalid', 'AlreadyExists' + * A response indicating whether the specified name for a resource is available. */ export interface CheckNameAvailabilityResponse { + /** + * True if the name is available, otherwise false. + */ readonly available?: boolean; + /** + * A message explaining why the name is unavailable. Will be null if the name is available. + */ readonly message?: string; + /** + * The name whose availability was checked. + */ readonly name?: string; + /** + * The reason code explaining why the name is unavailable. Will be null if the name is available. + * Possible values include: 'Invalid', 'AlreadyExists' + */ readonly reason?: string; } /** - * @class - * Initializes a new instance of the ServerConnectionPolicy class. - * @constructor * A server secure connection policy. - * - * @member {string} [kind] Metadata used for the Azure portal experience. - * @member {string} [location] Resource location. - * @member {string} connectionType The server connection type. Possible values - * include: 'Default', 'Proxy', 'Redirect' */ export interface ServerConnectionPolicy extends ProxyResource { + /** + * Metadata used for the Azure portal experience. + */ readonly kind?: string; + /** + * Resource location. + */ readonly location?: string; + /** + * The server connection type. Possible values include: 'Default', 'Proxy', 'Redirect' + */ connectionType: string; } /** - * @class - * Initializes a new instance of the DatabaseSecurityAlertPolicy class. - * @constructor * Contains information about a database Threat Detection policy. - * - * @member {string} [location] The geo-location where the resource lives - * @member {string} [kind] Resource kind. - * @member {string} state Specifies the state of the policy. If state is - * Enabled, storageEndpoint and storageAccountAccessKey are required. Possible - * values include: 'New', 'Enabled', 'Disabled' - * @member {string} [disabledAlerts] Specifies the semicolon-separated list of - * alerts that are disabled, or empty string to disable no alerts. Possible - * values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; - * Data_Exfiltration; Unsafe_Action. - * @member {string} [emailAddresses] Specifies the semicolon-separated list of - * e-mail addresses to which the alert is sent. - * @member {string} [emailAccountAdmins] Specifies that the alert is sent to - * the account administrators. Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all - * Threat Detection audit logs. If state is Enabled, storageEndpoint is - * required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the Threat Detection audit storage account. If state is Enabled, - * storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in the - * Threat Detection audit logs. - * @member {string} [useServerDefault] Specifies whether to use the default - * server policy. Possible values include: 'Enabled', 'Disabled' */ export interface DatabaseSecurityAlertPolicy extends ProxyResource { + /** + * The geo-location where the resource lives + */ location?: string; + /** + * Resource kind. + */ readonly kind?: string; + /** + * Specifies the state of the policy. If state is Enabled, storageEndpoint and + * storageAccountAccessKey are required. Possible values include: 'New', 'Enabled', 'Disabled' + */ state: string; + /** + * Specifies the semicolon-separated list of alerts that are disabled, or empty string to disable + * no alerts. Possible values: Sql_Injection; Sql_Injection_Vulnerability; Access_Anomaly; + * Data_Exfiltration; Unsafe_Action. + */ disabledAlerts?: string; + /** + * Specifies the semicolon-separated list of e-mail addresses to which the alert is sent. + */ emailAddresses?: string; + /** + * Specifies that the alert is sent to the account administrators. Possible values include: + * 'Enabled', 'Disabled' + */ emailAccountAdmins?: string; + /** + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob + * storage will hold all Threat Detection audit logs. If state is Enabled, storageEndpoint is + * required. + */ storageEndpoint?: string; + /** + * Specifies the identifier key of the Threat Detection audit storage account. If state is + * Enabled, storageAccountAccessKey is required. + */ storageAccountAccessKey?: string; + /** + * Specifies the number of days to keep in the Threat Detection audit logs. + */ retentionDays?: number; + /** + * Specifies whether to use the default server policy. Possible values include: 'Enabled', + * 'Disabled' + */ useServerDefault?: string; } /** - * @class - * Initializes a new instance of the DataMaskingPolicy class. - * @constructor * Represents a database data masking policy. - * - * @member {string} dataMaskingState The state of the data masking policy. - * Possible values include: 'Disabled', 'Enabled' - * @member {string} [exemptPrincipals] The list of the exempt principals. - * Specifies the semicolon-separated list of database users for which the data - * masking policy does not apply. The specified users receive data results - * without masking for all of the database queries. - * @member {string} [applicationPrincipals] The list of the application - * principals. This is a legacy parameter and is no longer used. - * @member {string} [maskingLevel] The masking level. This is a legacy - * parameter and is no longer used. - * @member {string} [location] The location of the data masking policy. - * @member {string} [kind] The kind of data masking policy. Metadata, used for - * Azure portal. */ export interface DataMaskingPolicy extends ProxyResource { + /** + * The state of the data masking policy. Possible values include: 'Disabled', 'Enabled' + */ dataMaskingState: string; + /** + * The list of the exempt principals. Specifies the semicolon-separated list of database users + * for which the data masking policy does not apply. The specified users receive data results + * without masking for all of the database queries. + */ exemptPrincipals?: string; + /** + * The list of the application principals. This is a legacy parameter and is no longer used. + */ readonly applicationPrincipals?: string; + /** + * The masking level. This is a legacy parameter and is no longer used. + */ readonly maskingLevel?: string; + /** + * The location of the data masking policy. + */ readonly location?: string; + /** + * The kind of data masking policy. Metadata, used for Azure portal. + */ readonly kind?: string; } /** - * @class - * Initializes a new instance of the DataMaskingRule class. - * @constructor * Represents a database data masking rule. - * - * @member {string} [dataMaskingRuleId] The rule Id. - * @member {string} [aliasName] The alias name. This is a legacy parameter and - * is no longer used. - * @member {string} [ruleState] The rule state. Used to delete a rule. To - * delete an existing rule, specify the schemaName, tableName, columnName, - * maskingFunction, and specify ruleState as disabled. However, if the rule - * doesn't already exist, the rule will be created with ruleState set to - * enabled, regardless of the provided value of ruleState. Possible values - * include: 'Disabled', 'Enabled' - * @member {string} schemaName The schema name on which the data masking rule - * is applied. - * @member {string} tableName The table name on which the data masking rule is - * applied. - * @member {string} columnName The column name on which the data masking rule - * is applied. - * @member {string} maskingFunction The masking function that is used for the - * data masking rule. Possible values include: 'Default', 'CCN', 'Email', - * 'Number', 'SSN', 'Text' - * @member {string} [numberFrom] The numberFrom property of the masking rule. - * Required if maskingFunction is set to Number, otherwise this parameter will - * be ignored. - * @member {string} [numberTo] The numberTo property of the data masking rule. - * Required if maskingFunction is set to Number, otherwise this parameter will - * be ignored. - * @member {string} [prefixSize] If maskingFunction is set to Text, the number - * of characters to show unmasked in the beginning of the string. Otherwise, - * this parameter will be ignored. - * @member {string} [suffixSize] If maskingFunction is set to Text, the number - * of characters to show unmasked at the end of the string. Otherwise, this - * parameter will be ignored. - * @member {string} [replacementString] If maskingFunction is set to Text, the - * character to use for masking the unexposed part of the string. Otherwise, - * this parameter will be ignored. - * @member {string} [location] The location of the data masking rule. - * @member {string} [kind] The kind of Data Masking Rule. Metadata, used for - * Azure portal. */ export interface DataMaskingRule extends ProxyResource { + /** + * The rule Id. + */ readonly dataMaskingRuleId?: string; + /** + * The alias name. This is a legacy parameter and is no longer used. + */ aliasName?: string; + /** + * The rule state. Used to delete a rule. To delete an existing rule, specify the schemaName, + * tableName, columnName, maskingFunction, and specify ruleState as disabled. However, if the + * rule doesn't already exist, the rule will be created with ruleState set to enabled, regardless + * of the provided value of ruleState. Possible values include: 'Disabled', 'Enabled' + */ ruleState?: string; + /** + * The schema name on which the data masking rule is applied. + */ schemaName: string; + /** + * The table name on which the data masking rule is applied. + */ tableName: string; + /** + * The column name on which the data masking rule is applied. + */ columnName: string; + /** + * The masking function that is used for the data masking rule. Possible values include: + * 'Default', 'CCN', 'Email', 'Number', 'SSN', 'Text' + */ maskingFunction: string; + /** + * The numberFrom property of the masking rule. Required if maskingFunction is set to Number, + * otherwise this parameter will be ignored. + */ numberFrom?: string; + /** + * The numberTo property of the data masking rule. Required if maskingFunction is set to Number, + * otherwise this parameter will be ignored. + */ numberTo?: string; + /** + * If maskingFunction is set to Text, the number of characters to show unmasked in the beginning + * of the string. Otherwise, this parameter will be ignored. + */ prefixSize?: string; + /** + * If maskingFunction is set to Text, the number of characters to show unmasked at the end of the + * string. Otherwise, this parameter will be ignored. + */ suffixSize?: string; + /** + * If maskingFunction is set to Text, the character to use for masking the unexposed part of the + * string. Otherwise, this parameter will be ignored. + */ replacementString?: string; + /** + * The location of the data masking rule. + */ readonly location?: string; + /** + * The kind of Data Masking Rule. Metadata, used for Azure portal. + */ readonly kind?: string; } /** - * @class - * Initializes a new instance of the FirewallRule class. - * @constructor * Represents a server firewall rule. - * - * @member {string} [kind] Kind of server that contains this firewall rule. - * @member {string} [location] Location of the server that contains this - * firewall rule. - * @member {string} startIpAddress The start IP address of the firewall rule. - * Must be IPv4 format. Use value '0.0.0.0' to represent all Azure-internal IP - * addresses. - * @member {string} endIpAddress The end IP address of the firewall rule. Must - * be IPv4 format. Must be greater than or equal to startIpAddress. Use value - * '0.0.0.0' to represent all Azure-internal IP addresses. */ export interface FirewallRule extends ProxyResource { + /** + * Kind of server that contains this firewall rule. + */ readonly kind?: string; + /** + * Location of the server that contains this firewall rule. + */ readonly location?: string; + /** + * The start IP address of the firewall rule. Must be IPv4 format. Use value '0.0.0.0' to + * represent all Azure-internal IP addresses. + */ startIpAddress: string; + /** + * The end IP address of the firewall rule. Must be IPv4 format. Must be greater than or equal to + * startIpAddress. Use value '0.0.0.0' to represent all Azure-internal IP addresses. + */ endIpAddress: string; } /** - * @class - * Initializes a new instance of the GeoBackupPolicy class. - * @constructor * A database geo backup policy. - * - * @member {string} state The state of the geo backup policy. Possible values - * include: 'Disabled', 'Enabled' - * @member {string} [storageType] The storage type of the geo backup policy. - * @member {string} [kind] Kind of geo backup policy. This is metadata used - * for the Azure portal experience. - * @member {string} [location] Backup policy location. */ export interface GeoBackupPolicy extends ProxyResource { + /** + * The state of the geo backup policy. Possible values include: 'Disabled', 'Enabled' + */ state: string; + /** + * The storage type of the geo backup policy. + */ readonly storageType?: string; + /** + * Kind of geo backup policy. This is metadata used for the Azure portal experience. + */ readonly kind?: string; + /** + * Backup policy location. + */ readonly location?: string; } /** - * @class - * Initializes a new instance of the ImportExtensionRequest class. - * @constructor * Import database parameters. - * - * @member {string} [name] The name of the extension. - * @member {string} [type] The type of the extension. - * @member {string} storageKeyType The type of the storage key to use. Possible - * values include: 'StorageAccessKey', 'SharedAccessKey' - * @member {string} storageKey The storage key to use. If storage key type is - * SharedAccessKey, it must be preceded with a "?." - * @member {string} storageUri The storage uri to use. - * @member {string} administratorLogin The name of the SQL administrator. - * @member {string} administratorLoginPassword The password of the SQL - * administrator. - * @member {string} [authenticationType] The authentication type. Possible - * values include: 'SQL', 'ADPassword'. Default value: 'SQL' . */ export interface ImportExtensionRequest { + /** + * The name of the extension. + */ name?: string; + /** + * The type of the extension. + */ type?: string; + /** + * The type of the storage key to use. Possible values include: 'StorageAccessKey', + * 'SharedAccessKey' + */ storageKeyType: string; + /** + * The storage key to use. If storage key type is SharedAccessKey, it must be preceded with a + * "?." + */ storageKey: string; + /** + * The storage uri to use. + */ storageUri: string; + /** + * The name of the SQL administrator. + */ administratorLogin: string; + /** + * The password of the SQL administrator. + */ administratorLoginPassword: string; + /** + * The authentication type. Possible values include: 'SQL', 'ADPassword' + */ authenticationType?: string; } /** - * @class - * Initializes a new instance of the ImportExportResponse class. - * @constructor * Response for Import/Export Get operation. - * - * @member {string} [requestType] The request type of the operation. - * @member {uuid} [requestId] The request type of the operation. - * @member {string} [serverName] The name of the server. - * @member {string} [databaseName] The name of the database. - * @member {string} [status] The status message returned from the server. - * @member {string} [lastModifiedTime] The operation status last modified time. - * @member {string} [queuedTime] The operation queued time. - * @member {string} [blobUri] The blob uri. - * @member {string} [errorMessage] The error message returned from the server. */ export interface ImportExportResponse extends ProxyResource { + /** + * The request type of the operation. + */ readonly requestType?: string; + /** + * The request type of the operation. + */ readonly requestId?: string; + /** + * The name of the server. + */ readonly serverName?: string; + /** + * The name of the database. + */ readonly databaseName?: string; + /** + * The status message returned from the server. + */ readonly status?: string; + /** + * The operation status last modified time. + */ readonly lastModifiedTime?: string; + /** + * The operation queued time. + */ readonly queuedTime?: string; + /** + * The blob uri. + */ readonly blobUri?: string; + /** + * The error message returned from the server. + */ readonly errorMessage?: string; } /** - * @class - * Initializes a new instance of the ExportRequest class. - * @constructor * Export database parameters. - * - * @member {string} storageKeyType The type of the storage key to use. Possible - * values include: 'StorageAccessKey', 'SharedAccessKey' - * @member {string} storageKey The storage key to use. If storage key type is - * SharedAccessKey, it must be preceded with a "?." - * @member {string} storageUri The storage uri to use. - * @member {string} administratorLogin The name of the SQL administrator. - * @member {string} administratorLoginPassword The password of the SQL - * administrator. - * @member {string} [authenticationType] The authentication type. Possible - * values include: 'SQL', 'ADPassword'. Default value: 'SQL' . */ export interface ExportRequest { + /** + * The type of the storage key to use. Possible values include: 'StorageAccessKey', + * 'SharedAccessKey' + */ storageKeyType: string; + /** + * The storage key to use. If storage key type is SharedAccessKey, it must be preceded with a + * "?." + */ storageKey: string; + /** + * The storage uri to use. + */ storageUri: string; + /** + * The name of the SQL administrator. + */ administratorLogin: string; + /** + * The password of the SQL administrator. + */ administratorLoginPassword: string; + /** + * The authentication type. Possible values include: 'SQL', 'ADPassword' + */ authenticationType?: string; } /** - * @class - * Initializes a new instance of the ImportRequest class. - * @constructor * Import database parameters. - * - * @member {string} databaseName The name of the database to import. - * @member {string} edition The edition for the database being created. - * Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', - * 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2' - * @member {string} serviceObjectiveName The name of the service objective to - * assign to the database. Possible values include: 'System', 'System0', - * 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', - * 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', - * 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', - * 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', - * 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', - * 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', - * 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', - * 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - * @member {string} maxSizeBytes The maximum size for the newly imported - * database. */ export interface ImportRequest extends ExportRequest { + /** + * The name of the database to import. + */ databaseName: string; + /** + * The edition for the database being created. Possible values include: 'Web', 'Business', + * 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', + * 'System2' + */ edition: string; + /** + * The name of the service objective to assign to the database. Possible values include: + * 'System', 'System0', 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', + * 'System4L', 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', + * 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', + * 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', + * 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', + * 'DW7500c', 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', + * 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' + */ serviceObjectiveName: string; + /** + * The maximum size for the newly imported database. + */ maxSizeBytes: string; } /** - * @class - * Initializes a new instance of the MetricValue class. - * @constructor * Represents database metrics. - * - * @member {number} [count] The number of values for the metric. - * @member {number} [average] The average value of the metric. - * @member {number} [maximum] The max value of the metric. - * @member {number} [minimum] The min value of the metric. - * @member {date} [timestamp] The metric timestamp (ISO-8601 format). - * @member {number} [total] The total value of the metric. */ export interface MetricValue { + /** + * The number of values for the metric. + */ readonly count?: number; + /** + * The average value of the metric. + */ readonly average?: number; + /** + * The max value of the metric. + */ readonly maximum?: number; + /** + * The min value of the metric. + */ readonly minimum?: number; + /** + * The metric timestamp (ISO-8601 format). + */ readonly timestamp?: Date; + /** + * The total value of the metric. + */ readonly total?: number; } /** - * @class - * Initializes a new instance of the MetricName class. - * @constructor * A database metric name. - * - * @member {string} [value] The name of the database metric. - * @member {string} [localizedValue] The friendly name of the database metric. */ export interface MetricName { + /** + * The name of the database metric. + */ readonly value?: string; + /** + * The friendly name of the database metric. + */ readonly localizedValue?: string; } /** - * @class - * Initializes a new instance of the Metric class. - * @constructor * Database metrics. - * - * @member {date} [startTime] The start time for the metric (ISO-8601 format). - * @member {date} [endTime] The end time for the metric (ISO-8601 format). - * @member {string} [timeGrain] The time step to be used to summarize the - * metric values. - * @member {string} [unit] The unit of the metric. Possible values include: - * 'count', 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - * @member {object} [name] The name information for the metric. - * @member {string} [name.value] The name of the database metric. - * @member {string} [name.localizedValue] The friendly name of the database - * metric. - * @member {array} [metricValues] The metric values for the specified time - * window and timestep. */ export interface Metric { + /** + * The start time for the metric (ISO-8601 format). + */ readonly startTime?: Date; + /** + * The end time for the metric (ISO-8601 format). + */ readonly endTime?: Date; + /** + * The time step to be used to summarize the metric values. + */ readonly timeGrain?: string; + /** + * The unit of the metric. Possible values include: 'count', 'bytes', 'seconds', 'percent', + * 'countPerSecond', 'bytesPerSecond' + */ readonly unit?: string; + /** + * The name information for the metric. + */ readonly name?: MetricName; + /** + * The metric values for the specified time window and timestep. + */ readonly metricValues?: MetricValue[]; } /** - * @class - * Initializes a new instance of the MetricAvailability class. - * @constructor * A metric availability value. - * - * @member {string} [retention] The length of retention for the database - * metric. - * @member {string} [timeGrain] The granularity of the database metric. */ export interface MetricAvailability { + /** + * The length of retention for the database metric. + */ readonly retention?: string; + /** + * The granularity of the database metric. + */ readonly timeGrain?: string; } /** - * @class - * Initializes a new instance of the MetricDefinition class. - * @constructor * A database metric definition. - * - * @member {object} [name] The name information for the metric. - * @member {string} [name.value] The name of the database metric. - * @member {string} [name.localizedValue] The friendly name of the database - * metric. - * @member {string} [primaryAggregationType] The primary aggregation type - * defining how metric values are displayed. Possible values include: 'None', - * 'Average', 'Count', 'Minimum', 'Maximum', 'Total' - * @member {string} [resourceUri] The resource uri of the database. - * @member {string} [unit] The unit of the metric. Possible values include: - * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - * @member {array} [metricAvailabilities] The list of database metric - * availabities for the metric. */ export interface MetricDefinition { + /** + * The name information for the metric. + */ readonly name?: MetricName; + /** + * The primary aggregation type defining how metric values are displayed. Possible values + * include: 'None', 'Average', 'Count', 'Minimum', 'Maximum', 'Total' + */ readonly primaryAggregationType?: string; + /** + * The resource uri of the database. + */ readonly resourceUri?: string; + /** + * The unit of the metric. Possible values include: 'Count', 'Bytes', 'Seconds', 'Percent', + * 'CountPerSecond', 'BytesPerSecond' + */ readonly unit?: string; + /** + * The list of database metric availabilities for the metric. + */ readonly metricAvailabilities?: MetricAvailability[]; } /** - * @class - * Initializes a new instance of the RecommendedElasticPoolMetric class. - * @constructor * Represents recommended elastic pool metric. - * - * @member {date} [dateTime] The time of metric (ISO8601 format). - * @member {number} [dtu] Gets or sets the DTUs (Database Transaction Units). - * See - * https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - * @member {number} [sizeGB] Gets or sets size in gigabytes. */ export interface RecommendedElasticPoolMetric { + /** + * The time of metric (ISO8601 format). + */ dateTime?: Date; + /** + * Gets or sets the DTUs (Database Transaction Units). See + * https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ + */ dtu?: number; + /** + * Gets or sets size in gigabytes. + */ sizeGB?: number; } /** - * @class - * Initializes a new instance of the RecommendedElasticPool class. - * @constructor - * Represents a recommented elastic pool. - * - * @member {string} [databaseEdition] The edition of the recommended elastic - * pool. The ElasticPoolEdition enumeration contains all the valid editions. - * Possible values include: 'Basic', 'Standard', 'Premium' - * @member {number} [dtu] The DTU for the recommended elastic pool. - * @member {number} [databaseDtuMin] The minimum DTU for the database. - * @member {number} [databaseDtuMax] The maximum DTU for the database. - * @member {number} [storageMB] Gets storage size in megabytes. - * @member {date} [observationPeriodStart] The observation period start - * (ISO8601 format). - * @member {date} [observationPeriodEnd] The observation period start (ISO8601 - * format). - * @member {number} [maxObservedDtu] Gets maximum observed DTU. - * @member {number} [maxObservedStorageMB] Gets maximum observed storage in - * megabytes. - * @member {array} [databases] The list of databases in this pool. Expanded - * property - * @member {array} [metrics] The list of databases housed in the server. - * Expanded property + * Represents a recommended elastic pool. */ export interface RecommendedElasticPool extends ProxyResource { + /** + * The edition of the recommended elastic pool. The ElasticPoolEdition enumeration contains all + * the valid editions. Possible values include: 'Basic', 'Standard', 'Premium' + */ readonly databaseEdition?: string; + /** + * The DTU for the recommended elastic pool. + */ dtu?: number; + /** + * The minimum DTU for the database. + */ databaseDtuMin?: number; + /** + * The maximum DTU for the database. + */ databaseDtuMax?: number; + /** + * Gets storage size in megabytes. + */ storageMB?: number; + /** + * The observation period start (ISO8601 format). + */ readonly observationPeriodStart?: Date; + /** + * The observation period start (ISO8601 format). + */ readonly observationPeriodEnd?: Date; + /** + * Gets maximum observed DTU. + */ readonly maxObservedDtu?: number; + /** + * Gets maximum observed storage in megabytes. + */ readonly maxObservedStorageMB?: number; + /** + * The list of databases in this pool. Expanded property + */ readonly databases?: TrackedResource[]; + /** + * The list of databases housed in the server. Expanded property + */ readonly metrics?: RecommendedElasticPoolMetric[]; } /** - * @class - * Initializes a new instance of the ReplicationLink class. - * @constructor * Represents a database replication link. - * - * @member {string} [location] Location of the server that contains this - * firewall rule. - * @member {boolean} [isTerminationAllowed] Legacy value indicating whether - * termination is allowed. Currently always returns true. - * @member {string} [replicationMode] Replication mode of this replication - * link. - * @member {string} [partnerServer] The name of the server hosting the partner - * database. - * @member {string} [partnerDatabase] The name of the partner database. - * @member {string} [partnerLocation] The Azure Region of the partner database. - * @member {string} [role] The role of the database in the replication link. - * Possible values include: 'Primary', 'Secondary', 'NonReadableSecondary', - * 'Source', 'Copy' - * @member {string} [partnerRole] The role of the partner database in the - * replication link. Possible values include: 'Primary', 'Secondary', - * 'NonReadableSecondary', 'Source', 'Copy' - * @member {date} [startTime] The start time for the replication link. - * @member {number} [percentComplete] The percentage of seeding complete for - * the replication link. - * @member {string} [replicationState] The replication state for the - * replication link. Possible values include: 'PENDING', 'SEEDING', 'CATCH_UP', - * 'SUSPENDED' */ export interface ReplicationLink extends ProxyResource { + /** + * Location of the server that contains this firewall rule. + */ readonly location?: string; + /** + * Legacy value indicating whether termination is allowed. Currently always returns true. + */ readonly isTerminationAllowed?: boolean; + /** + * Replication mode of this replication link. + */ readonly replicationMode?: string; + /** + * The name of the server hosting the partner database. + */ readonly partnerServer?: string; + /** + * The name of the partner database. + */ readonly partnerDatabase?: string; + /** + * The Azure Region of the partner database. + */ readonly partnerLocation?: string; + /** + * The role of the database in the replication link. Possible values include: 'Primary', + * 'Secondary', 'NonReadableSecondary', 'Source', 'Copy' + */ readonly role?: string; + /** + * The role of the partner database in the replication link. Possible values include: 'Primary', + * 'Secondary', 'NonReadableSecondary', 'Source', 'Copy' + */ readonly partnerRole?: string; + /** + * The start time for the replication link. + */ readonly startTime?: Date; + /** + * The percentage of seeding complete for the replication link. + */ readonly percentComplete?: number; + /** + * The replication state for the replication link. Possible values include: 'PENDING', 'SEEDING', + * 'CATCH_UP', 'SUSPENDED' + */ readonly replicationState?: string; } /** - * @class - * Initializes a new instance of the ServerAzureADAdministrator class. - * @constructor * An server Active Directory Administrator. - * - * @member {string} login The server administrator login value. - * @member {uuid} sid The server administrator Sid (Secure ID). - * @member {uuid} tenantId The server Active Directory Administrator tenant id. */ export interface ServerAzureADAdministrator extends ProxyResource { + /** + * The server administrator login value. + */ login: string; + /** + * The server administrator Sid (Secure ID). + */ sid: string; + /** + * The server Active Directory Administrator tenant id. + */ tenantId: string; } /** - * @class - * Initializes a new instance of the ServerCommunicationLink class. - * @constructor * Server communication link. - * - * @member {string} [state] The state. - * @member {string} partnerServer The name of the partner server. - * @member {string} [location] Communication link location. - * @member {string} [kind] Communication link kind. This property is used for - * Azure Portal metadata. */ export interface ServerCommunicationLink extends ProxyResource { + /** + * The state. + */ readonly state?: string; + /** + * The name of the partner server. + */ partnerServer: string; + /** + * Communication link location. + */ readonly location?: string; + /** + * Communication link kind. This property is used for Azure Portal metadata. + */ readonly kind?: string; } /** - * @class - * Initializes a new instance of the ServiceObjective class. - * @constructor * Represents a database service objective. - * - * @member {string} [serviceObjectiveName] The name for the service objective. - * @member {boolean} [isDefault] Gets whether the service level objective is - * the default service objective. - * @member {boolean} [isSystem] Gets whether the service level objective is a - * system service objective. - * @member {string} [description] The description for the service level - * objective. - * @member {boolean} [enabled] Gets whether the service level objective is - * enabled. */ export interface ServiceObjective extends ProxyResource { + /** + * The name for the service objective. + */ readonly serviceObjectiveName?: string; + /** + * Gets whether the service level objective is the default service objective. + */ readonly isDefault?: boolean; + /** + * Gets whether the service level objective is a system service objective. + */ readonly isSystem?: boolean; + /** + * The description for the service level objective. + */ readonly description?: string; + /** + * Gets whether the service level objective is enabled. + */ readonly enabled?: boolean; } /** - * @class - * Initializes a new instance of the ElasticPoolActivity class. - * @constructor * Represents the activity on an elastic pool. - * - * @member {string} [location] The geo-location where the resource lives - * @member {date} [endTime] The time the operation finished (ISO8601 format). - * @member {number} [errorCode] The error code if available. - * @member {string} [errorMessage] The error message if available. - * @member {number} [errorSeverity] The error severity if available. - * @member {string} [operation] The operation name. - * @member {uuid} [operationId] The unique operation ID. - * @member {number} [percentComplete] The percentage complete if available. - * @member {number} [requestedDatabaseDtuMax] The requested max DTU per - * database if available. - * @member {number} [requestedDatabaseDtuMin] The requested min DTU per - * database if available. - * @member {number} [requestedDtu] The requested DTU for the pool if available. - * @member {string} [requestedElasticPoolName] The requested name for the - * elastic pool if available. - * @member {number} [requestedStorageLimitInGB] The requested storage limit for - * the pool in GB if available. - * @member {string} [elasticPoolName] The name of the elastic pool. - * @member {string} [serverName] The name of the server the elastic pool is in. - * @member {date} [startTime] The time the operation started (ISO8601 format). - * @member {string} [state] The current state of the operation. - * @member {number} [requestedStorageLimitInMB] The requested storage limit in - * MB. - * @member {number} [requestedDatabaseDtuGuarantee] The requested per database - * DTU guarantee. - * @member {number} [requestedDatabaseDtuCap] The requested per database DTU - * cap. - * @member {number} [requestedDtuGuarantee] The requested DTU guarantee. */ export interface ElasticPoolActivity extends ProxyResource { + /** + * The geo-location where the resource lives + */ location?: string; + /** + * The time the operation finished (ISO8601 format). + */ readonly endTime?: Date; + /** + * The error code if available. + */ readonly errorCode?: number; + /** + * The error message if available. + */ readonly errorMessage?: string; + /** + * The error severity if available. + */ readonly errorSeverity?: number; + /** + * The operation name. + */ readonly operation?: string; + /** + * The unique operation ID. + */ readonly operationId?: string; + /** + * The percentage complete if available. + */ readonly percentComplete?: number; + /** + * The requested max DTU per database if available. + */ readonly requestedDatabaseDtuMax?: number; + /** + * The requested min DTU per database if available. + */ readonly requestedDatabaseDtuMin?: number; + /** + * The requested DTU for the pool if available. + */ readonly requestedDtu?: number; + /** + * The requested name for the elastic pool if available. + */ readonly requestedElasticPoolName?: string; + /** + * The requested storage limit for the pool in GB if available. + */ readonly requestedStorageLimitInGB?: number; + /** + * The name of the elastic pool. + */ readonly elasticPoolName?: string; + /** + * The name of the server the elastic pool is in. + */ readonly serverName?: string; + /** + * The time the operation started (ISO8601 format). + */ readonly startTime?: Date; + /** + * The current state of the operation. + */ readonly state?: string; + /** + * The requested storage limit in MB. + */ readonly requestedStorageLimitInMB?: number; + /** + * The requested per database DTU guarantee. + */ readonly requestedDatabaseDtuGuarantee?: number; + /** + * The requested per database DTU cap. + */ readonly requestedDatabaseDtuCap?: number; + /** + * The requested DTU guarantee. + */ readonly requestedDtuGuarantee?: number; } /** - * @class - * Initializes a new instance of the ElasticPoolDatabaseActivity class. - * @constructor * Represents the activity on an elastic pool. - * - * @member {string} [location] The geo-location where the resource lives - * @member {string} [databaseName] The database name. - * @member {date} [endTime] The time the operation finished (ISO8601 format). - * @member {number} [errorCode] The error code if available. - * @member {string} [errorMessage] The error message if available. - * @member {number} [errorSeverity] The error severity if available. - * @member {string} [operation] The operation name. - * @member {uuid} [operationId] The unique operation ID. - * @member {number} [percentComplete] The percentage complete if available. - * @member {string} [requestedElasticPoolName] The name for the elastic pool - * the database is moving into if available. - * @member {string} [currentElasticPoolName] The name of the current elastic - * pool the database is in if available. - * @member {string} [currentServiceObjective] The name of the current service - * objective if available. - * @member {string} [requestedServiceObjective] The name of the requested - * service objective if available. - * @member {string} [serverName] The name of the server the elastic pool is in. - * @member {date} [startTime] The time the operation started (ISO8601 format). - * @member {string} [state] The current state of the operation. */ export interface ElasticPoolDatabaseActivity extends ProxyResource { + /** + * The geo-location where the resource lives + */ location?: string; + /** + * The database name. + */ readonly databaseName?: string; + /** + * The time the operation finished (ISO8601 format). + */ readonly endTime?: Date; + /** + * The error code if available. + */ readonly errorCode?: number; + /** + * The error message if available. + */ readonly errorMessage?: string; + /** + * The error severity if available. + */ readonly errorSeverity?: number; + /** + * The operation name. + */ readonly operation?: string; + /** + * The unique operation ID. + */ readonly operationId?: string; + /** + * The percentage complete if available. + */ readonly percentComplete?: number; + /** + * The name for the elastic pool the database is moving into if available. + */ readonly requestedElasticPoolName?: string; + /** + * The name of the current elastic pool the database is in if available. + */ readonly currentElasticPoolName?: string; + /** + * The name of the current service objective if available. + */ readonly currentServiceObjective?: string; + /** + * The name of the requested service objective if available. + */ readonly requestedServiceObjective?: string; + /** + * The name of the server the elastic pool is in. + */ readonly serverName?: string; + /** + * The time the operation started (ISO8601 format). + */ readonly startTime?: Date; + /** + * The current state of the operation. + */ readonly state?: string; } /** - * @class - * Initializes a new instance of the OperationImpact class. - * @constructor * The impact of an operation, both in absolute and relative terms. - * - * @member {string} [name] The name of the impact dimension. - * @member {string} [unit] The unit in which estimated impact to dimension is - * measured. - * @member {number} [changeValueAbsolute] The absolute impact to dimension. - * @member {number} [changeValueRelative] The relative impact to dimension - * (null if not applicable) */ export interface OperationImpact { + /** + * The name of the impact dimension. + */ readonly name?: string; + /** + * The unit in which estimated impact to dimension is measured. + */ readonly unit?: string; + /** + * The absolute impact to dimension. + */ readonly changeValueAbsolute?: number; + /** + * The relative impact to dimension (null if not applicable) + */ readonly changeValueRelative?: number; } /** - * @class - * Initializes a new instance of the RecommendedIndex class. - * @constructor * Represents a database recommended index. - * - * @member {string} [action] The proposed index action. You can create a - * missing index, drop an unused index, or rebuild an existing index to improve - * its performance. Possible values include: 'Create', 'Drop', 'Rebuild' - * @member {string} [state] The current recommendation state. Possible values - * include: 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - * 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - * @member {date} [created] The UTC datetime showing when this resource was - * created (ISO8601 format). - * @member {date} [lastModified] The UTC datetime of when was this resource - * last changed (ISO8601 format). - * @member {string} [indexType] The type of index (CLUSTERED, NONCLUSTERED, - * COLUMNSTORE, CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', - * 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - * @member {string} [schema] The schema where table to build index over resides - * @member {string} [table] The table on which to build index. - * @member {array} [columns] Columns over which to build index - * @member {array} [includedColumns] The list of column names to be included in - * the index - * @member {string} [indexScript] The full build index script - * @member {array} [estimatedImpact] The estimated impact of doing recommended - * index action. - * @member {array} [reportedImpact] The values reported after index action is - * complete. */ export interface RecommendedIndex extends ProxyResource { + /** + * The proposed index action. You can create a missing index, drop an unused index, or rebuild an + * existing index to improve its performance. Possible values include: 'Create', 'Drop', + * 'Rebuild' + */ readonly action?: string; + /** + * The current recommendation state. Possible values include: 'Active', 'Pending', 'Executing', + * 'Verifying', 'Pending Revert', 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', + * 'Success' + */ readonly state?: string; + /** + * The UTC datetime showing when this resource was created (ISO8601 format). + */ readonly created?: Date; + /** + * The UTC datetime of when was this resource last changed (ISO8601 format). + */ readonly lastModified?: Date; + /** + * The type of index (CLUSTERED, NONCLUSTERED, COLUMNSTORE, CLUSTERED COLUMNSTORE). Possible + * values include: 'CLUSTERED', 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' + */ readonly indexType?: string; + /** + * The schema where table to build index over resides + */ readonly schema?: string; + /** + * The table on which to build index. + */ readonly table?: string; + /** + * Columns over which to build index + */ readonly columns?: string[]; + /** + * The list of column names to be included in the index + */ readonly includedColumns?: string[]; + /** + * The full build index script + */ readonly indexScript?: string; + /** + * The estimated impact of doing recommended index action. + */ readonly estimatedImpact?: OperationImpact[]; + /** + * The values reported after index action is complete. + */ readonly reportedImpact?: OperationImpact[]; } /** - * @class - * Initializes a new instance of the TransparentDataEncryption class. - * @constructor * Represents a database transparent data encryption configuration. - * - * @member {string} [location] Resource location. - * @member {string} [status] The status of the database transparent data - * encryption. Possible values include: 'Enabled', 'Disabled' */ export interface TransparentDataEncryption extends ProxyResource { + /** + * Resource location. + */ readonly location?: string; + /** + * The status of the database transparent data encryption. Possible values include: 'Enabled', + * 'Disabled' + */ status?: string; } /** - * @class - * Initializes a new instance of the SloUsageMetric class. - * @constructor * A Slo Usage Metric. - * - * @member {string} [serviceLevelObjective] The serviceLevelObjective for SLO - * usage metric. Possible values include: 'System', 'System0', 'System1', - * 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', - * 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', - * 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', - * 'DW200', 'DW300', 'DW400', 'DW500', 'DW600', 'DW1000', 'DW1200', 'DW1000c', - * 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', 'DW2500c', 'DW3000c', - * 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', - * 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', - * 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - * @member {uuid} [serviceLevelObjectiveId] The serviceLevelObjectiveId for SLO - * usage metric. - * @member {number} [inRangeTimeRatio] Gets or sets inRangeTimeRatio for SLO - * usage metric. */ export interface SloUsageMetric { + /** + * The serviceLevelObjective for SLO usage metric. Possible values include: 'System', 'System0', + * 'System1', 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', 'Free', + * 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', 'P1', 'P2', 'P3', 'P4', 'P6', + * 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', 'PRS6', 'DW100', 'DW200', 'DW300', 'DW400', 'DW500', + * 'DW600', 'DW1000', 'DW1200', 'DW1000c', 'DW1500', 'DW1500c', 'DW2000', 'DW2000c', 'DW3000', + * 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', 'DW10000c', 'DW15000c', + * 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', 'DS500', 'DS600', 'DS1000', 'DS1200', + * 'DS1500', 'DS2000', 'ElasticPool' + */ readonly serviceLevelObjective?: string; + /** + * The serviceLevelObjectiveId for SLO usage metric. + */ readonly serviceLevelObjectiveId?: string; + /** + * Gets or sets inRangeTimeRatio for SLO usage metric. + */ readonly inRangeTimeRatio?: number; } /** - * @class - * Initializes a new instance of the ServiceTierAdvisor class. - * @constructor * Represents a Service Tier Advisor. - * - * @member {date} [observationPeriodStart] The observation period start - * (ISO8601 format). - * @member {date} [observationPeriodEnd] The observation period start (ISO8601 - * format). - * @member {number} [activeTimeRatio] The activeTimeRatio for service tier - * advisor. - * @member {number} [minDtu] Gets or sets minDtu for service tier advisor. - * @member {number} [avgDtu] Gets or sets avgDtu for service tier advisor. - * @member {number} [maxDtu] Gets or sets maxDtu for service tier advisor. - * @member {number} [maxSizeInGB] Gets or sets maxSizeInGB for service tier - * advisor. - * @member {array} [serviceLevelObjectiveUsageMetrics] Gets or sets - * serviceLevelObjectiveUsageMetrics for the service tier advisor. - * @member {string} [currentServiceLevelObjective] Gets or sets - * currentServiceLevelObjective for service tier advisor. - * @member {uuid} [currentServiceLevelObjectiveId] Gets or sets - * currentServiceLevelObjectiveId for service tier advisor. - * @member {string} [usageBasedRecommendationServiceLevelObjective] Gets or - * sets usageBasedRecommendationServiceLevelObjective for service tier advisor. - * @member {uuid} [usageBasedRecommendationServiceLevelObjectiveId] Gets or - * sets usageBasedRecommendationServiceLevelObjectiveId for service tier - * advisor. - * @member {string} [databaseSizeBasedRecommendationServiceLevelObjective] Gets - * or sets databaseSizeBasedRecommendationServiceLevelObjective for service - * tier advisor. - * @member {uuid} [databaseSizeBasedRecommendationServiceLevelObjectiveId] Gets - * or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service - * tier advisor. - * @member {string} [disasterPlanBasedRecommendationServiceLevelObjective] Gets - * or sets disasterPlanBasedRecommendationServiceLevelObjective for service - * tier advisor. - * @member {uuid} [disasterPlanBasedRecommendationServiceLevelObjectiveId] Gets - * or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service - * tier advisor. - * @member {string} [overallRecommendationServiceLevelObjective] Gets or sets - * overallRecommendationServiceLevelObjective for service tier advisor. - * @member {uuid} [overallRecommendationServiceLevelObjectiveId] Gets or sets - * overallRecommendationServiceLevelObjectiveId for service tier advisor. - * @member {number} [confidence] Gets or sets confidence for service tier - * advisor. */ export interface ServiceTierAdvisor extends ProxyResource { + /** + * The observation period start (ISO8601 format). + */ readonly observationPeriodStart?: Date; + /** + * The observation period start (ISO8601 format). + */ readonly observationPeriodEnd?: Date; + /** + * The activeTimeRatio for service tier advisor. + */ readonly activeTimeRatio?: number; + /** + * Gets or sets minDtu for service tier advisor. + */ readonly minDtu?: number; + /** + * Gets or sets avgDtu for service tier advisor. + */ readonly avgDtu?: number; + /** + * Gets or sets maxDtu for service tier advisor. + */ readonly maxDtu?: number; + /** + * Gets or sets maxSizeInGB for service tier advisor. + */ readonly maxSizeInGB?: number; + /** + * Gets or sets serviceLevelObjectiveUsageMetrics for the service tier advisor. + */ readonly serviceLevelObjectiveUsageMetrics?: SloUsageMetric[]; + /** + * Gets or sets currentServiceLevelObjective for service tier advisor. + */ readonly currentServiceLevelObjective?: string; + /** + * Gets or sets currentServiceLevelObjectiveId for service tier advisor. + */ readonly currentServiceLevelObjectiveId?: string; + /** + * Gets or sets usageBasedRecommendationServiceLevelObjective for service tier advisor. + */ readonly usageBasedRecommendationServiceLevelObjective?: string; + /** + * Gets or sets usageBasedRecommendationServiceLevelObjectiveId for service tier advisor. + */ readonly usageBasedRecommendationServiceLevelObjectiveId?: string; + /** + * Gets or sets databaseSizeBasedRecommendationServiceLevelObjective for service tier advisor. + */ readonly databaseSizeBasedRecommendationServiceLevelObjective?: string; + /** + * Gets or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for service tier advisor. + */ readonly databaseSizeBasedRecommendationServiceLevelObjectiveId?: string; + /** + * Gets or sets disasterPlanBasedRecommendationServiceLevelObjective for service tier advisor. + */ readonly disasterPlanBasedRecommendationServiceLevelObjective?: string; + /** + * Gets or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for service tier advisor. + */ readonly disasterPlanBasedRecommendationServiceLevelObjectiveId?: string; + /** + * Gets or sets overallRecommendationServiceLevelObjective for service tier advisor. + */ readonly overallRecommendationServiceLevelObjective?: string; + /** + * Gets or sets overallRecommendationServiceLevelObjectiveId for service tier advisor. + */ readonly overallRecommendationServiceLevelObjectiveId?: string; + /** + * Gets or sets confidence for service tier advisor. + */ readonly confidence?: number; } /** - * @class - * Initializes a new instance of the TransparentDataEncryptionActivity class. - * @constructor * Represents a database transparent data encryption Scan. - * - * @member {string} [location] Resource location. - * @member {string} [status] The status of the database. Possible values - * include: 'Encrypting', 'Decrypting' - * @member {number} [percentComplete] The percent complete of the transparent - * data encryption scan for a database. */ export interface TransparentDataEncryptionActivity extends ProxyResource { + /** + * Resource location. + */ readonly location?: string; + /** + * The status of the database. Possible values include: 'Encrypting', 'Decrypting' + */ readonly status?: string; + /** + * The percent complete of the transparent data encryption scan for a database. + */ readonly percentComplete?: number; } /** - * @class - * Initializes a new instance of the ServerUsage class. - * @constructor * Represents server metrics. - * - * @member {string} [name] Name of the server usage metric. - * @member {string} [resourceName] The name of the resource. - * @member {string} [displayName] The metric display name. - * @member {number} [currentValue] The current value of the metric. - * @member {number} [limit] The current limit of the metric. - * @member {string} [unit] The units of the metric. - * @member {date} [nextResetTime] The next reset time for the metric (ISO8601 - * format). */ export interface ServerUsage { + /** + * Name of the server usage metric. + */ readonly name?: string; + /** + * The name of the resource. + */ readonly resourceName?: string; + /** + * The metric display name. + */ readonly displayName?: string; + /** + * The current value of the metric. + */ readonly currentValue?: number; + /** + * The current limit of the metric. + */ readonly limit?: number; + /** + * The units of the metric. + */ readonly unit?: string; + /** + * The next reset time for the metric (ISO8601 format). + */ readonly nextResetTime?: Date; } /** - * @class - * Initializes a new instance of the DatabaseUsage class. - * @constructor * The database usages. - * - * @member {string} [name] The name of the usage metric. - * @member {string} [resourceName] The name of the resource. - * @member {string} [displayName] The usage metric display name. - * @member {number} [currentValue] The current value of the usage metric. - * @member {number} [limit] The current limit of the usage metric. - * @member {string} [unit] The units of the usage metric. - * @member {date} [nextResetTime] The next reset time for the usage metric - * (ISO8601 format). */ export interface DatabaseUsage { + /** + * The name of the usage metric. + */ readonly name?: string; + /** + * The name of the resource. + */ readonly resourceName?: string; + /** + * The usage metric display name. + */ readonly displayName?: string; + /** + * The current value of the usage metric. + */ readonly currentValue?: number; + /** + * The current limit of the usage metric. + */ readonly limit?: number; + /** + * The units of the usage metric. + */ readonly unit?: string; + /** + * The next reset time for the usage metric (ISO8601 format). + */ readonly nextResetTime?: Date; } /** - * @class - * Initializes a new instance of the AutomaticTuningOptions class. - * @constructor * Automatic tuning properties for individual advisors. - * - * @member {string} [desiredState] Automatic tuning option desired state. - * Possible values include: 'Off', 'On', 'Default' - * @member {string} [actualState] Automatic tuning option actual state. - * Possible values include: 'Off', 'On' - * @member {number} [reasonCode] Reason code if desired and actual state are - * different. - * @member {string} [reasonDesc] Reason description if desired and actual state - * are different. Possible values include: 'Default', 'Disabled', - * 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', - * 'QueryStoreReadOnly', 'NotSupported' */ export interface AutomaticTuningOptions { + /** + * Automatic tuning option desired state. Possible values include: 'Off', 'On', 'Default' + */ desiredState?: string; + /** + * Automatic tuning option actual state. Possible values include: 'Off', 'On' + */ readonly actualState?: string; + /** + * Reason code if desired and actual state are different. + */ readonly reasonCode?: number; + /** + * Reason description if desired and actual state are different. Possible values include: + * 'Default', 'Disabled', 'AutoConfigured', 'InheritedFromServer', 'QueryStoreOff', + * 'QueryStoreReadOnly', 'NotSupported' + */ readonly reasonDesc?: string; } /** - * @class - * Initializes a new instance of the DatabaseAutomaticTuning class. - * @constructor * Database-level Automatic Tuning. - * - * @member {string} [desiredState] Automatic tuning desired state. Possible - * values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - * @member {string} [actualState] Automatic tuning actual state. Possible - * values include: 'Inherit', 'Custom', 'Auto', 'Unspecified' - * @member {object} [options] Automatic tuning options definition. */ export interface DatabaseAutomaticTuning extends ProxyResource { + /** + * Automatic tuning desired state. Possible values include: 'Inherit', 'Custom', 'Auto', + * 'Unspecified' + */ desiredState?: string; + /** + * Automatic tuning actual state. Possible values include: 'Inherit', 'Custom', 'Auto', + * 'Unspecified' + */ readonly actualState?: string; + /** + * Automatic tuning options definition. + */ options?: { [propertyName: string]: AutomaticTuningOptions }; } /** - * @class - * Initializes a new instance of the EncryptionProtector class. - * @constructor * The server encryption protector. - * - * @member {string} [kind] Kind of encryption protector. This is metadata used - * for the Azure portal experience. - * @member {string} [location] Resource location. - * @member {string} [subregion] Subregion of the encryption protector. - * @member {string} [serverKeyName] The name of the server key. - * @member {string} serverKeyType The encryption protector type like - * 'ServiceManaged', 'AzureKeyVault'. Possible values include: - * 'ServiceManaged', 'AzureKeyVault' - * @member {string} [uri] The URI of the server key. - * @member {string} [thumbprint] Thumbprint of the server key. */ export interface EncryptionProtector extends ProxyResource { + /** + * Kind of encryption protector. This is metadata used for the Azure portal experience. + */ kind?: string; + /** + * Resource location. + */ readonly location?: string; + /** + * Subregion of the encryption protector. + */ readonly subregion?: string; + /** + * The name of the server key. + */ serverKeyName?: string; + /** + * The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' + */ serverKeyType: string; + /** + * The URI of the server key. + */ readonly uri?: string; + /** + * Thumbprint of the server key. + */ readonly thumbprint?: string; } /** - * @class - * Initializes a new instance of the FailoverGroupReadWriteEndpoint class. - * @constructor * Read-write endpoint of the failover group instance. - * - * @member {string} 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' - * @member {number} [failoverWithDataLossGracePeriodMinutes] Grace period - * before failover with data loss is attempted for the read-write endpoint. If - * failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - * required. */ export interface FailoverGroupReadWriteEndpoint { + /** + * Failover policy of the read-write endpoint for the failover group. If failoverPolicy is + * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible values include: + * 'Manual', 'Automatic' + */ failoverPolicy: string; + /** + * Grace period before failover with data loss is attempted for the read-write endpoint. If + * failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. + */ failoverWithDataLossGracePeriodMinutes?: number; } /** - * @class - * Initializes a new instance of the FailoverGroupReadOnlyEndpoint class. - * @constructor * Read-only endpoint of the failover group instance. - * - * @member {string} [failoverPolicy] Failover policy of the read-only endpoint - * for the failover group. Possible values include: 'Disabled', 'Enabled' */ export interface FailoverGroupReadOnlyEndpoint { + /** + * Failover policy of the read-only endpoint for the failover group. Possible values include: + * 'Disabled', 'Enabled' + */ failoverPolicy?: string; } /** - * @class - * Initializes a new instance of the PartnerInfo class. - * @constructor * Partner server information for the failover group. - * - * @member {string} id Resource identifier of the partner server. - * @member {string} [location] Geo location of the partner server. - * @member {string} [replicationRole] Replication role of the partner server. - * Possible values include: 'Primary', 'Secondary' */ export interface PartnerInfo { + /** + * Resource identifier of the partner server. + */ id: string; + /** + * Geo location of the partner server. + */ readonly location?: string; + /** + * Replication role of the partner server. Possible values include: 'Primary', 'Secondary' + */ readonly replicationRole?: string; } /** - * @class - * Initializes a new instance of the FailoverGroup class. - * @constructor * A failover group. - * - * @member {string} [location] Resource location. - * @member {object} [tags] Resource tags. - * @member {object} readWriteEndpoint Read-write endpoint of the failover group - * instance. - * @member {string} [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' - * @member {number} [readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] - * Grace period before failover with data loss is attempted for the read-write - * endpoint. If failoverPolicy is Automatic then - * failoverWithDataLossGracePeriodMinutes is required. - * @member {object} [readOnlyEndpoint] Read-only endpoint of the failover group - * instance. - * @member {string} [readOnlyEndpoint.failoverPolicy] Failover policy of the - * read-only endpoint for the failover group. Possible values include: - * 'Disabled', 'Enabled' - * @member {string} [replicationRole] Local replication role of the failover - * group instance. Possible values include: 'Primary', 'Secondary' - * @member {string} [replicationState] Replication state of the failover group - * instance. - * @member {array} partnerServers List of partner server information for the - * failover group. - * @member {array} [databases] List of databases in the failover group. */ export interface FailoverGroup extends ProxyResource { + /** + * Resource location. + */ readonly location?: string; + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; + /** + * Read-write endpoint of the failover group instance. + */ readWriteEndpoint: FailoverGroupReadWriteEndpoint; + /** + * Read-only endpoint of the failover group instance. + */ readOnlyEndpoint?: FailoverGroupReadOnlyEndpoint; + /** + * Local replication role of the failover group instance. Possible values include: 'Primary', + * 'Secondary' + */ readonly replicationRole?: string; + /** + * Replication state of the failover group instance. + */ readonly replicationState?: string; + /** + * List of partner server information for the failover group. + */ partnerServers: PartnerInfo[]; + /** + * List of databases in the failover group. + */ databases?: string[]; } /** - * @class - * Initializes a new instance of the FailoverGroupUpdate class. - * @constructor * A failover group update request. - * - * @member {object} [readWriteEndpoint] Read-write endpoint of the failover - * group instance. - * @member {string} [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' - * @member {number} [readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] - * Grace period before failover with data loss is attempted for the read-write - * endpoint. If failoverPolicy is Automatic then - * failoverWithDataLossGracePeriodMinutes is required. - * @member {object} [readOnlyEndpoint] Read-only endpoint of the failover group - * instance. - * @member {string} [readOnlyEndpoint.failoverPolicy] Failover policy of the - * read-only endpoint for the failover group. Possible values include: - * 'Disabled', 'Enabled' - * @member {array} [databases] List of databases in the failover group. - * @member {object} [tags] Resource tags. */ export interface FailoverGroupUpdate { + /** + * Read-write endpoint of the failover group instance. + */ readWriteEndpoint?: FailoverGroupReadWriteEndpoint; + /** + * Read-only endpoint of the failover group instance. + */ readOnlyEndpoint?: FailoverGroupReadOnlyEndpoint; + /** + * List of databases in the failover group. + */ databases?: string[]; + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the ResourceIdentity class. - * @constructor * Azure Active Directory identity configuration for a resource. - * - * @member {uuid} [principalId] The Azure Active Directory principal id. - * @member {string} [type] The identity type. Set this to 'SystemAssigned' in - * order to automatically create and assign an Azure Active Directory principal - * for the resource. Possible values include: 'SystemAssigned' - * @member {uuid} [tenantId] The Azure Active Directory tenant id. */ export interface ResourceIdentity { + /** + * The Azure Active Directory principal id. + */ readonly principalId?: string; + /** + * The identity type. Set this to 'SystemAssigned' in order to automatically create and assign an + * Azure Active Directory principal for the resource. Possible values include: 'SystemAssigned' + */ type?: string; + /** + * The Azure Active Directory tenant id. + */ readonly tenantId?: string; } /** - * @class - * Initializes a new instance of the Sku class. - * @constructor * The resource model definition representing SKU - * - * @member {string} name The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [size] The SKU size. When the name field is the combination - * of tier and some other value, this would be the standalone code. - * @member {string} [family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. */ export interface Sku { + /** + * The name of the SKU. Ex - P3. It is typically a letter+number code + */ name: string; + /** + * This field is required to be implemented by the Resource Provider if the service has more than + * one tier, but is not required on a PUT. + */ tier?: string; + /** + * The SKU size. When the name field is the combination of tier and some other value, this would + * be the standalone code. + */ size?: string; + /** + * If the service has different generations of hardware, for the same SKU, then that can be + * captured here. + */ family?: string; + /** + * If the SKU supports scale out/in then the capacity integer should be included. If scale out/in + * is not possible for the resource this may be omitted. + */ capacity?: number; } /** - * @class - * Initializes a new instance of the ManagedInstance class. - * @constructor * An Azure SQL managed instance. - * - * @member {object} [identity] The Azure Active Directory identity of the - * managed instance. - * @member {uuid} [identity.principalId] The Azure Active Directory principal - * id. - * @member {string} [identity.type] The identity type. Set this to - * 'SystemAssigned' in order to automatically create and assign an Azure Active - * Directory principal for the resource. Possible values include: - * 'SystemAssigned' - * @member {uuid} [identity.tenantId] The Azure Active Directory tenant id. - * @member {object} [sku] Managed instance sku - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [sku.tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. - * @member {string} [fullyQualifiedDomainName] The fully qualified domain name - * of the managed instance. - * @member {string} [administratorLogin] Administrator username for the managed - * instance. Can only be specified when the managed instance is being created - * (and is required for creation). - * @member {string} [administratorLoginPassword] The administrator login - * password (required for managed instance creation). - * @member {string} [subnetId] Subnet resource ID for the managed instance. - * @member {string} [state] The state of the managed instance. - * @member {string} [licenseType] The license type. Possible values are - * 'LicenseIncluded' and 'BasePrice'. - * @member {number} [vCores] The number of VCores. - * @member {number} [storageSizeInGB] The maximum storage size in GB. - * @member {string} [collation] Collation of the managed instance. - * @member {string} [dnsZone] The Dns Zone that the managed instance is in. - * @member {string} [dnsZonePartner] The resource id of another managed - * instance whose DNS zone this managed instance will share after creation. */ export interface ManagedInstance extends TrackedResource { + /** + * The Azure Active Directory identity of the managed instance. + */ identity?: ResourceIdentity; + /** + * Managed instance sku + */ sku?: Sku; + /** + * The fully qualified domain name of the managed instance. + */ readonly fullyQualifiedDomainName?: string; + /** + * Administrator username for the managed instance. Can only be specified when the managed + * instance is being created (and is required for creation). + */ administratorLogin?: string; + /** + * The administrator login password (required for managed instance creation). + */ administratorLoginPassword?: string; + /** + * Subnet resource ID for the managed instance. + */ subnetId?: string; + /** + * The state of the managed instance. + */ readonly state?: string; + /** + * The license type. Possible values are 'LicenseIncluded' and 'BasePrice'. + */ licenseType?: string; + /** + * The number of VCores. + */ vCores?: number; + /** + * The maximum storage size in GB. + */ storageSizeInGB?: number; + /** + * Collation of the managed instance. + */ collation?: string; + /** + * The Dns Zone that the managed instance is in. + */ readonly dnsZone?: string; + /** + * The resource id of another managed instance whose DNS zone this managed instance will share + * after creation. + */ dnsZonePartner?: string; + /** + * Whether or not the public data endpoint is enabled. + */ + publicDataEndpointEnabled?: boolean; + /** + * Connection type used for connecting to the instance. Possible values include: 'Proxy', + * 'Redirect', 'Default' + */ + proxyOverride?: string; + /** + * Id of the timezone. Allowed values are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM + * sys.time_zone_info. + * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in + * PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + */ + timezoneId?: string; } /** - * @class - * Initializes a new instance of the ManagedInstanceUpdate class. - * @constructor * An update request for an Azure SQL Database managed instance. - * - * @member {object} [sku] Managed instance sku - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [sku.tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. - * @member {string} [fullyQualifiedDomainName] The fully qualified domain name - * of the managed instance. - * @member {string} [administratorLogin] Administrator username for the managed - * instance. Can only be specified when the managed instance is being created - * (and is required for creation). - * @member {string} [administratorLoginPassword] The administrator login - * password (required for managed instance creation). - * @member {string} [subnetId] Subnet resource ID for the managed instance. - * @member {string} [state] The state of the managed instance. - * @member {string} [licenseType] The license type. Possible values are - * 'LicenseIncluded' and 'BasePrice'. - * @member {number} [vCores] The number of VCores. - * @member {number} [storageSizeInGB] The maximum storage size in GB. - * @member {string} [collation] Collation of the managed instance. - * @member {string} [dnsZone] The Dns Zone that the managed instance is in. - * @member {string} [dnsZonePartner] The resource id of another managed - * instance whose DNS zone this managed instance will share after creation. - * @member {object} [tags] Resource tags. */ export interface ManagedInstanceUpdate { + /** + * Managed instance sku + */ sku?: Sku; + /** + * The fully qualified domain name of the managed instance. + */ readonly fullyQualifiedDomainName?: string; + /** + * Administrator username for the managed instance. Can only be specified when the managed + * instance is being created (and is required for creation). + */ administratorLogin?: string; + /** + * The administrator login password (required for managed instance creation). + */ administratorLoginPassword?: string; + /** + * Subnet resource ID for the managed instance. + */ subnetId?: string; + /** + * The state of the managed instance. + */ readonly state?: string; + /** + * The license type. Possible values are 'LicenseIncluded' and 'BasePrice'. + */ licenseType?: string; + /** + * The number of VCores. + */ vCores?: number; + /** + * The maximum storage size in GB. + */ storageSizeInGB?: number; + /** + * Collation of the managed instance. + */ collation?: string; + /** + * The Dns Zone that the managed instance is in. + */ readonly dnsZone?: string; + /** + * The resource id of another managed instance whose DNS zone this managed instance will share + * after creation. + */ dnsZonePartner?: string; + /** + * Whether or not the public data endpoint is enabled. + */ + publicDataEndpointEnabled?: boolean; + /** + * Connection type used for connecting to the instance. Possible values include: 'Proxy', + * 'Redirect', 'Default' + */ + proxyOverride?: string; + /** + * Id of the timezone. Allowed values are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS timezone_id FROM + * sys.time_zone_info. + * List of Ids can also be obtained by executing [System.TimeZoneInfo]::GetSystemTimeZones() in + * PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe Standard Time". + */ + timezoneId?: string; + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the OperationDisplay class. - * @constructor * Display metadata associated with the operation. - * - * @member {string} [provider] The localized friendly form of the resource - * provider name. - * @member {string} [resource] The localized friendly form of the resource type - * related to this action/operation. - * @member {string} [operation] The localized friendly name for the operation. - * @member {string} [description] The localized friendly description for the - * operation. */ export interface OperationDisplay { + /** + * The localized friendly form of the resource provider name. + */ readonly provider?: string; + /** + * The localized friendly form of the resource type related to this action/operation. + */ readonly resource?: string; + /** + * The localized friendly name for the operation. + */ readonly operation?: string; + /** + * The localized friendly description for the operation. + */ readonly description?: string; } /** - * @class - * Initializes a new instance of the Operation class. - * @constructor * SQL REST API operation definition. - * - * @member {string} [name] The name of the operation being performed on this - * particular object. - * @member {object} [display] The localized display information for this - * particular operation / action. - * @member {string} [display.provider] The localized friendly form of the - * resource provider name. - * @member {string} [display.resource] The localized friendly form of the - * resource type related to this action/operation. - * @member {string} [display.operation] The localized friendly name for the - * operation. - * @member {string} [display.description] The localized friendly description - * for the operation. - * @member {string} [origin] The intended executor of the operation. Possible - * values include: 'user', 'system' - * @member {object} [properties] Additional descriptions for the operation. */ export interface Operation { + /** + * The name of the operation being performed on this particular object. + */ readonly name?: string; + /** + * The localized display information for this particular operation / action. + */ readonly display?: OperationDisplay; + /** + * The intended executor of the operation. Possible values include: 'user', 'system' + */ readonly origin?: string; + /** + * Additional descriptions for the operation. + */ readonly properties?: { [propertyName: string]: any }; } /** - * @class - * Initializes a new instance of the ServerKey class. - * @constructor * A server key. - * - * @member {string} [kind] Kind of encryption protector. This is metadata used - * for the Azure portal experience. - * @member {string} [location] Resource location. - * @member {string} [subregion] Subregion of the server key. - * @member {string} serverKeyType The server key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' - * @member {string} [uri] The URI of the server key. - * @member {string} [thumbprint] Thumbprint of the server key. - * @member {date} [creationDate] The server key creation date. */ export interface ServerKey extends ProxyResource { + /** + * Kind of encryption protector. This is metadata used for the Azure portal experience. + */ kind?: string; + /** + * Resource location. + */ readonly location?: string; + /** + * Subregion of the server key. + */ readonly subregion?: string; + /** + * The server key type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' + */ serverKeyType: string; + /** + * The URI of the server key. + */ uri?: string; + /** + * Thumbprint of the server key. + */ thumbprint?: string; + /** + * The server key creation date. + */ creationDate?: Date; } /** - * @class - * Initializes a new instance of the Server class. - * @constructor * An Azure SQL Database server. - * - * @member {object} [identity] The Azure Active Directory identity of the - * server. - * @member {uuid} [identity.principalId] The Azure Active Directory principal - * id. - * @member {string} [identity.type] The identity type. Set this to - * 'SystemAssigned' in order to automatically create and assign an Azure Active - * Directory principal for the resource. Possible values include: - * 'SystemAssigned' - * @member {uuid} [identity.tenantId] The Azure Active Directory tenant id. - * @member {string} [kind] Kind of sql server. This is metadata used for the - * Azure portal experience. - * @member {string} [administratorLogin] Administrator username for the server. - * Once created it cannot be changed. - * @member {string} [administratorLoginPassword] The administrator login - * password (required for server creation). - * @member {string} [version] The version of the server. - * @member {string} [state] The state of the server. - * @member {string} [fullyQualifiedDomainName] The fully qualified domain name - * of the server. */ export interface Server extends TrackedResource { + /** + * The Azure Active Directory identity of the server. + */ identity?: ResourceIdentity; + /** + * Kind of sql server. This is metadata used for the Azure portal experience. + */ readonly kind?: string; + /** + * Administrator username for the server. Once created it cannot be changed. + */ administratorLogin?: string; + /** + * The administrator login password (required for server creation). + */ administratorLoginPassword?: string; + /** + * The version of the server. + */ version?: string; + /** + * The state of the server. + */ readonly state?: string; + /** + * The fully qualified domain name of the server. + */ readonly fullyQualifiedDomainName?: string; } /** - * @class - * Initializes a new instance of the ServerUpdate class. - * @constructor * An update request for an Azure SQL Database server. - * - * @member {string} [administratorLogin] Administrator username for the server. - * Once created it cannot be changed. - * @member {string} [administratorLoginPassword] The administrator login - * password (required for server creation). - * @member {string} [version] The version of the server. - * @member {string} [state] The state of the server. - * @member {string} [fullyQualifiedDomainName] The fully qualified domain name - * of the server. - * @member {object} [tags] Resource tags. */ export interface ServerUpdate { + /** + * Administrator username for the server. Once created it cannot be changed. + */ administratorLogin?: string; + /** + * The administrator login password (required for server creation). + */ administratorLoginPassword?: string; + /** + * The version of the server. + */ version?: string; + /** + * The state of the server. + */ readonly state?: string; + /** + * The fully qualified domain name of the server. + */ readonly fullyQualifiedDomainName?: string; + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the SyncAgent class. - * @constructor * An Azure SQL Database sync agent. - * - * @member {string} [syncAgentName] Name of the sync agent. - * @member {string} [syncDatabaseId] ARM resource id of the sync database in - * the sync agent. - * @member {date} [lastAliveTime] Last alive time of the sync agent. - * @member {string} [state] State of the sync agent. Possible values include: - * 'Online', 'Offline', 'NeverConnected' - * @member {boolean} [isUpToDate] If the sync agent version is up to date. - * @member {date} [expiryTime] Expiration time of the sync agent version. - * @member {string} [version] Version of the sync agent. */ export interface SyncAgent extends ProxyResource { + /** + * Name of the sync agent. + */ readonly syncAgentName?: string; + /** + * ARM resource id of the sync database in the sync agent. + */ syncDatabaseId?: string; + /** + * Last alive time of the sync agent. + */ readonly lastAliveTime?: Date; + /** + * State of the sync agent. Possible values include: 'Online', 'Offline', 'NeverConnected' + */ readonly state?: string; + /** + * If the sync agent version is up to date. + */ readonly isUpToDate?: boolean; + /** + * Expiration time of the sync agent version. + */ readonly expiryTime?: Date; + /** + * Version of the sync agent. + */ readonly version?: string; } /** - * @class - * Initializes a new instance of the SyncAgentKeyProperties class. - * @constructor * Properties of an Azure SQL Database sync agent key. - * - * @member {string} [syncAgentKey] Key of sync agent. */ export interface SyncAgentKeyProperties { + /** + * Key of sync agent. + */ readonly syncAgentKey?: string; } /** - * @class - * Initializes a new instance of the SyncAgentLinkedDatabase class. - * @constructor * An Azure SQL Database sync agent linked database. - * - * @member {string} [databaseType] Type of the sync agent linked database. - * Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase' - * @member {string} [databaseId] Id of the sync agent linked database. - * @member {string} [description] Description of the sync agent linked - * database. - * @member {string} [serverName] Server name of the sync agent linked database. - * @member {string} [databaseName] Database name of the sync agent linked - * database. - * @member {string} [userName] User name of the sync agent linked database. */ export interface SyncAgentLinkedDatabase extends ProxyResource { + /** + * Type of the sync agent linked database. Possible values include: 'AzureSqlDatabase', + * 'SqlServerDatabase' + */ readonly databaseType?: string; + /** + * Id of the sync agent linked database. + */ readonly databaseId?: string; + /** + * Description of the sync agent linked database. + */ readonly description?: string; + /** + * Server name of the sync agent linked database. + */ readonly serverName?: string; + /** + * Database name of the sync agent linked database. + */ readonly databaseName?: string; + /** + * User name of the sync agent linked database. + */ readonly userName?: string; } /** - * @class - * Initializes a new instance of the SyncDatabaseIdProperties class. - * @constructor * Properties of the sync database id. - * - * @member {string} [id] ARM resource id of sync database. */ export interface SyncDatabaseIdProperties { + /** + * ARM resource id of sync database. + */ readonly id?: string; } /** - * @class - * Initializes a new instance of the SyncFullSchemaTableColumn class. - * @constructor * Properties of the column in the table of database full schema. - * - * @member {string} [dataSize] Data size of the column. - * @member {string} [dataType] Data type of the column. - * @member {string} [errorId] Error id of the column. - * @member {boolean} [hasError] If there is error in the table. - * @member {boolean} [isPrimaryKey] If it is the primary key of the table. - * @member {string} [name] Name of the column. - * @member {string} [quotedName] Quoted name of the column. */ export interface SyncFullSchemaTableColumn { + /** + * Data size of the column. + */ readonly dataSize?: string; + /** + * Data type of the column. + */ readonly dataType?: string; + /** + * Error id of the column. + */ readonly errorId?: string; + /** + * If there is error in the table. + */ readonly hasError?: boolean; + /** + * If it is the primary key of the table. + */ readonly isPrimaryKey?: boolean; + /** + * Name of the column. + */ readonly name?: string; + /** + * Quoted name of the column. + */ readonly quotedName?: string; } /** - * @class - * Initializes a new instance of the SyncFullSchemaTable class. - * @constructor * Properties of the table in the database full schema. - * - * @member {array} [columns] List of columns in the table of database full - * schema. - * @member {string} [errorId] Error id of the table. - * @member {boolean} [hasError] If there is error in the table. - * @member {string} [name] Name of the table. - * @member {string} [quotedName] Quoted name of the table. */ export interface SyncFullSchemaTable { + /** + * List of columns in the table of database full schema. + */ readonly columns?: SyncFullSchemaTableColumn[]; + /** + * Error id of the table. + */ readonly errorId?: string; + /** + * If there is error in the table. + */ readonly hasError?: boolean; + /** + * Name of the table. + */ readonly name?: string; + /** + * Quoted name of the table. + */ readonly quotedName?: string; } /** - * @class - * Initializes a new instance of the SyncFullSchemaProperties class. - * @constructor * Properties of the database full schema. - * - * @member {array} [tables] List of tables in the database full schema. - * @member {date} [lastUpdateTime] Last update time of the database schema. */ export interface SyncFullSchemaProperties { + /** + * List of tables in the database full schema. + */ readonly tables?: SyncFullSchemaTable[]; + /** + * Last update time of the database schema. + */ readonly lastUpdateTime?: Date; } /** - * @class - * Initializes a new instance of the SyncGroupLogProperties class. - * @constructor * Properties of an Azure SQL Database sync group log. - * - * @member {date} [timestamp] Timestamp of the sync group log. - * @member {string} [type] Type of the sync group log. Possible values include: - * 'All', 'Error', 'Warning', 'Success' - * @member {string} [source] Source of the sync group log. - * @member {string} [details] Details of the sync group log. - * @member {uuid} [tracingId] TracingId of the sync group log. - * @member {string} [operationStatus] OperationStatus of the sync group log. */ export interface SyncGroupLogProperties { + /** + * Timestamp of the sync group log. + */ readonly timestamp?: Date; + /** + * Type of the sync group log. Possible values include: 'All', 'Error', 'Warning', 'Success' + */ readonly type?: string; + /** + * Source of the sync group log. + */ readonly source?: string; + /** + * Details of the sync group log. + */ readonly details?: string; + /** + * TracingId of the sync group log. + */ readonly tracingId?: string; + /** + * OperationStatus of the sync group log. + */ readonly operationStatus?: string; } /** - * @class - * Initializes a new instance of the SyncGroupSchemaTableColumn class. - * @constructor * Properties of column in sync group table. - * - * @member {string} [quotedName] Quoted name of sync group table column. - * @member {string} [dataSize] Data size of the column. - * @member {string} [dataType] Data type of the column. */ export interface SyncGroupSchemaTableColumn { + /** + * Quoted name of sync group table column. + */ quotedName?: string; + /** + * Data size of the column. + */ dataSize?: string; + /** + * Data type of the column. + */ dataType?: string; } /** - * @class - * Initializes a new instance of the SyncGroupSchemaTable class. - * @constructor * Properties of table in sync group schema. - * - * @member {array} [columns] List of columns in sync group schema. - * @member {string} [quotedName] Quoted name of sync group schema table. */ export interface SyncGroupSchemaTable { + /** + * List of columns in sync group schema. + */ columns?: SyncGroupSchemaTableColumn[]; + /** + * Quoted name of sync group schema table. + */ quotedName?: string; } /** - * @class - * Initializes a new instance of the SyncGroupSchema class. - * @constructor * Properties of sync group schema. - * - * @member {array} [tables] List of tables in sync group schema. - * @member {string} [masterSyncMemberName] Name of master sync member where the - * schema is from. */ export interface SyncGroupSchema { + /** + * List of tables in sync group schema. + */ tables?: SyncGroupSchemaTable[]; + /** + * Name of master sync member where the schema is from. + */ masterSyncMemberName?: string; } /** - * @class - * Initializes a new instance of the SyncGroup class. - * @constructor * An Azure SQL Database sync group. - * - * @member {number} [interval] Sync interval of the sync group. - * @member {date} [lastSyncTime] Last sync time of the sync group. - * @member {string} [conflictResolutionPolicy] Conflict resolution policy of - * the sync group. Possible values include: 'HubWin', 'MemberWin' - * @member {string} [syncDatabaseId] ARM resource id of the sync database in - * the sync group. - * @member {string} [hubDatabaseUserName] User name for the sync group hub - * database credential. - * @member {string} [hubDatabasePassword] Password for the sync group hub - * database credential. - * @member {string} [syncState] Sync state of the sync group. Possible values - * include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - * @member {object} [schema] Sync schema of the sync group. - * @member {array} [schema.tables] List of tables in sync group schema. - * @member {string} [schema.masterSyncMemberName] Name of master sync member - * where the schema is from. */ export interface SyncGroup extends ProxyResource { + /** + * Sync interval of the sync group. + */ interval?: number; + /** + * Last sync time of the sync group. + */ readonly lastSyncTime?: Date; + /** + * Conflict resolution policy of the sync group. Possible values include: 'HubWin', 'MemberWin' + */ conflictResolutionPolicy?: string; + /** + * ARM resource id of the sync database in the sync group. + */ syncDatabaseId?: string; + /** + * User name for the sync group hub database credential. + */ hubDatabaseUserName?: string; + /** + * Password for the sync group hub database credential. + */ hubDatabasePassword?: string; + /** + * Sync state of the sync group. Possible values include: 'NotReady', 'Error', 'Warning', + * 'Progressing', 'Good' + */ readonly syncState?: string; + /** + * Sync schema of the sync group. + */ schema?: SyncGroupSchema; } /** - * @class - * Initializes a new instance of the SyncMember class. - * @constructor * An Azure SQL Database sync member. - * - * @member {string} [databaseType] Database type of the sync member. Possible - * values include: 'AzureSqlDatabase', 'SqlServerDatabase' - * @member {string} [syncAgentId] ARM resource id of the sync agent in the sync - * member. - * @member {uuid} [sqlServerDatabaseId] SQL Server database id of the sync - * member. - * @member {string} [serverName] Server name of the member database in the sync - * member - * @member {string} [databaseName] Database name of the member database in the - * sync member. - * @member {string} [userName] User name of the member database in the sync - * member. - * @member {string} [password] Password of the member database in the sync - * member. - * @member {string} [syncDirection] Sync direction of the sync member. Possible - * values include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' - * @member {string} [syncState] Sync state of the sync member. Possible values - * include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', - * 'DisabledTombstoneCleanup', 'DisabledBackupRestore', - * 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', - * 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', - * 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', - * 'ReprovisionFailed', 'UnReprovisioned' */ export interface SyncMember extends ProxyResource { + /** + * Database type of the sync member. Possible values include: 'AzureSqlDatabase', + * 'SqlServerDatabase' + */ databaseType?: string; + /** + * ARM resource id of the sync agent in the sync member. + */ syncAgentId?: string; + /** + * SQL Server database id of the sync member. + */ sqlServerDatabaseId?: string; + /** + * Server name of the member database in the sync member + */ serverName?: string; + /** + * Database name of the member database in the sync member. + */ databaseName?: string; + /** + * User name of the member database in the sync member. + */ userName?: string; + /** + * Password of the member database in the sync member. + */ password?: string; + /** + * Sync direction of the sync member. Possible values include: 'Bidirectional', + * 'OneWayMemberToHub', 'OneWayHubToMember' + */ syncDirection?: string; + /** + * Sync state of the sync member. Possible values include: 'SyncInProgress', 'SyncSucceeded', + * 'SyncFailed', 'DisabledTombstoneCleanup', 'DisabledBackupRestore', + * 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', 'UnProvisioned', + * 'Provisioning', 'Provisioned', 'ProvisionFailed', 'DeProvisioning', 'DeProvisioned', + * 'DeProvisionFailed', 'Reprovisioning', 'ReprovisionFailed', 'UnReprovisioned' + */ readonly syncState?: string; } /** - * @class - * Initializes a new instance of the SubscriptionUsage class. - * @constructor * Usage Metric of a Subscription in a Location. - * - * @member {string} [displayName] User-readable name of the metric. - * @member {number} [currentValue] Current value of the metric. - * @member {number} [limit] Boundary value of the metric. - * @member {string} [unit] Unit of the metric. */ export interface SubscriptionUsage extends ProxyResource { + /** + * User-readable name of the metric. + */ readonly displayName?: string; + /** + * Current value of the metric. + */ readonly currentValue?: number; + /** + * Boundary value of the metric. + */ readonly limit?: number; + /** + * Unit of the metric. + */ readonly unit?: string; } /** - * @class - * Initializes a new instance of the VirtualNetworkRule class. - * @constructor + * An Azure SQL virtual cluster. + */ +export interface VirtualCluster extends TrackedResource { + /** + * Subnet resource ID for the virtual cluster. + */ + readonly subnetId?: string; + /** + * If the service has different generations of hardware, for the same SKU, then that can be + * captured here. + */ + family?: string; + /** + * List of resources in this virtual cluster. + */ + readonly childResources?: string[]; +} + +/** + * An update request for an Azure SQL Database virtual cluster. + */ +export interface VirtualClusterUpdate { + /** + * Subnet resource ID for the virtual cluster. + */ + readonly subnetId?: string; + /** + * If the service has different generations of hardware, for the same SKU, then that can be + * captured here. + */ + family?: string; + /** + * List of resources in this virtual cluster. + */ + readonly childResources?: string[]; + /** + * Resource tags. + */ + tags?: { [propertyName: string]: string }; +} + +/** * A virtual network rule. - * - * @member {string} virtualNetworkSubnetId The ARM resource id of the virtual - * network subnet. - * @member {boolean} [ignoreMissingVnetServiceEndpoint] Create firewall rule - * before the virtual network has vnet service endpoint enabled. - * @member {string} [state] Virtual Network Rule State. Possible values - * include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' */ export interface VirtualNetworkRule extends ProxyResource { + /** + * The ARM resource id of the virtual network subnet. + */ virtualNetworkSubnetId: string; + /** + * Create firewall rule before the virtual network has vnet service endpoint enabled. + */ ignoreMissingVnetServiceEndpoint?: boolean; + /** + * Virtual Network Rule State. Possible values include: 'Initializing', 'InProgress', 'Ready', + * 'Deleting', 'Unknown' + */ readonly state?: string; } /** - * @class - * Initializes a new instance of the ExtendedDatabaseBlobAuditingPolicy class. - * @constructor * An extended database blob auditing policy. - * - * @member {string} [predicateExpression] Specifies condition of where clause - * when creating an audit. - * @member {string} state Specifies the state of the policy. If state is - * Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - * Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, - * storageEndpoint is required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the auditing storage account. If state is Enabled and storageEndpoint is - * specified, storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in the - * audit logs in the storage account. - * @member {array} [auditActionsAndGroups] Specifies the Actions-Groups and - * Actions to audit. - * - * The recommended set of action groups to use is the following combination - - * this will audit all the queries and stored procedures executed against the - * database, as well as successful and failed logins: - * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. - * - * This above combination is also the set that is configured by default when - * enabling auditing from the Azure portal. - * - * The supported action groups to audit are (note: choose only specific groups - * that cover your auditing needs. Using unnecessary groups could lead to very - * large quantities of audit records): - * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP - * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination with - * other groups as this will result in duplicate audit logs. - * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - * For Database auditing policy, specific Actions can also be specified (note - * that Actions cannot be specified for Server auditing policy). The supported - * actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES - * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} - * - * Note that in the above format can refer to an object like a table, - * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, - * respectively. - * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public - * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - * @member {uuid} [storageAccountSubscriptionId] Specifies the blob storage - * subscription Id. - * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether - * storageAccountAccessKey value is the storage's secondary key. - * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit - * events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - * and 'IsAzureMonitorTargetEnabled' as true. - * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be - * also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. - * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) */ export interface ExtendedDatabaseBlobAuditingPolicy extends ProxyResource { + /** + * Specifies condition of where clause when creating an audit. + */ predicateExpression?: string; + /** + * Specifies the state of the policy. If state is Enabled, storageEndpoint or + * isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled' + */ state: string; + /** + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state + * is Enabled, storageEndpoint is required. + */ storageEndpoint?: string; + /** + * Specifies the identifier key of the auditing storage account. If state is Enabled and + * storageEndpoint is specified, storageAccountAccessKey is required. + */ storageAccountAccessKey?: string; + /** + * Specifies the number of days to keep in the audit logs in the storage account. + */ retentionDays?: number; + /** + * Specifies the Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination - this will audit all + * the queries and stored procedures executed against the database, as well as successful and + * failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing + * from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific groups that cover your + * auditing needs. Using unnecessary groups could lead to very large quantities of audit + * records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the + * database, and should not be used in combination with other groups as this will result in + * duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot + * be specified for Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a table, view, or stored + * procedure, or an entire database or schema. For the latter cases, the forms + * DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + */ auditActionsAndGroups?: string[]; + /** + * Specifies the blob storage subscription Id. + */ storageAccountSubscriptionId?: string; + /** + * Specifies whether storageAccountAccessKey value is the storage's secondary key. + */ isStorageSecondaryKeyInUse?: boolean; + /** + * Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and + * 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' + * diagnostic logs category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + + */ isAzureMonitorTargetEnabled?: boolean; } /** - * @class - * Initializes a new instance of the ExtendedServerBlobAuditingPolicy class. - * @constructor * An extended server blob auditing policy. - * - * @member {string} [predicateExpression] Specifies condition of where clause - * when creating an audit. - * @member {string} state Specifies the state of the policy. If state is - * Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - * Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, - * storageEndpoint is required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the auditing storage account. If state is Enabled and storageEndpoint is - * specified, storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in the - * audit logs in the storage account. - * @member {array} [auditActionsAndGroups] Specifies the Actions-Groups and - * Actions to audit. - * - * The recommended set of action groups to use is the following combination - - * this will audit all the queries and stored procedures executed against the - * database, as well as successful and failed logins: - * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. - * - * This above combination is also the set that is configured by default when - * enabling auditing from the Azure portal. - * - * The supported action groups to audit are (note: choose only specific groups - * that cover your auditing needs. Using unnecessary groups could lead to very - * large quantities of audit records): - * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP - * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination with - * other groups as this will result in duplicate audit logs. - * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - * For Database auditing policy, specific Actions can also be specified (note - * that Actions cannot be specified for Server auditing policy). The supported - * actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES - * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} - * - * Note that in the above format can refer to an object like a table, - * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, - * respectively. - * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public - * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - * @member {uuid} [storageAccountSubscriptionId] Specifies the blob storage - * subscription Id. - * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether - * storageAccountAccessKey value is the storage's secondary key. - * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit - * events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - * and 'IsAzureMonitorTargetEnabled' as true. - * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be - * also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. - * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) */ export interface ExtendedServerBlobAuditingPolicy extends ProxyResource { + /** + * Specifies condition of where clause when creating an audit. + */ predicateExpression?: string; + /** + * Specifies the state of the policy. If state is Enabled, storageEndpoint or + * isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled' + */ state: string; + /** + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state + * is Enabled, storageEndpoint is required. + */ storageEndpoint?: string; + /** + * Specifies the identifier key of the auditing storage account. If state is Enabled and + * storageEndpoint is specified, storageAccountAccessKey is required. + */ storageAccountAccessKey?: string; + /** + * Specifies the number of days to keep in the audit logs in the storage account. + */ retentionDays?: number; + /** + * Specifies the Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination - this will audit all + * the queries and stored procedures executed against the database, as well as successful and + * failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing + * from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific groups that cover your + * auditing needs. Using unnecessary groups could lead to very large quantities of audit + * records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the + * database, and should not be used in combination with other groups as this will result in + * duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot + * be specified for Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a table, view, or stored + * procedure, or an entire database or schema. For the latter cases, the forms + * DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + */ auditActionsAndGroups?: string[]; + /** + * Specifies the blob storage subscription Id. + */ storageAccountSubscriptionId?: string; + /** + * Specifies whether storageAccountAccessKey value is the storage's secondary key. + */ isStorageSecondaryKeyInUse?: boolean; + /** + * Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and + * 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' + * diagnostic logs category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + + */ isAzureMonitorTargetEnabled?: boolean; } /** - * @class - * Initializes a new instance of the ServerBlobAuditingPolicy class. - * @constructor * A server blob auditing policy. - * - * @member {string} state Specifies the state of the policy. If state is - * Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - * Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, - * storageEndpoint is required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the auditing storage account. If state is Enabled and storageEndpoint is - * specified, storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in the - * audit logs in the storage account. - * @member {array} [auditActionsAndGroups] Specifies the Actions-Groups and - * Actions to audit. - * - * The recommended set of action groups to use is the following combination - - * this will audit all the queries and stored procedures executed against the - * database, as well as successful and failed logins: - * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. - * - * This above combination is also the set that is configured by default when - * enabling auditing from the Azure portal. - * - * The supported action groups to audit are (note: choose only specific groups - * that cover your auditing needs. Using unnecessary groups could lead to very - * large quantities of audit records): - * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP - * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination with - * other groups as this will result in duplicate audit logs. - * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - * For Database auditing policy, specific Actions can also be specified (note - * that Actions cannot be specified for Server auditing policy). The supported - * actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES - * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} - * - * Note that in the above format can refer to an object like a table, - * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, - * respectively. - * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public - * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - * @member {uuid} [storageAccountSubscriptionId] Specifies the blob storage - * subscription Id. - * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether - * storageAccountAccessKey value is the storage's secondary key. - * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit - * events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - * and 'IsAzureMonitorTargetEnabled' as true. - * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be - * also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. - * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) */ export interface ServerBlobAuditingPolicy extends ProxyResource { + /** + * Specifies the state of the policy. If state is Enabled, storageEndpoint or + * isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled' + */ state: string; + /** + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state + * is Enabled, storageEndpoint is required. + */ storageEndpoint?: string; + /** + * Specifies the identifier key of the auditing storage account. If state is Enabled and + * storageEndpoint is specified, storageAccountAccessKey is required. + */ storageAccountAccessKey?: string; + /** + * Specifies the number of days to keep in the audit logs in the storage account. + */ retentionDays?: number; + /** + * Specifies the Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination - this will audit all + * the queries and stored procedures executed against the database, as well as successful and + * failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing + * from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific groups that cover your + * auditing needs. Using unnecessary groups could lead to very large quantities of audit + * records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the + * database, and should not be used in combination with other groups as this will result in + * duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot + * be specified for Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a table, view, or stored + * procedure, or an entire database or schema. For the latter cases, the forms + * DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + */ auditActionsAndGroups?: string[]; + /** + * Specifies the blob storage subscription Id. + */ storageAccountSubscriptionId?: string; + /** + * Specifies whether storageAccountAccessKey value is the storage's secondary key. + */ isStorageSecondaryKeyInUse?: boolean; + /** + * Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and + * 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' + * diagnostic logs category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + + */ isAzureMonitorTargetEnabled?: boolean; } /** - * @class - * Initializes a new instance of the DatabaseBlobAuditingPolicy class. - * @constructor * A database blob auditing policy. - * - * @member {string} [kind] Resource kind. - * @member {string} state Specifies the state of the policy. If state is - * Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - * Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). If state is Enabled, - * storageEndpoint is required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the auditing storage account. If state is Enabled and storageEndpoint is - * specified, storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in the - * audit logs in the storage account. - * @member {array} [auditActionsAndGroups] Specifies the Actions-Groups and - * Actions to audit. - * - * The recommended set of action groups to use is the following combination - - * this will audit all the queries and stored procedures executed against the - * database, as well as successful and failed logins: - * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. - * - * This above combination is also the set that is configured by default when - * enabling auditing from the Azure portal. - * - * The supported action groups to audit are (note: choose only specific groups - * that cover your auditing needs. Using unnecessary groups could lead to very - * large quantities of audit records): - * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP - * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination with - * other groups as this will result in duplicate audit logs. - * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). - * - * For Database auditing policy, specific Actions can also be specified (note - * that Actions cannot be specified for Server auditing policy). The supported - * actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES - * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} - * - * Note that in the above format can refer to an object like a table, - * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, - * respectively. - * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public - * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - * @member {uuid} [storageAccountSubscriptionId] Specifies the blob storage - * subscription Id. - * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether - * storageAccountAccessKey value is the storage's secondary key. - * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit - * events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - * and 'IsAzureMonitorTargetEnabled' as true. - * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be - * also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. - * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview - * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) */ export interface DatabaseBlobAuditingPolicy extends ProxyResource { + /** + * Resource kind. + */ readonly kind?: string; + /** + * Specifies the state of the policy. If state is Enabled, storageEndpoint or + * isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled' + */ state: string; + /** + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state + * is Enabled, storageEndpoint is required. + */ storageEndpoint?: string; + /** + * Specifies the identifier key of the auditing storage account. If state is Enabled and + * storageEndpoint is specified, storageAccountAccessKey is required. + */ storageAccountAccessKey?: string; + /** + * Specifies the number of days to keep in the audit logs in the storage account. + */ retentionDays?: number; + /** + * Specifies the Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination - this will audit all + * the queries and stored procedures executed against the database, as well as successful and + * failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when enabling auditing + * from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific groups that cover your + * auditing needs. Using unnecessary groups could lead to very large quantities of audit + * records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures executed against the + * database, and should not be used in combination with other groups as this will result in + * duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified (note that Actions cannot + * be specified for Server auditing policy). The supported actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a table, view, or stored + * procedure, or an entire database or schema. For the latter cases, the forms + * DATABASE::{db_name} and SCHEMA::{schema_name} are used, respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + */ auditActionsAndGroups?: string[]; + /** + * Specifies the blob storage subscription Id. + */ storageAccountSubscriptionId?: string; + /** + * Specifies whether storageAccountAccessKey value is the storage's secondary key. + */ isStorageSecondaryKeyInUse?: boolean; + /** + * Specifies whether audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and + * 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' + * diagnostic logs category on the database should be also created. + * Note that for server level audit you should use the 'master' database as {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + + */ isAzureMonitorTargetEnabled?: boolean; } /** - * @class - * Initializes a new instance of the DatabaseVulnerabilityAssessmentRuleBaselineItem class. - * @constructor - * Properties for an Azure SQL Database Vulnerability Assessment rule - * baseline's result. - * - * @member {array} result The rule baseline result + * Properties for an Azure SQL Database Vulnerability Assessment rule baseline's result. */ export interface DatabaseVulnerabilityAssessmentRuleBaselineItem { + /** + * The rule baseline result + */ result: string[]; } /** - * @class - * Initializes a new instance of the DatabaseVulnerabilityAssessmentRuleBaseline class. - * @constructor * A database vulnerability assessment rule baseline. - * - * @member {array} baselineResults The rule baseline result */ export interface DatabaseVulnerabilityAssessmentRuleBaseline extends ProxyResource { + /** + * The rule baseline result + */ baselineResults: DatabaseVulnerabilityAssessmentRuleBaselineItem[]; } /** - * @class - * Initializes a new instance of the VulnerabilityAssessmentRecurringScansProperties class. - * @constructor * Properties of a Vulnerability Assessment recurring scans. - * - * @member {boolean} [isEnabled] Recurring scans state. - * @member {boolean} [emailSubscriptionAdmins] Specifies that the schedule scan - * notification will be is sent to the subscription administrators. Default - * value: true . - * @member {array} [emails] Specifies an array of e-mail addresses to which the - * scan notification is sent. */ export interface VulnerabilityAssessmentRecurringScansProperties { + /** + * Recurring scans state. + */ isEnabled?: boolean; + /** + * Specifies that the schedule scan notification will be is sent to the subscription + * administrators. + */ emailSubscriptionAdmins?: boolean; + /** + * Specifies an array of e-mail addresses to which the scan notification is sent. + */ emails?: string[]; } /** - * @class - * Initializes a new instance of the DatabaseVulnerabilityAssessment class. - * @constructor * A database vulnerability assessment. - * - * @member {string} [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 - * @member {string} [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. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the storage account for vulnerability assessment scan results. If - * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is - * required. - * @member {object} [recurringScans] The recurring scans settings - * @member {boolean} [recurringScans.isEnabled] Recurring scans state. - * @member {boolean} [recurringScans.emailSubscriptionAdmins] Specifies that - * the schedule scan notification will be is sent to the subscription - * administrators. - * @member {array} [recurringScans.emails] Specifies an array of e-mail - * addresses to which the scan notification is sent. */ export interface DatabaseVulnerabilityAssessment extends ProxyResource { + /** + * 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 + */ storageContainerPath?: string; + /** + * 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. + */ storageContainerSasKey?: string; + /** + * Specifies the identifier key of the storage account for vulnerability assessment scan results. + * If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. + */ storageAccountAccessKey?: string; + /** + * The recurring scans settings + */ recurringScans?: VulnerabilityAssessmentRecurringScansProperties; } /** - * @class - * Initializes a new instance of the JobAgent class. - * @constructor * An Azure SQL job agent. - * - * @member {object} [sku] The name and tier of the SKU. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [sku.tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. - * @member {string} databaseId Resource ID of the database to store job - * metadata in. - * @member {string} [state] The state of the job agent. Possible values - * include: 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' */ export interface JobAgent extends TrackedResource { + /** + * The name and tier of the SKU. + */ sku?: Sku; + /** + * Resource ID of the database to store job metadata in. + */ databaseId: string; + /** + * The state of the job agent. Possible values include: 'Creating', 'Ready', 'Updating', + * 'Deleting', 'Disabled' + */ readonly state?: string; } /** - * @class - * Initializes a new instance of the JobAgentUpdate class. - * @constructor * An update to an Azure SQL job agent. - * - * @member {object} [tags] Resource tags. */ export interface JobAgentUpdate { + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the JobCredential class. - * @constructor - * A stored credential that can be used by a job to connect to target - * databases. - * - * @member {string} username The credential user name. - * @member {string} password The credential password. + * A stored credential that can be used by a job to connect to target databases. */ export interface JobCredential extends ProxyResource { + /** + * The credential user name. + */ username: string; + /** + * The credential password. + */ password: string; } /** - * @class - * Initializes a new instance of the JobExecutionTarget class. - * @constructor * The target that a job execution is executed on. - * - * @member {string} [type] The type of the target. Possible values include: - * 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - * @member {string} [serverName] The server name. - * @member {string} [databaseName] The database name. */ export interface JobExecutionTarget { + /** + * The type of the target. Possible values include: 'TargetGroup', 'SqlDatabase', + * 'SqlElasticPool', 'SqlShardMap', 'SqlServer' + */ readonly type?: string; + /** + * The server name. + */ readonly serverName?: string; + /** + * The database name. + */ readonly databaseName?: string; } /** - * @class - * Initializes a new instance of the JobExecution class. - * @constructor * An execution of a job - * - * @member {number} [jobVersion] The job version number. - * @member {string} [stepName] The job step name. - * @member {number} [stepId] The job step id. - * @member {uuid} [jobExecutionId] The unique identifier of the job execution. - * @member {string} [lifecycle] The detailed state of the job execution. - * Possible values include: 'Created', 'InProgress', - * 'WaitingForChildJobExecutions', 'WaitingForRetry', 'Succeeded', - * 'SucceededWithSkipped', 'Failed', 'TimedOut', 'Canceled', 'Skipped' - * @member {string} [provisioningState] The ARM provisioning state of the job - * execution. Possible values include: 'Created', 'InProgress', 'Succeeded', - * 'Failed', 'Canceled' - * @member {date} [createTime] The time that the job execution was created. - * @member {date} [startTime] The time that the job execution started. - * @member {date} [endTime] The time that the job execution completed. - * @member {number} [currentAttempts] Number of times the job execution has - * been attempted. - * @member {date} [currentAttemptStartTime] Start time of the current attempt. - * @member {string} [lastMessage] The last status or error message. - * @member {object} [target] The target that this execution is executed on. - * @member {string} [target.type] The type of the target. Possible values - * include: 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', - * 'SqlServer' - * @member {string} [target.serverName] The server name. - * @member {string} [target.databaseName] The database name. */ export interface JobExecution extends ProxyResource { + /** + * The job version number. + */ readonly jobVersion?: number; + /** + * The job step name. + */ readonly stepName?: string; + /** + * The job step id. + */ readonly stepId?: number; + /** + * The unique identifier of the job execution. + */ readonly jobExecutionId?: string; + /** + * The detailed state of the job execution. Possible values include: 'Created', 'InProgress', + * 'WaitingForChildJobExecutions', 'WaitingForRetry', 'Succeeded', 'SucceededWithSkipped', + * 'Failed', 'TimedOut', 'Canceled', 'Skipped' + */ readonly lifecycle?: string; + /** + * The ARM provisioning state of the job execution. Possible values include: 'Created', + * 'InProgress', 'Succeeded', 'Failed', 'Canceled' + */ readonly provisioningState?: string; + /** + * The time that the job execution was created. + */ readonly createTime?: Date; + /** + * The time that the job execution started. + */ readonly startTime?: Date; + /** + * The time that the job execution completed. + */ readonly endTime?: Date; + /** + * Number of times the job execution has been attempted. + */ currentAttempts?: number; + /** + * Start time of the current attempt. + */ readonly currentAttemptStartTime?: Date; + /** + * The last status or error message. + */ readonly lastMessage?: string; + /** + * The target that this execution is executed on. + */ readonly target?: JobExecutionTarget; } /** - * @class - * Initializes a new instance of the JobSchedule class. - * @constructor * Scheduling properties of a job. - * - * @member {date} [startTime] Schedule start time. Default value: new - * Date('0001-01-01T00:00:00Z') . - * @member {date} [endTime] Schedule end time. Default value: new - * Date('9999-12-31T11:59:59Z') . - * @member {string} [type] Schedule interval type. Possible values include: - * 'Once', 'Recurring'. Default value: 'Once' . - * @member {boolean} [enabled] Whether or not the schedule is enabled. - * @member {string} [interval] Value of the schedule's recurring interval, if - * the scheduletype is recurring. ISO8601 duration format. */ export interface JobSchedule { + /** + * Schedule start time. + */ startTime?: Date; + /** + * Schedule end time. + */ endTime?: Date; + /** + * Schedule interval type. Possible values include: 'Once', 'Recurring' + */ type?: string; + /** + * Whether or not the schedule is enabled. + */ enabled?: boolean; + /** + * Value of the schedule's recurring interval, if the schedule type is recurring. ISO8601 + * duration format. + */ interval?: string; } /** - * @class - * Initializes a new instance of the Job class. - * @constructor * A job. - * - * @member {string} [description] User-defined description of the job. Default - * value: '' . - * @member {number} [version] The job version number. - * @member {object} [schedule] Schedule properties of the job. - * @member {date} [schedule.startTime] Schedule start time. - * @member {date} [schedule.endTime] Schedule end time. - * @member {string} [schedule.type] Schedule interval type. Possible values - * include: 'Once', 'Recurring' - * @member {boolean} [schedule.enabled] Whether or not the schedule is enabled. - * @member {string} [schedule.interval] Value of the schedule's recurring - * interval, if the scheduletype is recurring. ISO8601 duration format. */ export interface Job extends ProxyResource { + /** + * User-defined description of the job. + */ description?: string; + /** + * The job version number. + */ readonly version?: number; + /** + * Schedule properties of the job. + */ schedule?: JobSchedule; } /** - * @class - * Initializes a new instance of the JobStepAction class. - * @constructor * The action to be executed by a job step. - * - * @member {string} [type] Type of action being executed by the job step. - * Possible values include: 'TSql'. Default value: 'TSql' . - * @member {string} [source] The source of the action to execute. Possible - * values include: 'Inline'. Default value: 'Inline' . - * @member {string} value The action value, for example the text of the T-SQL - * script to execute. */ export interface JobStepAction { + /** + * Type of action being executed by the job step. Possible values include: 'TSql' + */ type?: string; + /** + * The source of the action to execute. Possible values include: 'Inline' + */ source?: string; + /** + * The action value, for example the text of the T-SQL script to execute. + */ value: string; } /** - * @class - * Initializes a new instance of the JobStepOutput class. - * @constructor * The output configuration of a job step. - * - * @member {string} [type] The output destination type. Possible values - * include: 'SqlDatabase'. Default value: 'SqlDatabase' . - * @member {uuid} [subscriptionId] The output destination subscription id. - * @member {string} [resourceGroupName] The output destination resource group. - * @member {string} serverName The output destination server name. - * @member {string} databaseName The output destination database. - * @member {string} [schemaName] The output destination schema. Default value: - * 'dbo' . - * @member {string} tableName The output destination table. - * @member {string} credential The resource ID of the credential to use to - * connect to the output destination. */ export interface JobStepOutput { + /** + * The output destination type. Possible values include: 'SqlDatabase' + */ type?: string; + /** + * The output destination subscription id. + */ subscriptionId?: string; + /** + * The output destination resource group. + */ resourceGroupName?: string; + /** + * The output destination server name. + */ serverName: string; + /** + * The output destination database. + */ databaseName: string; + /** + * The output destination schema. + */ schemaName?: string; + /** + * The output destination table. + */ tableName: string; + /** + * The resource ID of the credential to use to connect to the output destination. + */ credential: string; } /** - * @class - * Initializes a new instance of the JobStepExecutionOptions class. - * @constructor * The execution options of a job step. - * - * @member {number} [timeoutSeconds] Execution timeout for the job step. - * Default value: 43200 . - * @member {number} [retryAttempts] Maximum number of times the job step will - * be reattempted if the first attempt fails. Default value: 10 . - * @member {number} [initialRetryIntervalSeconds] Initial delay between retries - * for job step execution. Default value: 1 . - * @member {number} [maximumRetryIntervalSeconds] The maximum amount of time to - * wait between retries for job step execution. Default value: 120 . - * @member {number} [retryIntervalBackoffMultiplier] The backoff multiplier for - * the time between retries. Default value: 2 . */ export interface JobStepExecutionOptions { + /** + * Execution timeout for the job step. + */ timeoutSeconds?: number; + /** + * Maximum number of times the job step will be reattempted if the first attempt fails. + */ retryAttempts?: number; + /** + * Initial delay between retries for job step execution. + */ initialRetryIntervalSeconds?: number; + /** + * The maximum amount of time to wait between retries for job step execution. + */ maximumRetryIntervalSeconds?: number; + /** + * The backoff multiplier for the time between retries. + */ retryIntervalBackoffMultiplier?: number; } /** - * @class - * Initializes a new instance of the JobStep class. - * @constructor * A job step. - * - * @member {number} [stepId] The job step's index within the job. If not - * specified when creating the job step, it will be created as the last step. - * If not specified when updating the job step, the step id is not modified. - * @member {string} targetGroup The resource ID of the target group that the - * job step will be executed on. - * @member {string} credential The resource ID of the job credential that will - * be used to connect to the targets. - * @member {object} action The action payload of the job step. - * @member {string} [action.type] Type of action being executed by the job - * step. Possible values include: 'TSql' - * @member {string} [action.source] The source of the action to execute. - * Possible values include: 'Inline' - * @member {string} [action.value] The action value, for example the text of - * the T-SQL script to execute. - * @member {object} [output] Output destination properties of the job step. - * @member {string} [output.type] The output destination type. Possible values - * include: 'SqlDatabase' - * @member {uuid} [output.subscriptionId] The output destination subscription - * id. - * @member {string} [output.resourceGroupName] The output destination resource - * group. - * @member {string} [output.serverName] The output destination server name. - * @member {string} [output.databaseName] The output destination database. - * @member {string} [output.schemaName] The output destination schema. - * @member {string} [output.tableName] The output destination table. - * @member {string} [output.credential] The resource ID of the credential to - * use to connect to the output destination. - * @member {object} [executionOptions] Execution options for the job step. - * @member {number} [executionOptions.timeoutSeconds] Execution timeout for the - * job step. - * @member {number} [executionOptions.retryAttempts] Maximum number of times - * the job step will be reattempted if the first attempt fails. - * @member {number} [executionOptions.initialRetryIntervalSeconds] Initial - * delay between retries for job step execution. - * @member {number} [executionOptions.maximumRetryIntervalSeconds] The maximum - * amount of time to wait between retries for job step execution. - * @member {number} [executionOptions.retryIntervalBackoffMultiplier] The - * backoff multiplier for the time between retries. */ export interface JobStep extends ProxyResource { + /** + * The job step's index within the job. If not specified when creating the job step, it will be + * created as the last step. If not specified when updating the job step, the step id is not + * modified. + */ stepId?: number; + /** + * The resource ID of the target group that the job step will be executed on. + */ targetGroup: string; + /** + * The resource ID of the job credential that will be used to connect to the targets. + */ credential: string; + /** + * The action payload of the job step. + */ action: JobStepAction; + /** + * Output destination properties of the job step. + */ output?: JobStepOutput; + /** + * Execution options for the job step. + */ executionOptions?: JobStepExecutionOptions; } /** - * @class - * Initializes a new instance of the JobTarget class. - * @constructor - * A job target, for example a specific database or a container of databases - * that is evaluated during job execution. - * - * @member {string} [membershipType] Whether the target is included or excluded - * from the group. Possible values include: 'Include', 'Exclude'. Default - * value: 'Include' . - * @member {string} type The target type. Possible values include: - * 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - * @member {string} [serverName] The target server name. - * @member {string} [databaseName] The target database name. - * @member {string} [elasticPoolName] The target elastic pool name. - * @member {string} [shardMapName] The target shard map. - * @member {string} [refreshCredential] The resource ID of the credential that - * is used during job execution to connect to the target and determine the list - * of databases inside the target. + * A job target, for example a specific database or a container of databases that is evaluated + * during job execution. */ export interface JobTarget { + /** + * Whether the target is included or excluded from the group. Possible values include: 'Include', + * 'Exclude' + */ membershipType?: string; + /** + * The target type. Possible values include: 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', + * 'SqlShardMap', 'SqlServer' + */ type: string; + /** + * The target server name. + */ serverName?: string; + /** + * The target database name. + */ databaseName?: string; + /** + * The target elastic pool name. + */ elasticPoolName?: string; + /** + * The target shard map. + */ shardMapName?: string; + /** + * The resource ID of the credential that is used during job execution to connect to the target + * and determine the list of databases inside the target. + */ refreshCredential?: string; } /** - * @class - * Initializes a new instance of the JobTargetGroup class. - * @constructor * A group of job targets. - * - * @member {array} members Members of the target group. */ export interface JobTargetGroup extends ProxyResource { + /** + * Members of the target group. + */ members: JobTarget[]; } /** - * @class - * Initializes a new instance of the JobVersion class. - * @constructor * A job version. - * */ export interface JobVersion extends ProxyResource { } /** - * @class - * Initializes a new instance of the LongTermRetentionBackup class. - * @constructor * A long term retention backup. - * - * @member {string} [serverName] The server name that the backup database - * belong to. - * @member {date} [serverCreateTime] The create time of the server. - * @member {string} [databaseName] The name of the database the backup belong - * to - * @member {date} [databaseDeletionTime] The delete time of the database - * @member {date} [backupTime] The time the backup was taken - * @member {date} [backupExpirationTime] The time the long term retention - * backup will expire. */ export interface LongTermRetentionBackup extends ProxyResource { + /** + * The server name that the backup database belong to. + */ readonly serverName?: string; + /** + * The create time of the server. + */ readonly serverCreateTime?: Date; + /** + * The name of the database the backup belong to + */ readonly databaseName?: string; + /** + * The delete time of the database + */ readonly databaseDeletionTime?: Date; + /** + * The time the backup was taken + */ readonly backupTime?: Date; + /** + * The time the long term retention backup will expire. + */ readonly backupExpirationTime?: Date; } /** - * @class - * Initializes a new instance of the BackupLongTermRetentionPolicy class. - * @constructor * A long term retention policy. - * - * @member {string} [weeklyRetention] The weekly retention policy for an LTR - * backup in an ISO 8601 format. - * @member {string} [monthlyRetention] The monthly retention policy for an LTR - * backup in an ISO 8601 format. - * @member {string} [yearlyRetention] The yearly retention policy for an LTR - * backup in an ISO 8601 format. - * @member {number} [weekOfYear] The week of year to take the yearly backup in - * an ISO 8601 format. */ export interface BackupLongTermRetentionPolicy extends ProxyResource { + /** + * The weekly retention policy for an LTR backup in an ISO 8601 format. + */ weeklyRetention?: string; + /** + * The monthly retention policy for an LTR backup in an ISO 8601 format. + */ monthlyRetention?: string; + /** + * The yearly retention policy for an LTR backup in an ISO 8601 format. + */ yearlyRetention?: string; + /** + * The week of year to take the yearly backup in an ISO 8601 format. + */ weekOfYear?: number; } /** - * @class - * Initializes a new instance of the ManagedBackupShortTermRetentionPolicy class. - * @constructor * A short term retention policy. - * - * @member {number} [retentionDays] The backup retention period in days. This - * is how many days Point-in-Time Restore will be supported. */ export interface ManagedBackupShortTermRetentionPolicy extends ProxyResource { + /** + * The backup retention period in days. This is how many days Point-in-Time Restore will be + * supported. + */ retentionDays?: number; } /** - * @class - * Initializes a new instance of the CompleteDatabaseRestoreDefinition class. - * @constructor - * Contains the information necessary to perform a complete database restore - * operation. - * - * @member {string} lastBackupName The last backup name to apply + * Contains the information necessary to perform a complete database restore operation. */ export interface CompleteDatabaseRestoreDefinition { + /** + * The last backup name to apply + */ lastBackupName: string; } /** - * @class - * Initializes a new instance of the ManagedDatabase class. - * @constructor * A managed database resource. - * - * @member {string} [collation] Collation of the managed database. - * @member {string} [status] Status for the database. Possible values include: - * 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible' - * @member {date} [creationDate] Creation date of the database. - * @member {date} [earliestRestorePoint] Earliest restore point in time for - * point in time restore. - * @member {date} [restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. - * @member {string} [defaultSecondaryLocation] Geo paired region. - * @member {string} [catalogCollation] Collation of the metadata catalog. - * Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - * @member {string} [createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - * @member {string} [storageContainerUri] Conditional. If createMode is - * RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. - * @member {string} [sourceDatabaseId] The resource identifier of the source - * database associated with create operation of this database. - * @member {string} [storageContainerSasToken] Conditional. If createMode is - * RestoreExternalBackup, this value is required. Specifies the storage - * container sas token. - * @member {string} [failoverGroupId] Instance Failover Group resource - * identifier that this managed database belongs to. */ export interface ManagedDatabase extends TrackedResource { + /** + * Collation of the managed database. + */ collation?: string; + /** + * Status of the database. Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', + * 'Inaccessible', 'Updating' + */ readonly status?: string; + /** + * Creation date of the database. + */ readonly creationDate?: Date; + /** + * Earliest restore point in time for point in time restore. + */ readonly earliestRestorePoint?: Date; + /** + * Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point + * in time (ISO8601 format) of the source database that will be restored to create the new + * database. + */ restorePointInTime?: Date; + /** + * Geo paired region. + */ readonly defaultSecondaryLocation?: string; + /** + * Collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + */ catalogCollation?: string; + /** + * Managed database create mode. PointInTimeRestore: Create a database by restoring a point in + * time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from + * external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be + * specified. Recovery: Creates a database by restoring a geo-replicated backup. + * RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. + * Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' + */ createMode?: string; + /** + * Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri + * of the storage container where backups for this restore are stored. + */ storageContainerUri?: string; + /** + * The resource identifier of the source database associated with create operation of this + * database. + */ sourceDatabaseId?: string; + /** + * The restorable dropped database resource id to restore when creating this database. + */ + restorableDroppedDatabaseId?: string; + /** + * Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. + */ storageContainerSasToken?: string; + /** + * Instance Failover Group resource identifier that this managed database belongs to. + */ readonly failoverGroupId?: string; + /** + * The resource identifier of the recoverable database associated with create operation of this + * database. + */ + recoverableDatabaseId?: string; } /** - * @class - * Initializes a new instance of the ManagedDatabaseUpdate class. - * @constructor * An managed database update. - * - * @member {string} [collation] Collation of the managed database. - * @member {string} [status] Status for the database. Possible values include: - * 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible' - * @member {date} [creationDate] Creation date of the database. - * @member {date} [earliestRestorePoint] Earliest restore point in time for - * point in time restore. - * @member {date} [restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. - * @member {string} [defaultSecondaryLocation] Geo paired region. - * @member {string} [catalogCollation] Collation of the metadata catalog. - * Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - * @member {string} [createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - * @member {string} [storageContainerUri] Conditional. If createMode is - * RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. - * @member {string} [sourceDatabaseId] The resource identifier of the source - * database associated with create operation of this database. - * @member {string} [storageContainerSasToken] Conditional. If createMode is - * RestoreExternalBackup, this value is required. Specifies the storage - * container sas token. - * @member {string} [failoverGroupId] Instance Failover Group resource - * identifier that this managed database belongs to. - * @member {object} [tags] Resource tags. */ export interface ManagedDatabaseUpdate { + /** + * Collation of the managed database. + */ collation?: string; + /** + * Status of the database. Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', + * 'Inaccessible', 'Updating' + */ readonly status?: string; + /** + * Creation date of the database. + */ readonly creationDate?: Date; + /** + * Earliest restore point in time for point in time restore. + */ readonly earliestRestorePoint?: Date; + /** + * Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point + * in time (ISO8601 format) of the source database that will be restored to create the new + * database. + */ restorePointInTime?: Date; + /** + * Geo paired region. + */ readonly defaultSecondaryLocation?: string; + /** + * Collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + */ catalogCollation?: string; + /** + * Managed database create mode. PointInTimeRestore: Create a database by restoring a point in + * time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from + * external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be + * specified. Recovery: Creates a database by restoring a geo-replicated backup. + * RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. + * Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' + */ createMode?: string; + /** + * Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri + * of the storage container where backups for this restore are stored. + */ storageContainerUri?: string; + /** + * The resource identifier of the source database associated with create operation of this + * database. + */ sourceDatabaseId?: string; + /** + * The restorable dropped database resource id to restore when creating this database. + */ + restorableDroppedDatabaseId?: string; + /** + * Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. + */ storageContainerSasToken?: string; + /** + * Instance Failover Group resource identifier that this managed database belongs to. + */ readonly failoverGroupId?: string; + /** + * The resource identifier of the recoverable database associated with create operation of this + * database. + */ + recoverableDatabaseId?: string; + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the AutomaticTuningServerOptions class. - * @constructor * Automatic tuning properties for individual advisors. - * - * @member {string} [desiredState] Automatic tuning option desired state. - * Possible values include: 'Off', 'On', 'Default' - * @member {string} [actualState] Automatic tuning option actual state. - * Possible values include: 'Off', 'On' - * @member {number} [reasonCode] Reason code if desired and actual state are - * different. - * @member {string} [reasonDesc] Reason description if desired and actual state - * are different. Possible values include: 'Default', 'Disabled', - * 'AutoConfigured' */ export interface AutomaticTuningServerOptions { + /** + * Automatic tuning option desired state. Possible values include: 'Off', 'On', 'Default' + */ desiredState?: string; + /** + * Automatic tuning option actual state. Possible values include: 'Off', 'On' + */ readonly actualState?: string; + /** + * Reason code if desired and actual state are different. + */ readonly reasonCode?: number; + /** + * Reason description if desired and actual state are different. Possible values include: + * 'Default', 'Disabled', 'AutoConfigured' + */ readonly reasonDesc?: string; } /** - * @class - * Initializes a new instance of the ServerAutomaticTuning class. - * @constructor * Server-level Automatic Tuning. - * - * @member {string} [desiredState] Automatic tuning desired state. Possible - * values include: 'Custom', 'Auto', 'Unspecified' - * @member {string} [actualState] Automatic tuning actual state. Possible - * values include: 'Custom', 'Auto', 'Unspecified' - * @member {object} [options] Automatic tuning options definition. */ export interface ServerAutomaticTuning extends ProxyResource { + /** + * Automatic tuning desired state. Possible values include: 'Custom', 'Auto', 'Unspecified' + */ desiredState?: string; + /** + * Automatic tuning actual state. Possible values include: 'Custom', 'Auto', 'Unspecified' + */ readonly actualState?: string; + /** + * Automatic tuning options definition. + */ options?: { [propertyName: string]: AutomaticTuningServerOptions }; } /** - * @class - * Initializes a new instance of the ServerDnsAlias class. - * @constructor * A server DNS alias. - * - * @member {string} [azureDnsRecord] The fully qualified DNS record for alias */ export interface ServerDnsAlias extends ProxyResource { + /** + * The fully qualified DNS record for alias + */ readonly azureDnsRecord?: string; } /** - * @class - * Initializes a new instance of the ServerDnsAliasAcquisition class. - * @constructor * A server DNS alias acquisition request. - * - * @member {string} [oldServerDnsAliasId] The id of the server alias that will - * be acquired to point to this server instead. */ export interface ServerDnsAliasAcquisition { + /** + * The id of the server alias that will be acquired to point to this server instead. + */ oldServerDnsAliasId?: string; } /** - * @class - * Initializes a new instance of the ServerSecurityAlertPolicy class. - * @constructor * A server security alert policy. - * - * @member {string} state Specifies the state of the policy, whether it is - * enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled' - * @member {array} [disabledAlerts] Specifies an array of alerts that are - * disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, - * Access_Anomaly, Data_Exfiltration, Unsafe_Action - * @member {array} [emailAddresses] Specifies an array of e-mail addresses to - * which the alert is sent. - * @member {boolean} [emailAccountAdmins] Specifies that the alert is sent to - * the account administrators. - * @member {string} [storageEndpoint] Specifies the blob storage endpoint (e.g. - * https://MyAccount.blob.core.windows.net). This blob storage will hold all - * Threat Detection audit logs. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the Threat Detection audit storage account. - * @member {number} [retentionDays] Specifies the number of days to keep in the - * Threat Detection audit logs. */ export interface ServerSecurityAlertPolicy extends ProxyResource { + /** + * Specifies the state of the policy, whether it is enabled or disabled. Possible values include: + * 'New', 'Enabled', 'Disabled' + */ state: string; + /** + * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action + */ disabledAlerts?: string[]; + /** + * Specifies an array of e-mail addresses to which the alert is sent. + */ emailAddresses?: string[]; + /** + * Specifies that the alert is sent to the account administrators. + */ emailAccountAdmins?: boolean; + /** + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob + * storage will hold all Threat Detection audit logs. + */ storageEndpoint?: string; + /** + * Specifies the identifier key of the Threat Detection audit storage account. + */ storageAccountAccessKey?: string; + /** + * Specifies the number of days to keep in the Threat Detection audit logs. + */ retentionDays?: number; + /** + * Specifies the UTC creation time of the policy. + */ + readonly creationTime?: Date; +} + +/** + * A restorable dropped managed database resource. + */ +export interface RestorableDroppedManagedDatabase extends TrackedResource { + /** + * The name of the database. + */ + readonly databaseName?: string; + /** + * The creation date of the database (ISO8601 format). + */ + readonly creationDate?: Date; + /** + * The deletion date of the database (ISO8601 format). + */ + readonly deletionDate?: Date; + /** + * The earliest restore date of the database (ISO8601 format). + */ + readonly earliestRestoreDate?: Date; } /** - * @class - * Initializes a new instance of the RestorePoint class. - * @constructor * Database restore points. - * - * @member {string} [location] Resource location. - * @member {string} [restorePointType] The type of restore point. Possible - * values include: 'CONTINUOUS', 'DISCRETE' - * @member {date} [earliestRestoreDate] The earliest time to which this - * database can be restored - * @member {date} [restorePointCreationDate] The time the backup was taken - * @member {string} [restorePointLabel] The label of restore point for backup - * request by user */ export interface RestorePoint extends ProxyResource { + /** + * Resource location. + */ readonly location?: string; + /** + * The type of restore point. Possible values include: 'CONTINUOUS', 'DISCRETE' + */ readonly restorePointType?: string; + /** + * The earliest time to which this database can be restored + */ readonly earliestRestoreDate?: Date; + /** + * The time the backup was taken + */ readonly restorePointCreationDate?: Date; + /** + * The label of restore point for backup request by user + */ readonly restorePointLabel?: string; } /** - * @class - * Initializes a new instance of the CreateDatabaseRestorePointDefinition class. - * @constructor - * Contains the information necessary to perform a create database restore - * point operation. - * - * @member {string} restorePointLabel The restore point label to apply + * Contains the information necessary to perform a create database restore point operation. */ export interface CreateDatabaseRestorePointDefinition { + /** + * The restore point label to apply + */ restorePointLabel: string; } /** - * @class - * Initializes a new instance of the DatabaseOperation class. - * @constructor + * A managed database security alert policy. + */ +export interface ManagedDatabaseSecurityAlertPolicy extends ProxyResource { + /** + * Specifies the state of the policy, whether it is enabled or disabled. Possible values include: + * 'New', 'Enabled', 'Disabled' + */ + state: string; + /** + * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action + */ + disabledAlerts?: string[]; + /** + * Specifies an array of e-mail addresses to which the alert is sent. + */ + emailAddresses?: string[]; + /** + * Specifies that the alert is sent to the account administrators. + */ + emailAccountAdmins?: boolean; + /** + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob + * storage will hold all Threat Detection audit logs. + */ + storageEndpoint?: string; + /** + * Specifies the identifier key of the Threat Detection audit storage account. + */ + storageAccountAccessKey?: string; + /** + * Specifies the number of days to keep in the Threat Detection audit logs. + */ + retentionDays?: number; + /** + * Specifies the UTC creation time of the policy. + */ + readonly creationTime?: Date; +} + +/** + * A managed server security alert policy. + */ +export interface ManagedServerSecurityAlertPolicy extends ProxyResource { + /** + * Specifies the state of the policy, whether it is enabled or disabled. Possible values include: + * 'New', 'Enabled', 'Disabled' + */ + state: string; + /** + * Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action + */ + disabledAlerts?: string[]; + /** + * Specifies an array of e-mail addresses to which the alert is sent. + */ + emailAddresses?: string[]; + /** + * Specifies that the alert is sent to the account administrators. + */ + emailAccountAdmins?: boolean; + /** + * Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob + * storage will hold all Threat Detection audit logs. + */ + storageEndpoint?: string; + /** + * Specifies the identifier key of the Threat Detection audit storage account. + */ + storageAccountAccessKey?: string; + /** + * Specifies the number of days to keep in the Threat Detection audit logs. + */ + retentionDays?: number; + /** + * Specifies the UTC creation time of the policy. + */ + readonly creationTime?: Date; +} + +/** + * A sensitivity label. + */ +export interface SensitivityLabel extends ProxyResource { + /** + * The label name. + */ + labelName?: string; + /** + * The label ID. + */ + labelId?: string; + /** + * The information type. + */ + informationType?: string; + /** + * The information type ID. + */ + informationTypeId?: string; +} + +/** * A database operation. - * - * @member {string} [databaseName] The name of the database the operation is - * being performed on. - * @member {string} [operation] The name of operation. - * @member {string} [operationFriendlyName] The friendly name of operation. - * @member {number} [percentComplete] The percentage of the operation - * completed. - * @member {string} [serverName] The name of the server. - * @member {date} [startTime] The operation start time. - * @member {string} [state] The operation state. Possible values include: - * 'Pending', 'InProgress', 'Succeeded', 'Failed', 'CancelInProgress', - * 'Cancelled' - * @member {number} [errorCode] The operation error code. - * @member {string} [errorDescription] The operation error description. - * @member {number} [errorSeverity] The operation error severity. - * @member {boolean} [isUserError] Whether or not the error is a user error. - * @member {date} [estimatedCompletionTime] The estimated completion time of - * the operation. - * @member {string} [description] The operation description. - * @member {boolean} [isCancellable] Whether the operation can be cancelled. */ export interface DatabaseOperation extends ProxyResource { + /** + * The name of the database the operation is being performed on. + */ readonly databaseName?: string; + /** + * The name of operation. + */ readonly operation?: string; + /** + * The friendly name of operation. + */ readonly operationFriendlyName?: string; + /** + * The percentage of the operation completed. + */ readonly percentComplete?: number; + /** + * The name of the server. + */ readonly serverName?: string; + /** + * The operation start time. + */ readonly startTime?: Date; + /** + * The operation state. Possible values include: 'Pending', 'InProgress', 'Succeeded', 'Failed', + * 'CancelInProgress', 'Cancelled' + */ readonly state?: string; + /** + * The operation error code. + */ readonly errorCode?: number; + /** + * The operation error description. + */ readonly errorDescription?: string; + /** + * The operation error severity. + */ readonly errorSeverity?: number; + /** + * Whether or not the error is a user error. + */ readonly isUserError?: boolean; + /** + * The estimated completion time of the operation. + */ readonly estimatedCompletionTime?: Date; + /** + * The operation description. + */ readonly description?: string; + /** + * Whether the operation can be cancelled. + */ readonly isCancellable?: boolean; } /** - * @class - * Initializes a new instance of the ElasticPoolOperation class. - * @constructor * A elastic pool operation. - * - * @member {string} [elasticPoolName] The name of the elastic pool the - * operation is being performed on. - * @member {string} [operation] The name of operation. - * @member {string} [operationFriendlyName] The friendly name of operation. - * @member {number} [percentComplete] The percentage of the operation - * completed. - * @member {string} [serverName] The name of the server. - * @member {date} [startTime] The operation start time. - * @member {string} [state] The operation state. - * @member {number} [errorCode] The operation error code. - * @member {string} [errorDescription] The operation error description. - * @member {number} [errorSeverity] The operation error severity. - * @member {boolean} [isUserError] Whether or not the error is a user error. - * @member {date} [estimatedCompletionTime] The estimated completion time of - * the operation. - * @member {string} [description] The operation description. - * @member {boolean} [isCancellable] Whether the operation can be cancelled. */ export interface ElasticPoolOperation extends ProxyResource { + /** + * The name of the elastic pool the operation is being performed on. + */ readonly elasticPoolName?: string; + /** + * The name of operation. + */ readonly operation?: string; + /** + * The friendly name of operation. + */ readonly operationFriendlyName?: string; + /** + * The percentage of the operation completed. + */ readonly percentComplete?: number; + /** + * The name of the server. + */ readonly serverName?: string; + /** + * The operation start time. + */ readonly startTime?: Date; + /** + * The operation state. + */ readonly state?: string; + /** + * The operation error code. + */ readonly errorCode?: number; + /** + * The operation error description. + */ readonly errorDescription?: string; + /** + * The operation error severity. + */ readonly errorSeverity?: number; + /** + * Whether or not the error is a user error. + */ readonly isUserError?: boolean; + /** + * The estimated completion time of the operation. + */ readonly estimatedCompletionTime?: Date; + /** + * The operation description. + */ readonly description?: string; + /** + * Whether the operation can be cancelled. + */ readonly isCancellable?: boolean; } /** - * @class - * Initializes a new instance of the MaxSizeCapability class. - * @constructor * The maximum size capability. - * - * @member {number} [limit] The maximum size limit (see 'unit' for the units). - * @member {string} [unit] The units that the limit is expressed in. Possible - * values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' */ export interface MaxSizeCapability { + /** + * The maximum size limit (see 'unit' for the units). + */ readonly limit?: number; + /** + * The units that the limit is expressed in. Possible values include: 'Megabytes', 'Gigabytes', + * 'Terabytes', 'Petabytes' + */ readonly unit?: string; } /** - * @class - * Initializes a new instance of the LogSizeCapability class. - * @constructor * The log size capability. - * - * @member {number} [limit] The log size limit (see 'unit' for the units). - * @member {string} [unit] The units that the limit is expressed in. Possible - * values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', - * 'Percent' */ export interface LogSizeCapability { + /** + * The log size limit (see 'unit' for the units). + */ readonly limit?: number; + /** + * The units that the limit is expressed in. Possible values include: 'Megabytes', 'Gigabytes', + * 'Terabytes', 'Petabytes', 'Percent' + */ readonly unit?: string; } /** - * @class - * Initializes a new instance of the MaxSizeRangeCapability class. - * @constructor * The maximum size range capability. - * - * @member {object} [minValue] Minimum value. - * @member {number} [minValue.limit] The maximum size limit (see 'unit' for the - * units). - * @member {string} [minValue.unit] The units that the limit is expressed in. - * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - * @member {object} [maxValue] Maximum value. - * @member {number} [maxValue.limit] The maximum size limit (see 'unit' for the - * units). - * @member {string} [maxValue.unit] The units that the limit is expressed in. - * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - * @member {object} [scaleSize] Scale/step size for discrete values between the - * minimum value and the maximum value. - * @member {number} [scaleSize.limit] The maximum size limit (see 'unit' for - * the units). - * @member {string} [scaleSize.unit] The units that the limit is expressed in. - * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' - * @member {object} [logSize] Size of transaction log. - * @member {number} [logSize.limit] The log size limit (see 'unit' for the - * units). - * @member {string} [logSize.unit] The units that the limit is expressed in. - * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', - * 'Percent' - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface MaxSizeRangeCapability { + /** + * Minimum value. + */ readonly minValue?: MaxSizeCapability; + /** + * Maximum value. + */ readonly maxValue?: MaxSizeCapability; + /** + * Scale/step size for discrete values between the minimum value and the maximum value. + */ readonly scaleSize?: MaxSizeCapability; + /** + * Size of transaction log. + */ readonly logSize?: LogSizeCapability; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the PerformanceLevelCapability class. - * @constructor * The performance level capability. - * - * @member {number} [value] Performance level value. - * @member {string} [unit] Unit type used to measure performance level. - * Possible values include: 'DTU', 'VCores' */ export interface PerformanceLevelCapability { + /** + * Performance level value. + */ readonly value?: number; + /** + * Unit type used to measure performance level. Possible values include: 'DTU', 'VCores' + */ readonly unit?: string; } /** - * @class - * Initializes a new instance of the LicenseTypeCapability class. - * @constructor * The license type capability - * - * @member {string} [name] License type identifier. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface LicenseTypeCapability { + /** + * License type identifier. + */ readonly name?: string; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ServiceObjectiveCapability class. - * @constructor * The service objectives capability. - * - * @member {uuid} [id] The unique ID of the service objective. - * @member {string} [name] The service objective name. - * @member {array} [supportedMaxSizes] The list of supported maximum database - * sizes. - * @member {object} [performanceLevel] The performance level. - * @member {number} [performanceLevel.value] Performance level value. - * @member {string} [performanceLevel.unit] Unit type used to measure - * performance level. Possible values include: 'DTU', 'VCores' - * @member {object} [sku] The sku. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [sku.tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. - * @member {array} [supportedLicenseTypes] List of supported license types. - * @member {object} [includedMaxSize] The included (free) max size. - * @member {number} [includedMaxSize.limit] The maximum size limit (see 'unit' - * for the units). - * @member {string} [includedMaxSize.unit] The units that the limit is - * expressed in. Possible values include: 'Megabytes', 'Gigabytes', - * 'Terabytes', 'Petabytes' - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ServiceObjectiveCapability { + /** + * The unique ID of the service objective. + */ readonly id?: string; + /** + * The service objective name. + */ readonly name?: string; + /** + * The list of supported maximum database sizes. + */ readonly supportedMaxSizes?: MaxSizeRangeCapability[]; + /** + * The performance level. + */ readonly performanceLevel?: PerformanceLevelCapability; + /** + * The sku. + */ readonly sku?: Sku; + /** + * List of supported license types. + */ readonly supportedLicenseTypes?: LicenseTypeCapability[]; + /** + * The included (free) max size. + */ readonly includedMaxSize?: MaxSizeCapability; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the EditionCapability class. - * @constructor * The edition capability. - * - * @member {string} [name] The database edition name. - * @member {array} [supportedServiceLevelObjectives] The list of supported - * service objectives for the edition. - * @member {boolean} [zoneRedundant] Whether or not zone redundancy is - * supported for the edition. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface EditionCapability { + /** + * The database edition name. + */ readonly name?: string; + /** + * The list of supported service objectives for the edition. + */ readonly supportedServiceLevelObjectives?: ServiceObjectiveCapability[]; + /** + * Whether or not zone redundancy is supported for the edition. + */ readonly zoneRedundant?: boolean; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ElasticPoolPerDatabaseMinPerformanceLevelCapability class. - * @constructor * The minimum per-database performance level capability. - * - * @member {number} [limit] The minimum performance level per database. - * @member {string} [unit] Unit type used to measure performance level. - * Possible values include: 'DTU', 'VCores' - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ElasticPoolPerDatabaseMinPerformanceLevelCapability { + /** + * The minimum performance level per database. + */ readonly limit?: number; + /** + * Unit type used to measure performance level. Possible values include: 'DTU', 'VCores' + */ readonly unit?: string; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ElasticPoolPerDatabaseMaxPerformanceLevelCapability class. - * @constructor * The max per-database performance level capability. - * - * @member {number} [limit] The maximum performance level per database. - * @member {string} [unit] Unit type used to measure performance level. - * Possible values include: 'DTU', 'VCores' - * @member {array} [supportedPerDatabaseMinPerformanceLevels] The list of - * supported min database performance levels. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ElasticPoolPerDatabaseMaxPerformanceLevelCapability { + /** + * The maximum performance level per database. + */ readonly limit?: number; + /** + * Unit type used to measure performance level. Possible values include: 'DTU', 'VCores' + */ readonly unit?: string; + /** + * The list of supported min database performance levels. + */ readonly supportedPerDatabaseMinPerformanceLevels?: ElasticPoolPerDatabaseMinPerformanceLevelCapability[]; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ElasticPoolPerformanceLevelCapability class. - * @constructor * The Elastic Pool performance level capability. - * - * @member {object} [performanceLevel] The performance level for the pool. - * @member {number} [performanceLevel.value] Performance level value. - * @member {string} [performanceLevel.unit] Unit type used to measure - * performance level. Possible values include: 'DTU', 'VCores' - * @member {object} [sku] The sku. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [sku.tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. - * @member {array} [supportedLicenseTypes] List of supported license types. - * @member {number} [maxDatabaseCount] The maximum number of databases - * supported. - * @member {object} [includedMaxSize] The included (free) max size for this - * performance level. - * @member {number} [includedMaxSize.limit] The maximum size limit (see 'unit' - * for the units). - * @member {string} [includedMaxSize.unit] The units that the limit is - * expressed in. Possible values include: 'Megabytes', 'Gigabytes', - * 'Terabytes', 'Petabytes' - * @member {array} [supportedMaxSizes] The list of supported max sizes. - * @member {array} [supportedPerDatabaseMaxSizes] The list of supported per - * database max sizes. - * @member {array} [supportedPerDatabaseMaxPerformanceLevels] The list of - * supported per database max performance levels. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ElasticPoolPerformanceLevelCapability { + /** + * The performance level for the pool. + */ readonly performanceLevel?: PerformanceLevelCapability; + /** + * The sku. + */ readonly sku?: Sku; + /** + * List of supported license types. + */ readonly supportedLicenseTypes?: LicenseTypeCapability[]; + /** + * The maximum number of databases supported. + */ readonly maxDatabaseCount?: number; + /** + * The included (free) max size for this performance level. + */ readonly includedMaxSize?: MaxSizeCapability; + /** + * The list of supported max sizes. + */ readonly supportedMaxSizes?: MaxSizeRangeCapability[]; + /** + * The list of supported per database max sizes. + */ readonly supportedPerDatabaseMaxSizes?: MaxSizeRangeCapability[]; + /** + * The list of supported per database max performance levels. + */ readonly supportedPerDatabaseMaxPerformanceLevels?: ElasticPoolPerDatabaseMaxPerformanceLevelCapability[]; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ElasticPoolEditionCapability class. - * @constructor * The elastic pool edition capability. - * - * @member {string} [name] The elastic pool edition name. - * @member {array} [supportedElasticPoolPerformanceLevels] The list of - * supported elastic pool DTU levels for the edition. - * @member {boolean} [zoneRedundant] Whether or not zone redundancy is - * supported for the edition. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ElasticPoolEditionCapability { + /** + * The elastic pool edition name. + */ readonly name?: string; + /** + * The list of supported elastic pool DTU levels for the edition. + */ readonly supportedElasticPoolPerformanceLevels?: ElasticPoolPerformanceLevelCapability[]; + /** + * Whether or not zone redundancy is supported for the edition. + */ readonly zoneRedundant?: boolean; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ServerVersionCapability class. - * @constructor * The server capability - * - * @member {string} [name] The server version name. - * @member {array} [supportedEditions] The list of supported database editions. - * @member {array} [supportedElasticPoolEditions] The list of supported elastic - * pool editions. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ServerVersionCapability { + /** + * The server version name. + */ readonly name?: string; + /** + * The list of supported database editions. + */ readonly supportedEditions?: EditionCapability[]; + /** + * The list of supported elastic pool editions. + */ readonly supportedElasticPoolEditions?: ElasticPoolEditionCapability[]; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ManagedInstanceVcoresCapability class. - * @constructor * The managed instance virtual cores capability. - * - * @member {string} [name] The virtual cores identifier. - * @member {number} [value] The virtual cores value. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ManagedInstanceVcoresCapability { + /** + * The virtual cores identifier. + */ readonly name?: string; + /** + * The virtual cores value. + */ readonly value?: number; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ManagedInstanceFamilyCapability class. - * @constructor * The managed server family capability. - * - * @member {string} [name] Family name. - * @member {string} [sku] SKU name. - * @member {array} [supportedLicenseTypes] List of supported license types. - * @member {array} [supportedVcoresValues] List of supported virtual cores - * values. - * @member {object} [includedMaxSize] Included size. - * @member {number} [includedMaxSize.limit] The maximum size limit (see 'unit' - * for the units). - * @member {string} [includedMaxSize.unit] The units that the limit is - * expressed in. Possible values include: 'Megabytes', 'Gigabytes', - * 'Terabytes', 'Petabytes' - * @member {array} [supportedStorageSizes] Storage size ranges. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ManagedInstanceFamilyCapability { + /** + * Family name. + */ readonly name?: string; + /** + * SKU name. + */ readonly sku?: string; + /** + * List of supported license types. + */ readonly supportedLicenseTypes?: LicenseTypeCapability[]; + /** + * List of supported virtual cores values. + */ readonly supportedVcoresValues?: ManagedInstanceVcoresCapability[]; + /** + * Included size. + */ readonly includedMaxSize?: MaxSizeCapability; + /** + * Storage size ranges. + */ readonly supportedStorageSizes?: MaxSizeRangeCapability[]; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ManagedInstanceEditionCapability class. - * @constructor * The managed server capability - * - * @member {string} [name] The managed server version name. - * @member {array} [supportedFamilies] The supported families. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ManagedInstanceEditionCapability { + /** + * The managed server version name. + */ readonly name?: string; + /** + * The supported families. + */ readonly supportedFamilies?: ManagedInstanceFamilyCapability[]; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the ManagedInstanceVersionCapability class. - * @constructor * The managed instance capability - * - * @member {string} [name] The server version name. - * @member {array} [supportedEditions] The list of supported managed instance - * editions. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface ManagedInstanceVersionCapability { + /** + * The server version name. + */ readonly name?: string; + /** + * The list of supported managed instance editions. + */ readonly supportedEditions?: ManagedInstanceEditionCapability[]; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the LocationCapabilities class. - * @constructor * The location capability. - * - * @member {string} [name] The location name. - * @member {array} [supportedServerVersions] The list of supported server - * versions. - * @member {array} [supportedManagedInstanceVersions] The list of supported - * managed instance versions. - * @member {string} [status] The status of the capability. Possible values - * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being available. */ export interface LocationCapabilities { + /** + * The location name. + */ readonly name?: string; + /** + * The list of supported server versions. + */ readonly supportedServerVersions?: ServerVersionCapability[]; + /** + * The list of supported managed instance versions. + */ readonly supportedManagedInstanceVersions?: ManagedInstanceVersionCapability[]; + /** + * The status of the capability. Possible values include: 'Visible', 'Available', 'Default', + * 'Disabled' + */ readonly status?: string; + /** + * The reason for the capability not being available. + */ reason?: string; } /** - * @class - * Initializes a new instance of the Database class. - * @constructor * A database resource. - * - * @member {object} [sku] The name and tier of the SKU. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [sku.tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. - * @member {string} [kind] Kind of database. This is metadata used for the - * Azure portal experience. - * @member {string} [managedBy] Resource that manages the database. - * @member {string} [createMode] Specifies the mode of database creation. - * - * Default: regular database creation. - * - * Copy: creates a database as a copy of an existing database. sourceDatabaseId - * must be specified as the resource ID of the source database. - * - * Secondary: creates a database as a secondary replica of an existing - * database. sourceDatabaseId must be specified as the resource ID of the - * existing primary database. - * - * PointInTimeRestore: Creates a database by restoring a point in time backup - * of an existing database. sourceDatabaseId must be specified as the resource - * ID of the existing database, and restorePointInTime must be specified. - * - * Recovery: Creates a database by restoring a geo-replicated backup. - * sourceDatabaseId must be specified as the recoverable database resource ID - * to restore. - * - * Restore: Creates a database by restoring a backup of a deleted database. - * sourceDatabaseId must be specified. If sourceDatabaseId is the database's - * original resource ID, then sourceDatabaseDeletionDate must be specified. - * Otherwise sourceDatabaseId must be the restorable dropped database resource - * ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be - * specified to restore from an earlier point in time. - * - * RestoreLongTermRetentionBackup: Creates a database by restoring from a long - * term retention vault. recoveryServicesRecoveryPointResourceId must be - * specified as the recovery point resource ID. - * - * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - * DataWarehouse edition. Possible values include: 'Default', 'Copy', - * 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - * 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - * 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - * @member {string} [collation] The collation of the database. - * @member {number} [maxSizeBytes] The max size of the database expressed in - * bytes. - * @member {string} [sampleName] The name of the sample schema to apply when - * creating this database. Possible values include: 'AdventureWorksLT', - * 'WideWorldImportersStd', 'WideWorldImportersFull' - * @member {string} [elasticPoolId] The resource identifier of the elastic pool - * containing this database. - * @member {string} [sourceDatabaseId] The resource identifier of the source - * database associated with create operation of this database. - * @member {string} [status] The status of the database. Possible values - * include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - * 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', - * 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', - * 'Resuming', 'Scaling' - * @member {uuid} [databaseId] The ID of the database. - * @member {date} [creationDate] The creation date of the database (ISO8601 - * format). - * @member {string} [currentServiceObjectiveName] The current service level - * objective name of the database. - * @member {string} [requestedServiceObjectiveName] The requested service level - * objective name of the database. - * @member {string} [defaultSecondaryLocation] The default secondary region for - * this database. - * @member {string} [failoverGroupId] Failover Group resource identifier that - * this database belongs to. - * @member {date} [restorePointInTime] Specifies the point in time (ISO8601 - * format) of the source database that will be restored to create the new - * database. - * @member {date} [sourceDatabaseDeletionDate] Specifies the time that the - * database was deleted. - * @member {string} [recoveryServicesRecoveryPointId] The resource identifier - * of the recovery point associated with create operation of this database. - * @member {string} [longTermRetentionBackupResourceId] The resource identifier - * of the long term retention backup associated with create operation of this - * database. - * @member {string} [recoverableDatabaseId] The resource identifier of the - * recoverable database associated with create operation of this database. - * @member {string} [restorableDroppedDatabaseId] The resource identifier of - * the restorable dropped database associated with create operation of this - * database. - * @member {string} [catalogCollation] Collation of the metadata catalog. - * Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - * @member {boolean} [zoneRedundant] Whether or not this database is zone - * redundant, which means the replicas of this database will be spread across - * multiple availability zones. - * @member {string} [licenseType] The license type to apply for this database. - * Possible values include: 'LicenseIncluded', 'BasePrice' - * @member {number} [maxLogSizeBytes] The max log size for this database. - * @member {date} [earliestRestoreDate] This records the earliest start date - * and time that restore is available for this database (ISO8601 format). - * @member {string} [readScale] The state of read-only routing. If enabled, - * connections that have application intent set to readonly in their connection - * string may be routed to a readonly secondary replica in the same region. - * Possible values include: 'Enabled', 'Disabled' - * @member {object} [currentSku] The name and tier of the SKU. - * @member {string} [currentSku.name] The name of the SKU. Ex - P3. It is - * typically a letter+number code - * @member {string} [currentSku.tier] This field is required to be implemented - * by the Resource Provider if the service has more than one tier, but is not - * required on a PUT. - * @member {string} [currentSku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [currentSku.family] If the service has different - * generations of hardware, for the same SKU, then that can be captured here. - * @member {number} [currentSku.capacity] If the SKU supports scale out/in then - * the capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. */ export interface Database extends TrackedResource { + /** + * The name and tier of the SKU. + */ sku?: Sku; + /** + * Kind of database. This is metadata used for the Azure portal experience. + */ readonly kind?: string; + /** + * Resource that manages the database. + */ readonly managedBy?: string; + /** + * Specifies the mode of database creation. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified + * as the resource ID of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId + * must be specified as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing + * database. sourceDatabaseId must be specified as the resource ID of the existing database, and + * restorePointInTime must be specified. + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be + * specified as the recoverable database resource ID to restore. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must + * be specified. If sourceDatabaseId is the database's original resource ID, then + * sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the + * restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. + * restorePointInTime may also be specified to restore from an earlier point in time. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention + * vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point + * resource ID. + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse + * edition. Possible values include: 'Default', 'Copy', 'Secondary', 'PointInTimeRestore', + * 'Restore', 'Recovery', 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + * 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + */ createMode?: string; + /** + * The collation of the database. + */ collation?: string; + /** + * The max size of the database expressed in bytes. + */ maxSizeBytes?: number; + /** + * The name of the sample schema to apply when creating this database. Possible values include: + * 'AdventureWorksLT', 'WideWorldImportersStd', 'WideWorldImportersFull' + */ sampleName?: string; + /** + * The resource identifier of the elastic pool containing this database. + */ elasticPoolId?: string; + /** + * The resource identifier of the source database associated with create operation of this + * database. + */ sourceDatabaseId?: string; + /** + * The status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', + * 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + * 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', + * 'Scaling' + */ readonly status?: string; + /** + * The ID of the database. + */ readonly databaseId?: string; + /** + * The creation date of the database (ISO8601 format). + */ readonly creationDate?: Date; + /** + * The current service level objective name of the database. + */ readonly currentServiceObjectiveName?: string; + /** + * The requested service level objective name of the database. + */ readonly requestedServiceObjectiveName?: string; + /** + * The default secondary region for this database. + */ readonly defaultSecondaryLocation?: string; + /** + * Failover Group resource identifier that this database belongs to. + */ readonly failoverGroupId?: string; + /** + * Specifies the point in time (ISO8601 format) of the source database that will be restored to + * create the new database. + */ restorePointInTime?: Date; + /** + * Specifies the time that the database was deleted. + */ sourceDatabaseDeletionDate?: Date; + /** + * The resource identifier of the recovery point associated with create operation of this + * database. + */ recoveryServicesRecoveryPointId?: string; + /** + * The resource identifier of the long term retention backup associated with create operation of + * this database. + */ longTermRetentionBackupResourceId?: string; + /** + * The resource identifier of the recoverable database associated with create operation of this + * database. + */ recoverableDatabaseId?: string; + /** + * The resource identifier of the restorable dropped database associated with create operation of + * this database. + */ restorableDroppedDatabaseId?: string; + /** + * Collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + */ catalogCollation?: string; + /** + * Whether or not this database is zone redundant, which means the replicas of this database will + * be spread across multiple availability zones. + */ zoneRedundant?: boolean; + /** + * The license type to apply for this database. Possible values include: 'LicenseIncluded', + * 'BasePrice' + */ licenseType?: string; + /** + * The max log size for this database. + */ readonly maxLogSizeBytes?: number; + /** + * This records the earliest start date and time that restore is available for this database + * (ISO8601 format). + */ readonly earliestRestoreDate?: Date; + /** + * The state of read-only routing. If enabled, connections that have application intent set to + * readonly in their connection string may be routed to a readonly secondary replica in the same + * region. Possible values include: 'Enabled', 'Disabled' + */ readScale?: string; + /** + * The name and tier of the SKU. + */ readonly currentSku?: Sku; } /** - * @class - * Initializes a new instance of the DatabaseUpdate class. - * @constructor * A database resource. - * - * @member {object} [sku] The name and tier of the SKU. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [sku.tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. - * @member {string} [createMode] Specifies the mode of database creation. - * - * Default: regular database creation. - * - * Copy: creates a database as a copy of an existing database. sourceDatabaseId - * must be specified as the resource ID of the source database. - * - * Secondary: creates a database as a secondary replica of an existing - * database. sourceDatabaseId must be specified as the resource ID of the - * existing primary database. - * - * PointInTimeRestore: Creates a database by restoring a point in time backup - * of an existing database. sourceDatabaseId must be specified as the resource - * ID of the existing database, and restorePointInTime must be specified. - * - * Recovery: Creates a database by restoring a geo-replicated backup. - * sourceDatabaseId must be specified as the recoverable database resource ID - * to restore. - * - * Restore: Creates a database by restoring a backup of a deleted database. - * sourceDatabaseId must be specified. If sourceDatabaseId is the database's - * original resource ID, then sourceDatabaseDeletionDate must be specified. - * Otherwise sourceDatabaseId must be the restorable dropped database resource - * ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be - * specified to restore from an earlier point in time. - * - * RestoreLongTermRetentionBackup: Creates a database by restoring from a long - * term retention vault. recoveryServicesRecoveryPointResourceId must be - * specified as the recovery point resource ID. - * - * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for - * DataWarehouse edition. Possible values include: 'Default', 'Copy', - * 'Secondary', 'PointInTimeRestore', 'Restore', 'Recovery', - * 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', - * 'RestoreLongTermRetentionBackup', 'OnlineSecondary' - * @member {string} [collation] The collation of the database. - * @member {number} [maxSizeBytes] The max size of the database expressed in - * bytes. - * @member {string} [sampleName] The name of the sample schema to apply when - * creating this database. Possible values include: 'AdventureWorksLT', - * 'WideWorldImportersStd', 'WideWorldImportersFull' - * @member {string} [elasticPoolId] The resource identifier of the elastic pool - * containing this database. - * @member {string} [sourceDatabaseId] The resource identifier of the source - * database associated with create operation of this database. - * @member {string} [status] The status of the database. Possible values - * include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', - * 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', - * 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', - * 'Resuming', 'Scaling' - * @member {uuid} [databaseId] The ID of the database. - * @member {date} [creationDate] The creation date of the database (ISO8601 - * format). - * @member {string} [currentServiceObjectiveName] The current service level - * objective name of the database. - * @member {string} [requestedServiceObjectiveName] The requested service level - * objective name of the database. - * @member {string} [defaultSecondaryLocation] The default secondary region for - * this database. - * @member {string} [failoverGroupId] Failover Group resource identifier that - * this database belongs to. - * @member {date} [restorePointInTime] Specifies the point in time (ISO8601 - * format) of the source database that will be restored to create the new - * database. - * @member {date} [sourceDatabaseDeletionDate] Specifies the time that the - * database was deleted. - * @member {string} [recoveryServicesRecoveryPointId] The resource identifier - * of the recovery point associated with create operation of this database. - * @member {string} [longTermRetentionBackupResourceId] The resource identifier - * of the long term retention backup associated with create operation of this - * database. - * @member {string} [recoverableDatabaseId] The resource identifier of the - * recoverable database associated with create operation of this database. - * @member {string} [restorableDroppedDatabaseId] The resource identifier of - * the restorable dropped database associated with create operation of this - * database. - * @member {string} [catalogCollation] Collation of the metadata catalog. - * Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS' - * @member {boolean} [zoneRedundant] Whether or not this database is zone - * redundant, which means the replicas of this database will be spread across - * multiple availability zones. - * @member {string} [licenseType] The license type to apply for this database. - * Possible values include: 'LicenseIncluded', 'BasePrice' - * @member {number} [maxLogSizeBytes] The max log size for this database. - * @member {date} [earliestRestoreDate] This records the earliest start date - * and time that restore is available for this database (ISO8601 format). - * @member {string} [readScale] The state of read-only routing. If enabled, - * connections that have application intent set to readonly in their connection - * string may be routed to a readonly secondary replica in the same region. - * Possible values include: 'Enabled', 'Disabled' - * @member {object} [currentSku] The name and tier of the SKU. - * @member {string} [currentSku.name] The name of the SKU. Ex - P3. It is - * typically a letter+number code - * @member {string} [currentSku.tier] This field is required to be implemented - * by the Resource Provider if the service has more than one tier, but is not - * required on a PUT. - * @member {string} [currentSku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [currentSku.family] If the service has different - * generations of hardware, for the same SKU, then that can be captured here. - * @member {number} [currentSku.capacity] If the SKU supports scale out/in then - * the capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {object} [tags] Resource tags. */ export interface DatabaseUpdate { + /** + * The name and tier of the SKU. + */ sku?: Sku; + /** + * Specifies the mode of database creation. + * + * Default: regular database creation. + * + * Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified + * as the resource ID of the source database. + * + * Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId + * must be specified as the resource ID of the existing primary database. + * + * PointInTimeRestore: Creates a database by restoring a point in time backup of an existing + * database. sourceDatabaseId must be specified as the resource ID of the existing database, and + * restorePointInTime must be specified. + * + * Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be + * specified as the recoverable database resource ID to restore. + * + * Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must + * be specified. If sourceDatabaseId is the database's original resource ID, then + * sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the + * restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. + * restorePointInTime may also be specified to restore from an earlier point in time. + * + * RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention + * vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point + * resource ID. + * + * Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse + * edition. Possible values include: 'Default', 'Copy', 'Secondary', 'PointInTimeRestore', + * 'Restore', 'Recovery', 'RestoreExternalBackup', 'RestoreExternalBackupSecondary', + * 'RestoreLongTermRetentionBackup', 'OnlineSecondary' + */ createMode?: string; + /** + * The collation of the database. + */ collation?: string; + /** + * The max size of the database expressed in bytes. + */ maxSizeBytes?: number; + /** + * The name of the sample schema to apply when creating this database. Possible values include: + * 'AdventureWorksLT', 'WideWorldImportersStd', 'WideWorldImportersFull' + */ sampleName?: string; + /** + * The resource identifier of the elastic pool containing this database. + */ elasticPoolId?: string; + /** + * The resource identifier of the source database associated with create operation of this + * database. + */ sourceDatabaseId?: string; + /** + * The status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', + * 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', + * 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', + * 'Scaling' + */ readonly status?: string; + /** + * The ID of the database. + */ readonly databaseId?: string; + /** + * The creation date of the database (ISO8601 format). + */ readonly creationDate?: Date; + /** + * The current service level objective name of the database. + */ readonly currentServiceObjectiveName?: string; + /** + * The requested service level objective name of the database. + */ readonly requestedServiceObjectiveName?: string; + /** + * The default secondary region for this database. + */ readonly defaultSecondaryLocation?: string; + /** + * Failover Group resource identifier that this database belongs to. + */ readonly failoverGroupId?: string; + /** + * Specifies the point in time (ISO8601 format) of the source database that will be restored to + * create the new database. + */ restorePointInTime?: Date; + /** + * Specifies the time that the database was deleted. + */ sourceDatabaseDeletionDate?: Date; + /** + * The resource identifier of the recovery point associated with create operation of this + * database. + */ recoveryServicesRecoveryPointId?: string; + /** + * The resource identifier of the long term retention backup associated with create operation of + * this database. + */ longTermRetentionBackupResourceId?: string; + /** + * The resource identifier of the recoverable database associated with create operation of this + * database. + */ recoverableDatabaseId?: string; + /** + * The resource identifier of the restorable dropped database associated with create operation of + * this database. + */ restorableDroppedDatabaseId?: string; + /** + * Collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + */ catalogCollation?: string; + /** + * Whether or not this database is zone redundant, which means the replicas of this database will + * be spread across multiple availability zones. + */ zoneRedundant?: boolean; + /** + * The license type to apply for this database. Possible values include: 'LicenseIncluded', + * 'BasePrice' + */ licenseType?: string; + /** + * The max log size for this database. + */ readonly maxLogSizeBytes?: number; + /** + * This records the earliest start date and time that restore is available for this database + * (ISO8601 format). + */ readonly earliestRestoreDate?: Date; + /** + * The state of read-only routing. If enabled, connections that have application intent set to + * readonly in their connection string may be routed to a readonly secondary replica in the same + * region. Possible values include: 'Enabled', 'Disabled' + */ readScale?: string; + /** + * The name and tier of the SKU. + */ readonly currentSku?: Sku; + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the ResourceMoveDefinition class. - * @constructor * Contains the information necessary to perform a resource move (rename). - * - * @member {string} id The target ID for the resource */ export interface ResourceMoveDefinition { + /** + * The target ID for the resource + */ id: string; } /** - * @class - * Initializes a new instance of the ElasticPoolPerDatabaseSettings class. - * @constructor * Per database settings of an elastic pool. - * - * @member {number} [minCapacity] The minimum capacity all databases are - * guaranteed. - * @member {number} [maxCapacity] The maximum capacity any one database can - * consume. */ export interface ElasticPoolPerDatabaseSettings { + /** + * The minimum capacity all databases are guaranteed. + */ minCapacity?: number; + /** + * The maximum capacity any one database can consume. + */ maxCapacity?: number; } /** - * @class - * Initializes a new instance of the ElasticPool class. - * @constructor * An elastic pool. - * - * @member {object} [sku] - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [sku.tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. - * @member {string} [kind] Kind of elastic pool. This is metadata used for the - * Azure portal experience. - * @member {string} [state] The state of the elastic pool. Possible values - * include: 'Creating', 'Ready', 'Disabled' - * @member {date} [creationDate] The creation date of the elastic pool (ISO8601 - * format). - * @member {number} [maxSizeBytes] The storage limit for the database elastic - * pool in bytes. - * @member {object} [perDatabaseSettings] The per database settings for the - * elastic pool. - * @member {number} [perDatabaseSettings.minCapacity] The minimum capacity all - * databases are guaranteed. - * @member {number} [perDatabaseSettings.maxCapacity] The maximum capacity any - * one database can consume. - * @member {boolean} [zoneRedundant] Whether or not this elastic pool is zone - * redundant, which means the replicas of this elastic pool will be spread - * across multiple availability zones. - * @member {string} [licenseType] The license type to apply for this elastic - * pool. Possible values include: 'LicenseIncluded', 'BasePrice' */ export interface ElasticPool extends TrackedResource { sku?: Sku; + /** + * Kind of elastic pool. This is metadata used for the Azure portal experience. + */ readonly kind?: string; + /** + * The state of the elastic pool. Possible values include: 'Creating', 'Ready', 'Disabled' + */ readonly state?: string; + /** + * The creation date of the elastic pool (ISO8601 format). + */ readonly creationDate?: Date; + /** + * The storage limit for the database elastic pool in bytes. + */ maxSizeBytes?: number; + /** + * The per database settings for the elastic pool. + */ perDatabaseSettings?: ElasticPoolPerDatabaseSettings; + /** + * Whether or not this elastic pool is zone redundant, which means the replicas of this elastic + * pool will be spread across multiple availability zones. + */ zoneRedundant?: boolean; + /** + * The license type to apply for this elastic pool. Possible values include: 'LicenseIncluded', + * 'BasePrice' + */ licenseType?: string; } /** - * @class - * Initializes a new instance of the ElasticPoolUpdate class. - * @constructor * An elastic pool update. - * - * @member {object} [sku] - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically a - * letter+number code - * @member {string} [sku.tier] This field is required to be implemented by the - * Resource Provider if the service has more than one tier, but is not required - * on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the - * combination of tier and some other value, this would be the standalone code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for the - * resource this may be omitted. - * @member {number} [maxSizeBytes] The storage limit for the database elastic - * pool in bytes. - * @member {object} [perDatabaseSettings] The per database settings for the - * elastic pool. - * @member {number} [perDatabaseSettings.minCapacity] The minimum capacity all - * databases are guaranteed. - * @member {number} [perDatabaseSettings.maxCapacity] The maximum capacity any - * one database can consume. - * @member {boolean} [zoneRedundant] Whether or not this elastic pool is zone - * redundant, which means the replicas of this elastic pool will be spread - * across multiple availability zones. - * @member {string} [licenseType] The license type to apply for this elastic - * pool. Possible values include: 'LicenseIncluded', 'BasePrice' - * @member {object} [tags] Resource tags. - */ +*/ export interface ElasticPoolUpdate { sku?: Sku; + /** + * The storage limit for the database elastic pool in bytes. + */ maxSizeBytes?: number; + /** + * The per database settings for the elastic pool. + */ perDatabaseSettings?: ElasticPoolPerDatabaseSettings; + /** + * Whether or not this elastic pool is zone redundant, which means the replicas of this elastic + * pool will be spread across multiple availability zones. + */ zoneRedundant?: boolean; + /** + * The license type to apply for this elastic pool. Possible values include: 'LicenseIncluded', + * 'BasePrice' + */ licenseType?: string; + /** + * Resource tags. + */ tags?: { [propertyName: string]: string }; } /** - * @class - * Initializes a new instance of the VulnerabilityAssessmentScanError class. - * @constructor * Properties of a vulnerability assessment scan error. - * - * @member {string} [code] The error code. - * @member {string} [message] The error message. - */ +*/ export interface VulnerabilityAssessmentScanError { + /** + * The error code. + */ readonly code?: string; + /** + * The error message. + */ readonly message?: string; } /** - * @class - * Initializes a new instance of the VulnerabilityAssessmentScanRecord class. - * @constructor * A vulnerability assessment scan record. - * - * @member {string} [scanId] The scan ID. - * @member {string} [triggerType] The scan trigger type. Possible values - * include: 'OnDemand', 'Recurring' - * @member {string} [state] The scan status. Possible values include: 'Passed', - * 'Failed', 'FailedToRun', 'InProgress' - * @member {date} [startTime] The scan start time (UTC). - * @member {date} [endTime] The scan end time (UTC). - * @member {array} [errors] The scan errors. - * @member {string} [storageContainerPath] The scan results storage container - * path. - * @member {number} [numberOfFailedSecurityChecks] The number of failed - * security checks. - */ +*/ export interface VulnerabilityAssessmentScanRecord extends ProxyResource { + /** + * The scan ID. + */ readonly scanId?: string; + /** + * The scan trigger type. Possible values include: 'OnDemand', 'Recurring' + */ readonly triggerType?: string; + /** + * The scan status. Possible values include: 'Passed', 'Failed', 'FailedToRun', 'InProgress' + */ readonly state?: string; + /** + * The scan start time (UTC). + */ readonly startTime?: Date; + /** + * The scan end time (UTC). + */ readonly endTime?: Date; + /** + * The scan errors. + */ readonly errors?: VulnerabilityAssessmentScanError[]; + /** + * The scan results storage container path. + */ readonly storageContainerPath?: string; + /** + * The number of failed security checks. + */ readonly numberOfFailedSecurityChecks?: number; } /** - * @class - * Initializes a new instance of the DatabaseVulnerabilityAssessmentScansExport class. - * @constructor * A database Vulnerability Assessment scan export resource. - * - * @member {string} [exportedReportLocation] Location of the exported report - * (e.g. - * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). - */ +*/ export interface DatabaseVulnerabilityAssessmentScansExport extends ProxyResource { + /** + * Location of the exported report (e.g. + * https://myStorage.blob.core.windows.net/VaScans/scans/serverName/databaseName/scan_scanId.xlsx). + */ readonly exportedReportLocation?: string; } /** - * @class - * Initializes a new instance of the InstanceFailoverGroupReadWriteEndpoint class. - * @constructor * Read-write endpoint of the failover group instance. - * - * @member {string} 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' - * @member {number} [failoverWithDataLossGracePeriodMinutes] Grace period - * before failover with data loss is attempted for the read-write endpoint. If - * failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is - * required. - */ +*/ export interface InstanceFailoverGroupReadWriteEndpoint { + /** + * Failover policy of the read-write endpoint for the failover group. If failoverPolicy is + * Automatic then failoverWithDataLossGracePeriodMinutes is required. Possible values include: + * 'Manual', 'Automatic' + */ failoverPolicy: string; + /** + * Grace period before failover with data loss is attempted for the read-write endpoint. If + * failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes is required. + */ failoverWithDataLossGracePeriodMinutes?: number; } /** - * @class - * Initializes a new instance of the InstanceFailoverGroupReadOnlyEndpoint class. - * @constructor * Read-only endpoint of the failover group instance. - * - * @member {string} [failoverPolicy] Failover policy of the read-only endpoint - * for the failover group. Possible values include: 'Disabled', 'Enabled' - */ +*/ export interface InstanceFailoverGroupReadOnlyEndpoint { + /** + * Failover policy of the read-only endpoint for the failover group. Possible values include: + * 'Disabled', 'Enabled' + */ failoverPolicy?: string; } /** - * @class - * Initializes a new instance of the PartnerRegionInfo class. - * @constructor * Partner region information for the failover group. - * - * @member {string} [location] Geo location of the partner managed instances. - * @member {string} [replicationRole] Replication role of the partner managed - * instances. Possible values include: 'Primary', 'Secondary' - */ +*/ export interface PartnerRegionInfo { + /** + * Geo location of the partner managed instances. + */ location?: string; + /** + * Replication role of the partner managed instances. Possible values include: 'Primary', + * 'Secondary' + */ readonly replicationRole?: string; } /** - * @class - * Initializes a new instance of the ManagedInstancePairInfo class. - * @constructor * Pairs of Managed Instances in the failover group. - * - * @member {string} [primaryManagedInstanceId] Id of Primary Managed Instance - * in pair. - * @member {string} [partnerManagedInstanceId] Id of Partner Managed Instance - * in pair. - */ +*/ export interface ManagedInstancePairInfo { + /** + * Id of Primary Managed Instance in pair. + */ primaryManagedInstanceId?: string; + /** + * Id of Partner Managed Instance in pair. + */ partnerManagedInstanceId?: string; } /** - * @class - * Initializes a new instance of the InstanceFailoverGroup class. - * @constructor * An instance failover group. - * - * @member {object} readWriteEndpoint Read-write endpoint of the failover group - * instance. - * @member {string} [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' - * @member {number} [readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] - * Grace period before failover with data loss is attempted for the read-write - * endpoint. If failoverPolicy is Automatic then - * failoverWithDataLossGracePeriodMinutes is required. - * @member {object} [readOnlyEndpoint] Read-only endpoint of the failover group - * instance. - * @member {string} [readOnlyEndpoint.failoverPolicy] Failover policy of the - * read-only endpoint for the failover group. Possible values include: - * 'Disabled', 'Enabled' - * @member {string} [replicationRole] Local replication role of the failover - * group instance. Possible values include: 'Primary', 'Secondary' - * @member {string} [replicationState] Replication state of the failover group - * instance. - * @member {array} partnerRegions Partner region information for the failover - * group. - * @member {array} managedInstancePairs List of managed instance pairs in the - * failover group. - */ +*/ export interface InstanceFailoverGroup extends ProxyResource { + /** + * Read-write endpoint of the failover group instance. + */ readWriteEndpoint: InstanceFailoverGroupReadWriteEndpoint; + /** + * Read-only endpoint of the failover group instance. + */ readOnlyEndpoint?: InstanceFailoverGroupReadOnlyEndpoint; + /** + * Local replication role of the failover group instance. Possible values include: 'Primary', + * 'Secondary' + */ readonly replicationRole?: string; + /** + * Replication state of the failover group instance. + */ readonly replicationState?: string; + /** + * Partner region information for the failover group. + */ partnerRegions: PartnerRegionInfo[]; + /** + * List of managed instance pairs in the failover group. + */ managedInstancePairs: ManagedInstancePairInfo[]; } /** - * @class - * Initializes a new instance of the BackupShortTermRetentionPolicy class. - * @constructor * A short term retention policy. - * - * @member {number} [retentionDays] The backup retention period in days. This - * is how many days Point-in-Time Restore will be supported. - */ +*/ export interface BackupShortTermRetentionPolicy extends ProxyResource { + /** + * The backup retention period in days. This is how many days Point-in-Time Restore will be + * supported. + */ retentionDays?: number; } /** - * @class - * Initializes a new instance of the TdeCertificate class. - * @constructor * A TDE certificate that can be uploaded into a server. - * - * @member {string} privateBlob The base64 encoded certificate private blob. - * @member {string} [certPassword] The certificate password. - */ +*/ export interface TdeCertificate extends ProxyResource { + /** + * The base64 encoded certificate private blob. + */ privateBlob: string; + /** + * The certificate password. + */ certPassword?: string; } /** - * @class - * Initializes a new instance of the ManagedInstanceKey class. - * @constructor * A managed instance key. - * - * @member {string} [kind] Kind of encryption protector. This is metadata used - * for the Azure portal experience. - * @member {string} serverKeyType The key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' - * @member {string} [uri] The URI of the key. If the ServerKeyType is - * AzureKeyVault, then the URI is required. - * @member {string} [thumbprint] Thumbprint of the key. - * @member {date} [creationDate] The key creation date. - */ +*/ export interface ManagedInstanceKey extends ProxyResource { + /** + * Kind of encryption protector. This is metadata used for the Azure portal experience. + */ readonly kind?: string; + /** + * The key type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' + */ serverKeyType: string; + /** + * The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required. + */ uri?: string; + /** + * Thumbprint of the key. + */ readonly thumbprint?: string; + /** + * The key creation date. + */ readonly creationDate?: Date; } /** - * @class - * Initializes a new instance of the ManagedInstanceEncryptionProtector class. - * @constructor * The managed instance encryption protector. - * - * @member {string} [kind] Kind of encryption protector. This is metadata used - * for the Azure portal experience. - * @member {string} [serverKeyName] The name of the managed instance key. - * @member {string} serverKeyType The encryption protector type like - * 'ServiceManaged', 'AzureKeyVault'. Possible values include: - * 'ServiceManaged', 'AzureKeyVault' - * @member {string} [uri] The URI of the server key. - * @member {string} [thumbprint] Thumbprint of the server key. - */ +*/ export interface ManagedInstanceEncryptionProtector extends ProxyResource { + /** + * Kind of encryption protector. This is metadata used for the Azure portal experience. + */ readonly kind?: string; + /** + * The name of the managed instance key. + */ serverKeyName?: string; + /** + * The encryption protector type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' + */ serverKeyType: string; + /** + * The URI of the server key. + */ readonly uri?: string; + /** + * Thumbprint of the server key. + */ readonly thumbprint?: string; } +/** + * A recoverable managed database resource. +*/ +export interface RecoverableManagedDatabase extends ProxyResource { + /** + * The last available backup date. + */ + readonly lastAvailableBackupDate?: string; +} + +/** + * A managed instance vulnerability assessment. +*/ +export interface ManagedInstanceVulnerabilityAssessment extends ProxyResource { + /** + * A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). + */ + storageContainerPath: string; + /** + * 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. + */ + storageContainerSasKey?: string; + /** + * Specifies the identifier key of the storage account for vulnerability assessment scan results. + * If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. + */ + storageAccountAccessKey?: string; + /** + * The recurring scans settings + */ + recurringScans?: VulnerabilityAssessmentRecurringScansProperties; +} + +/** + * A server vulnerability assessment. +*/ +export interface ServerVulnerabilityAssessment extends ProxyResource { + /** + * A blob storage container path to hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). + */ + storageContainerPath: string; + /** + * 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. + */ + storageContainerSasKey?: string; + /** + * Specifies the identifier key of the storage account for vulnerability assessment scan results. + * If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required. + */ + storageAccountAccessKey?: string; + /** + * The recurring scans settings + */ + recurringScans?: VulnerabilityAssessmentRecurringScansProperties; +} /** - * @class - * Initializes a new instance of the RecoverableDatabaseListResult class. - * @constructor * The response to a list recoverable databases request - * - */ +*/ export interface RecoverableDatabaseListResult extends Array { } /** - * @class - * Initializes a new instance of the RestorableDroppedDatabaseListResult class. - * @constructor * The response to a list restorable dropped databases request - * - */ +*/ export interface RestorableDroppedDatabaseListResult extends Array { } /** - * @class - * Initializes a new instance of the ServerListResult class. - * @constructor * A list of servers. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface ServerListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the DataMaskingRuleListResult class. - * @constructor * The response to a list data masking rules request. - * - */ +*/ export interface DataMaskingRuleListResult extends Array { } /** - * @class - * Initializes a new instance of the FirewallRuleListResult class. - * @constructor * Represents the response to a List Firewall Rules request. - * - */ +*/ export interface FirewallRuleListResult extends Array { } /** - * @class - * Initializes a new instance of the GeoBackupPolicyListResult class. - * @constructor * The response to a list geo backup policies request. - * - */ +*/ export interface GeoBackupPolicyListResult extends Array { } /** - * @class - * Initializes a new instance of the MetricListResult class. - * @constructor * The response to a list database metrics request. - * - */ +*/ export interface MetricListResult extends Array { } /** - * @class - * Initializes a new instance of the MetricDefinitionListResult class. - * @constructor * The response to a list database metric definitions request. - * - */ +*/ export interface MetricDefinitionListResult extends Array { } /** - * @class - * Initializes a new instance of the DatabaseListResult class. - * @constructor * A list of databases. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface DatabaseListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ElasticPoolListResult class. - * @constructor * The result of an elastic pool list request. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface ElasticPoolListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the RecommendedElasticPoolListResult class. - * @constructor * Represents the response to a list recommended elastic pool request. - * - */ +*/ export interface RecommendedElasticPoolListResult extends Array { } /** - * @class - * Initializes a new instance of the RecommendedElasticPoolListMetricsResult class. - * @constructor * Represents the response to a list recommended elastic pool metrics request. - * - */ -export interface RecommendedElasticPoolListMetricsResult extends Array { +*/ +export interface RecommendedElasticPoolListMetricsResult extends +Array { } /** - * @class - * Initializes a new instance of the ReplicationLinkListResult class. - * @constructor * Represents the response to a List database replication link request. - * - */ +*/ export interface ReplicationLinkListResult extends Array { } /** - * @class - * Initializes a new instance of the ServerAdministratorListResult class. - * @constructor * The response to a list Active Directory Administrators request. - * - */ +*/ export interface ServerAdministratorListResult extends Array { } /** - * @class - * Initializes a new instance of the ServerCommunicationLinkListResult class. - * @constructor * A list of server communication links. - * - */ +*/ export interface ServerCommunicationLinkListResult extends Array { } /** - * @class - * Initializes a new instance of the ServiceObjectiveListResult class. - * @constructor * Represents the response to a get database service objectives request. - * - */ +*/ export interface ServiceObjectiveListResult extends Array { } /** - * @class - * Initializes a new instance of the ElasticPoolActivityListResult class. - * @constructor * Represents the response to a list elastic pool activity request. - * - */ +*/ export interface ElasticPoolActivityListResult extends Array { } /** - * @class - * Initializes a new instance of the ElasticPoolDatabaseActivityListResult class. - * @constructor * Represents the response to a list elastic pool database activity request. - * - */ +*/ export interface ElasticPoolDatabaseActivityListResult extends Array { } /** - * @class - * Initializes a new instance of the ServiceTierAdvisorListResult class. - * @constructor * Represents the response to a list service tier advisor request. - * - */ +*/ export interface ServiceTierAdvisorListResult extends Array { } /** - * @class - * Initializes a new instance of the TransparentDataEncryptionActivityListResult class. - * @constructor - * Represents the response to a list database transparent data encryption - * activity request. - * - */ -export interface TransparentDataEncryptionActivityListResult extends Array { + * Represents the response to a list database transparent data encryption activity request. +*/ +export interface TransparentDataEncryptionActivityListResult extends +Array { } /** - * @class - * Initializes a new instance of the ServerUsageListResult class. - * @constructor * Represents the response to a list server metrics request. - * - */ +*/ export interface ServerUsageListResult extends Array { } /** - * @class - * Initializes a new instance of the DatabaseUsageListResult class. - * @constructor * The response to a list database metrics request. - * - */ +*/ export interface DatabaseUsageListResult extends Array { } /** - * @class - * Initializes a new instance of the EncryptionProtectorListResult class. - * @constructor * A list of server encryption protectors. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface EncryptionProtectorListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the FailoverGroupListResult class. - * @constructor * A list of failover groups. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface FailoverGroupListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ManagedInstanceListResult class. - * @constructor * A list of managed instances. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface ManagedInstanceListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the OperationListResult class. - * @constructor * Result of the request to list SQL operations. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface OperationListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ServerKeyListResult class. - * @constructor * A list of server keys. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface ServerKeyListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the SyncAgentListResult class. - * @constructor * A list of sync agents. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface SyncAgentListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the SyncAgentLinkedDatabaseListResult class. - * @constructor * A list of sync agent linked databases. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface SyncAgentLinkedDatabaseListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the SyncDatabaseIdListResult class. - * @constructor * A list of sync database ID properties. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface SyncDatabaseIdListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the SyncFullSchemaPropertiesListResult class. - * @constructor * A list of sync schema properties. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface SyncFullSchemaPropertiesListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the SyncGroupLogListResult class. - * @constructor * A list of sync group log properties. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface SyncGroupLogListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the SyncGroupListResult class. - * @constructor * A list of sync groups. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface SyncGroupListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the SyncMemberListResult class. - * @constructor * A list of Azure SQL Database sync members. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface SyncMemberListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the SubscriptionUsageListResult class. - * @constructor * A list of subscription usage metrics in a location. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface SubscriptionUsageListResult extends Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} + +/** + * A list of virtual clusters. +*/ +export interface VirtualClusterListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the VirtualNetworkRuleListResult class. - * @constructor * A list of virtual network rules. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface VirtualNetworkRuleListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the DatabaseVulnerabilityAssessmentListResult class. - * @constructor * A list of the database's vulnerability assessments. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ -export interface DatabaseVulnerabilityAssessmentListResult extends Array { +*/ +export interface DatabaseVulnerabilityAssessmentListResult extends +Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the JobAgentListResult class. - * @constructor * A list of Azure SQL job agents. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface JobAgentListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the JobCredentialListResult class. - * @constructor * A list of job credentials. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface JobCredentialListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the JobExecutionListResult class. - * @constructor * A list of job executions. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface JobExecutionListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the JobListResult class. - * @constructor * A list of jobs. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface JobListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the JobStepListResult class. - * @constructor * A list of job steps. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface JobStepListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the JobTargetGroupListResult class. - * @constructor * A list of target groups. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface JobTargetGroupListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the JobVersionListResult class. - * @constructor * A list of job versions. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface JobVersionListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the LongTermRetentionBackupListResult class. - * @constructor - * A list of long term retention bacukps. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ + * A list of long term retention backups. +*/ export interface LongTermRetentionBackupListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ManagedBackupShortTermRetentionPolicyListResult class. - * @constructor * A list of short term retention policies. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ -export interface ManagedBackupShortTermRetentionPolicyListResult extends Array { +*/ +export interface ManagedBackupShortTermRetentionPolicyListResult extends +Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ManagedDatabaseListResult class. - * @constructor * A list of managed databases. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface ManagedDatabaseListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ServerDnsAliasListResult class. - * @constructor * A list of server DNS aliases. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface ServerDnsAliasListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the RestorePointListResult class. - * @constructor - * A list of long term retention bacukps. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ + * A list of restorable dropped managed databases. +*/ +export interface RestorableDroppedManagedDatabaseListResult extends +Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} + +/** + * A list of long term retention backups. +*/ export interface RestorePointListResult extends Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} + +/** + * A list of sensitivity labels. +*/ +export interface SensitivityLabelListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the DatabaseOperationListResult class. - * @constructor * The response to a list database operations request - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface DatabaseOperationListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ElasticPoolOperationListResult class. - * @constructor * The response to a list elastic pool operations request - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface ElasticPoolOperationListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the VulnerabilityAssessmentScanRecordListResult class. - * @constructor * A list of vulnerability assessment scan records. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ -export interface VulnerabilityAssessmentScanRecordListResult extends Array { +*/ +export interface VulnerabilityAssessmentScanRecordListResult extends +Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the InstanceFailoverGroupListResult class. - * @constructor * A list of instance failover groups. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface InstanceFailoverGroupListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the BackupShortTermRetentionPolicyListResult class. - * @constructor * A list of short term retention policies. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ -export interface BackupShortTermRetentionPolicyListResult extends Array { +*/ +export interface BackupShortTermRetentionPolicyListResult extends +Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ManagedInstanceKeyListResult class. - * @constructor * A list of managed instance keys. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ +*/ export interface ManagedInstanceKeyListResult extends Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } /** - * @class - * Initializes a new instance of the ManagedInstanceEncryptionProtectorListResult class. - * @constructor * A list of managed instance encryption protectors. - * - * @member {string} [nextLink] Link to retrieve next page of results. - */ -export interface ManagedInstanceEncryptionProtectorListResult extends Array { +*/ +export interface ManagedInstanceEncryptionProtectorListResult extends +Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} + +/** + * A list of recoverable managed databases. +*/ +export interface RecoverableManagedDatabaseListResult extends Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} + +/** + * A list of the ManagedInstance's vulnerability assessments. +*/ +export interface ManagedInstanceVulnerabilityAssessmentListResult extends +Array { + /** + * Link to retrieve next page of results. + */ + readonly nextLink?: string; +} + +/** + * A list of the server's vulnerability assessments. +*/ +export interface ServerVulnerabilityAssessmentListResult extends +Array { + /** + * Link to retrieve next page of results. + */ readonly nextLink?: string; } diff --git a/lib/services/sqlManagement2/lib/models/index.js b/lib/services/sqlManagement2/lib/models/index.js index 3c82b6f405..af23b967bf 100644 --- a/lib/services/sqlManagement2/lib/models/index.js +++ b/lib/services/sqlManagement2/lib/models/index.js @@ -87,6 +87,8 @@ exports.SyncGroupSchema = require('./syncGroupSchema'); exports.SyncGroup = require('./syncGroup'); exports.SyncMember = require('./syncMember'); exports.SubscriptionUsage = require('./subscriptionUsage'); +exports.VirtualCluster = require('./virtualCluster'); +exports.VirtualClusterUpdate = require('./virtualClusterUpdate'); exports.VirtualNetworkRule = require('./virtualNetworkRule'); exports.ExtendedDatabaseBlobAuditingPolicy = require('./extendedDatabaseBlobAuditingPolicy'); exports.ExtendedServerBlobAuditingPolicy = require('./extendedServerBlobAuditingPolicy'); @@ -121,8 +123,12 @@ exports.ServerAutomaticTuning = require('./serverAutomaticTuning'); exports.ServerDnsAlias = require('./serverDnsAlias'); exports.ServerDnsAliasAcquisition = require('./serverDnsAliasAcquisition'); exports.ServerSecurityAlertPolicy = require('./serverSecurityAlertPolicy'); +exports.RestorableDroppedManagedDatabase = require('./restorableDroppedManagedDatabase'); 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'); @@ -160,6 +166,9 @@ exports.BackupShortTermRetentionPolicy = require('./backupShortTermRetentionPoli exports.TdeCertificate = require('./tdeCertificate'); exports.ManagedInstanceKey = require('./managedInstanceKey'); exports.ManagedInstanceEncryptionProtector = require('./managedInstanceEncryptionProtector'); +exports.RecoverableManagedDatabase = require('./recoverableManagedDatabase'); +exports.ManagedInstanceVulnerabilityAssessment = require('./managedInstanceVulnerabilityAssessment'); +exports.ServerVulnerabilityAssessment = require('./serverVulnerabilityAssessment'); exports.RecoverableDatabaseListResult = require('./recoverableDatabaseListResult'); exports.RestorableDroppedDatabaseListResult = require('./restorableDroppedDatabaseListResult'); exports.ServerListResult = require('./serverListResult'); @@ -195,6 +204,7 @@ exports.SyncGroupLogListResult = require('./syncGroupLogListResult'); exports.SyncGroupListResult = require('./syncGroupListResult'); exports.SyncMemberListResult = require('./syncMemberListResult'); exports.SubscriptionUsageListResult = require('./subscriptionUsageListResult'); +exports.VirtualClusterListResult = require('./virtualClusterListResult'); exports.VirtualNetworkRuleListResult = require('./virtualNetworkRuleListResult'); exports.DatabaseVulnerabilityAssessmentListResult = require('./databaseVulnerabilityAssessmentListResult'); exports.JobAgentListResult = require('./jobAgentListResult'); @@ -208,7 +218,9 @@ exports.LongTermRetentionBackupListResult = require('./longTermRetentionBackupLi exports.ManagedBackupShortTermRetentionPolicyListResult = require('./managedBackupShortTermRetentionPolicyListResult'); 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'); @@ -216,3 +228,6 @@ exports.InstanceFailoverGroupListResult = require('./instanceFailoverGroupListRe exports.BackupShortTermRetentionPolicyListResult = require('./backupShortTermRetentionPolicyListResult'); exports.ManagedInstanceKeyListResult = require('./managedInstanceKeyListResult'); exports.ManagedInstanceEncryptionProtectorListResult = require('./managedInstanceEncryptionProtectorListResult'); +exports.RecoverableManagedDatabaseListResult = require('./recoverableManagedDatabaseListResult'); +exports.ManagedInstanceVulnerabilityAssessmentListResult = require('./managedInstanceVulnerabilityAssessmentListResult'); +exports.ServerVulnerabilityAssessmentListResult = require('./serverVulnerabilityAssessmentListResult'); diff --git a/lib/services/sqlManagement2/lib/models/instanceFailoverGroup.js b/lib/services/sqlManagement2/lib/models/instanceFailoverGroup.js index e9922cbba8..d8835147a0 100644 --- a/lib/services/sqlManagement2/lib/models/instanceFailoverGroup.js +++ b/lib/services/sqlManagement2/lib/models/instanceFailoverGroup.js @@ -20,30 +20,30 @@ const models = require('./index'); class InstanceFailoverGroup extends models['ProxyResource'] { /** * Create a InstanceFailoverGroup. - * @member {object} readWriteEndpoint Read-write endpoint of the failover + * @property {object} readWriteEndpoint Read-write endpoint of the failover * group instance. - * @member {string} [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' - * @member {number} + * @property {string} [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' + * @property {number} * [readWriteEndpoint.failoverWithDataLossGracePeriodMinutes] Grace period * before failover with data loss is attempted for the read-write endpoint. * If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes * is required. - * @member {object} [readOnlyEndpoint] Read-only endpoint of the failover + * @property {object} [readOnlyEndpoint] Read-only endpoint of the failover * group instance. - * @member {string} [readOnlyEndpoint.failoverPolicy] Failover policy of the - * read-only endpoint for the failover group. Possible values include: + * @property {string} [readOnlyEndpoint.failoverPolicy] Failover policy of + * the read-only endpoint for the failover group. Possible values include: * 'Disabled', 'Enabled' - * @member {string} [replicationRole] Local replication role of the failover - * group instance. Possible values include: 'Primary', 'Secondary' - * @member {string} [replicationState] Replication state of the failover + * @property {string} [replicationRole] Local replication role of the + * failover group instance. Possible values include: 'Primary', 'Secondary' + * @property {string} [replicationState] Replication state of the failover * group instance. - * @member {array} partnerRegions Partner region information for the failover - * group. - * @member {array} managedInstancePairs List of managed instance pairs in the + * @property {array} partnerRegions Partner region information for the * failover group. + * @property {array} managedInstancePairs List of managed instance pairs in + * the failover group. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/instanceFailoverGroupListResult.js b/lib/services/sqlManagement2/lib/models/instanceFailoverGroupListResult.js index 48f17c2c73..737475676c 100644 --- a/lib/services/sqlManagement2/lib/models/instanceFailoverGroupListResult.js +++ b/lib/services/sqlManagement2/lib/models/instanceFailoverGroupListResult.js @@ -16,7 +16,7 @@ class InstanceFailoverGroupListResult extends Array { /** * Create a InstanceFailoverGroupListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/instanceFailoverGroupReadOnlyEndpoint.js b/lib/services/sqlManagement2/lib/models/instanceFailoverGroupReadOnlyEndpoint.js index a1ddd1b8a8..f9c05327e1 100644 --- a/lib/services/sqlManagement2/lib/models/instanceFailoverGroupReadOnlyEndpoint.js +++ b/lib/services/sqlManagement2/lib/models/instanceFailoverGroupReadOnlyEndpoint.js @@ -17,7 +17,7 @@ class InstanceFailoverGroupReadOnlyEndpoint { /** * Create a InstanceFailoverGroupReadOnlyEndpoint. - * @member {string} [failoverPolicy] Failover policy of the read-only + * @property {string} [failoverPolicy] Failover policy of the read-only * endpoint for the failover group. Possible values include: 'Disabled', * 'Enabled' */ diff --git a/lib/services/sqlManagement2/lib/models/instanceFailoverGroupReadWriteEndpoint.js b/lib/services/sqlManagement2/lib/models/instanceFailoverGroupReadWriteEndpoint.js index 860c661d76..b47af7a4a7 100644 --- a/lib/services/sqlManagement2/lib/models/instanceFailoverGroupReadWriteEndpoint.js +++ b/lib/services/sqlManagement2/lib/models/instanceFailoverGroupReadWriteEndpoint.js @@ -17,11 +17,11 @@ class InstanceFailoverGroupReadWriteEndpoint { /** * Create a InstanceFailoverGroupReadWriteEndpoint. - * @member {string} failoverPolicy Failover policy of the read-write endpoint - * for the failover group. If failoverPolicy is Automatic then + * @property {string} 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' - * @member {number} [failoverWithDataLossGracePeriodMinutes] Grace period + * @property {number} [failoverWithDataLossGracePeriodMinutes] Grace period * before failover with data loss is attempted for the read-write endpoint. * If failoverPolicy is Automatic then failoverWithDataLossGracePeriodMinutes * is required. diff --git a/lib/services/sqlManagement2/lib/models/job.js b/lib/services/sqlManagement2/lib/models/job.js index a9e7856fc5..65aa29b3af 100644 --- a/lib/services/sqlManagement2/lib/models/job.js +++ b/lib/services/sqlManagement2/lib/models/job.js @@ -20,18 +20,18 @@ const models = require('./index'); class Job extends models['ProxyResource'] { /** * Create a Job. - * @member {string} [description] User-defined description of the job. + * @property {string} [description] User-defined description of the job. * Default value: '' . - * @member {number} [version] The job version number. - * @member {object} [schedule] Schedule properties of the job. - * @member {date} [schedule.startTime] Schedule start time. - * @member {date} [schedule.endTime] Schedule end time. - * @member {string} [schedule.type] Schedule interval type. Possible values + * @property {number} [version] The job version number. + * @property {object} [schedule] Schedule properties of the job. + * @property {date} [schedule.startTime] Schedule start time. + * @property {date} [schedule.endTime] Schedule end time. + * @property {string} [schedule.type] Schedule interval type. Possible values * include: 'Once', 'Recurring' - * @member {boolean} [schedule.enabled] Whether or not the schedule is + * @property {boolean} [schedule.enabled] Whether or not the schedule is * enabled. - * @member {string} [schedule.interval] Value of the schedule's recurring - * interval, if the scheduletype is recurring. ISO8601 duration format. + * @property {string} [schedule.interval] Value of the schedule's recurring + * interval, if the schedule type is recurring. ISO8601 duration format. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobAgent.js b/lib/services/sqlManagement2/lib/models/jobAgent.js index d9881e1dd7..2ba7fb8250 100644 --- a/lib/services/sqlManagement2/lib/models/jobAgent.js +++ b/lib/services/sqlManagement2/lib/models/jobAgent.js @@ -20,23 +20,23 @@ const models = require('./index'); class JobAgent extends models['TrackedResource'] { /** * Create a JobAgent. - * @member {object} [sku] The name and tier of the SKU. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically - * a letter+number code - * @member {string} [sku.tier] This field is required to be implemented by + * @property {object} [sku] The name and tier of the SKU. + * @property {string} [sku.name] The name of the SKU. Ex - P3. It is + * typically a letter+number code + * @property {string} [sku.tier] This field is required to be implemented by * the Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the + * @property {string} [sku.size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {string} databaseId Resource ID of the database to store job + * @property {string} [sku.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * @property {number} [sku.capacity] If the SKU supports scale out/in then + * the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + * @property {string} databaseId Resource ID of the database to store job * metadata in. - * @member {string} [state] The state of the job agent. Possible values + * @property {string} [state] The state of the job agent. Possible values * include: 'Creating', 'Ready', 'Updating', 'Deleting', 'Disabled' */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/jobAgentListResult.js b/lib/services/sqlManagement2/lib/models/jobAgentListResult.js index ba4bbd8e5b..8a52399d13 100644 --- a/lib/services/sqlManagement2/lib/models/jobAgentListResult.js +++ b/lib/services/sqlManagement2/lib/models/jobAgentListResult.js @@ -16,7 +16,7 @@ class JobAgentListResult extends Array { /** * Create a JobAgentListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobAgentUpdate.js b/lib/services/sqlManagement2/lib/models/jobAgentUpdate.js index 3f642c47d7..312c1e442a 100644 --- a/lib/services/sqlManagement2/lib/models/jobAgentUpdate.js +++ b/lib/services/sqlManagement2/lib/models/jobAgentUpdate.js @@ -17,7 +17,7 @@ class JobAgentUpdate { /** * Create a JobAgentUpdate. - * @member {object} [tags] Resource tags. + * @property {object} [tags] Resource tags. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/jobCredential.js b/lib/services/sqlManagement2/lib/models/jobCredential.js index dcdc5b6e02..09098d2f9b 100644 --- a/lib/services/sqlManagement2/lib/models/jobCredential.js +++ b/lib/services/sqlManagement2/lib/models/jobCredential.js @@ -21,8 +21,8 @@ const models = require('./index'); class JobCredential extends models['ProxyResource'] { /** * Create a JobCredential. - * @member {string} username The credential user name. - * @member {string} password The credential password. + * @property {string} username The credential user name. + * @property {string} password The credential password. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobCredentialListResult.js b/lib/services/sqlManagement2/lib/models/jobCredentialListResult.js index f35275547c..f9357c28dd 100644 --- a/lib/services/sqlManagement2/lib/models/jobCredentialListResult.js +++ b/lib/services/sqlManagement2/lib/models/jobCredentialListResult.js @@ -16,7 +16,7 @@ class JobCredentialListResult extends Array { /** * Create a JobCredentialListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobExecution.js b/lib/services/sqlManagement2/lib/models/jobExecution.js index 5992eadb78..6cd9213b62 100644 --- a/lib/services/sqlManagement2/lib/models/jobExecution.js +++ b/lib/services/sqlManagement2/lib/models/jobExecution.js @@ -20,32 +20,32 @@ const models = require('./index'); class JobExecution extends models['ProxyResource'] { /** * Create a JobExecution. - * @member {number} [jobVersion] The job version number. - * @member {string} [stepName] The job step name. - * @member {number} [stepId] The job step id. - * @member {uuid} [jobExecutionId] The unique identifier of the job + * @property {number} [jobVersion] The job version number. + * @property {string} [stepName] The job step name. + * @property {number} [stepId] The job step id. + * @property {uuid} [jobExecutionId] The unique identifier of the job * execution. - * @member {string} [lifecycle] The detailed state of the job execution. + * @property {string} [lifecycle] The detailed state of the job execution. * Possible values include: 'Created', 'InProgress', * 'WaitingForChildJobExecutions', 'WaitingForRetry', 'Succeeded', * 'SucceededWithSkipped', 'Failed', 'TimedOut', 'Canceled', 'Skipped' - * @member {string} [provisioningState] The ARM provisioning state of the job - * execution. Possible values include: 'Created', 'InProgress', 'Succeeded', - * 'Failed', 'Canceled' - * @member {date} [createTime] The time that the job execution was created. - * @member {date} [startTime] The time that the job execution started. - * @member {date} [endTime] The time that the job execution completed. - * @member {number} [currentAttempts] Number of times the job execution has + * @property {string} [provisioningState] The ARM provisioning state of the + * job execution. Possible values include: 'Created', 'InProgress', + * 'Succeeded', 'Failed', 'Canceled' + * @property {date} [createTime] The time that the job execution was created. + * @property {date} [startTime] The time that the job execution started. + * @property {date} [endTime] The time that the job execution completed. + * @property {number} [currentAttempts] Number of times the job execution has * been attempted. - * @member {date} [currentAttemptStartTime] Start time of the current + * @property {date} [currentAttemptStartTime] Start time of the current * attempt. - * @member {string} [lastMessage] The last status or error message. - * @member {object} [target] The target that this execution is executed on. - * @member {string} [target.type] The type of the target. Possible values + * @property {string} [lastMessage] The last status or error message. + * @property {object} [target] The target that this execution is executed on. + * @property {string} [target.type] The type of the target. Possible values * include: 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', * 'SqlServer' - * @member {string} [target.serverName] The server name. - * @member {string} [target.databaseName] The database name. + * @property {string} [target.serverName] The server name. + * @property {string} [target.databaseName] The database name. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobExecutionListResult.js b/lib/services/sqlManagement2/lib/models/jobExecutionListResult.js index 376f54f329..127e127728 100644 --- a/lib/services/sqlManagement2/lib/models/jobExecutionListResult.js +++ b/lib/services/sqlManagement2/lib/models/jobExecutionListResult.js @@ -16,7 +16,7 @@ class JobExecutionListResult extends Array { /** * Create a JobExecutionListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobExecutionTarget.js b/lib/services/sqlManagement2/lib/models/jobExecutionTarget.js index 34ae012d68..0c994e187c 100644 --- a/lib/services/sqlManagement2/lib/models/jobExecutionTarget.js +++ b/lib/services/sqlManagement2/lib/models/jobExecutionTarget.js @@ -17,10 +17,10 @@ class JobExecutionTarget { /** * Create a JobExecutionTarget. - * @member {string} [type] The type of the target. Possible values include: + * @property {string} [type] The type of the target. Possible values include: * 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - * @member {string} [serverName] The server name. - * @member {string} [databaseName] The database name. + * @property {string} [serverName] The server name. + * @property {string} [databaseName] The database name. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/jobListResult.js b/lib/services/sqlManagement2/lib/models/jobListResult.js index f5f7560d99..1b543ea592 100644 --- a/lib/services/sqlManagement2/lib/models/jobListResult.js +++ b/lib/services/sqlManagement2/lib/models/jobListResult.js @@ -16,7 +16,7 @@ class JobListResult extends Array { /** * Create a JobListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobSchedule.js b/lib/services/sqlManagement2/lib/models/jobSchedule.js index 70cf27c51e..aff6a2e3b1 100644 --- a/lib/services/sqlManagement2/lib/models/jobSchedule.js +++ b/lib/services/sqlManagement2/lib/models/jobSchedule.js @@ -17,15 +17,15 @@ class JobSchedule { /** * Create a JobSchedule. - * @member {date} [startTime] Schedule start time. Default value: new + * @property {date} [startTime] Schedule start time. Default value: new * Date('0001-01-01T00:00:00Z') . - * @member {date} [endTime] Schedule end time. Default value: new + * @property {date} [endTime] Schedule end time. Default value: new * Date('9999-12-31T11:59:59Z') . - * @member {string} [type] Schedule interval type. Possible values include: + * @property {string} [type] Schedule interval type. Possible values include: * 'Once', 'Recurring'. Default value: 'Once' . - * @member {boolean} [enabled] Whether or not the schedule is enabled. - * @member {string} [interval] Value of the schedule's recurring interval, if - * the scheduletype is recurring. ISO8601 duration format. + * @property {boolean} [enabled] Whether or not the schedule is enabled. + * @property {string} [interval] Value of the schedule's recurring interval, + * if the schedule type is recurring. ISO8601 duration format. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/jobStep.js b/lib/services/sqlManagement2/lib/models/jobStep.js index ae8cc6fbde..5067f8b1f4 100644 --- a/lib/services/sqlManagement2/lib/models/jobStep.js +++ b/lib/services/sqlManagement2/lib/models/jobStep.js @@ -20,43 +20,43 @@ const models = require('./index'); class JobStep extends models['ProxyResource'] { /** * Create a JobStep. - * @member {number} [stepId] The job step's index within the job. If not + * @property {number} [stepId] The job step's index within the job. If not * specified when creating the job step, it will be created as the last step. * If not specified when updating the job step, the step id is not modified. - * @member {string} targetGroup The resource ID of the target group that the - * job step will be executed on. - * @member {string} credential The resource ID of the job credential that + * @property {string} targetGroup The resource ID of the target group that + * the job step will be executed on. + * @property {string} credential The resource ID of the job credential that * will be used to connect to the targets. - * @member {object} action The action payload of the job step. - * @member {string} [action.type] Type of action being executed by the job + * @property {object} action The action payload of the job step. + * @property {string} [action.type] Type of action being executed by the job * step. Possible values include: 'TSql' - * @member {string} [action.source] The source of the action to execute. + * @property {string} [action.source] The source of the action to execute. * Possible values include: 'Inline' - * @member {string} [action.value] The action value, for example the text of - * the T-SQL script to execute. - * @member {object} [output] Output destination properties of the job step. - * @member {string} [output.type] The output destination type. Possible + * @property {string} [action.value] The action value, for example the text + * of the T-SQL script to execute. + * @property {object} [output] Output destination properties of the job step. + * @property {string} [output.type] The output destination type. Possible * values include: 'SqlDatabase' - * @member {uuid} [output.subscriptionId] The output destination subscription - * id. - * @member {string} [output.resourceGroupName] The output destination + * @property {uuid} [output.subscriptionId] The output destination + * subscription id. + * @property {string} [output.resourceGroupName] The output destination * resource group. - * @member {string} [output.serverName] The output destination server name. - * @member {string} [output.databaseName] The output destination database. - * @member {string} [output.schemaName] The output destination schema. - * @member {string} [output.tableName] The output destination table. - * @member {string} [output.credential] The resource ID of the credential to - * use to connect to the output destination. - * @member {object} [executionOptions] Execution options for the job step. - * @member {number} [executionOptions.timeoutSeconds] Execution timeout for + * @property {string} [output.serverName] The output destination server name. + * @property {string} [output.databaseName] The output destination database. + * @property {string} [output.schemaName] The output destination schema. + * @property {string} [output.tableName] The output destination table. + * @property {string} [output.credential] The resource ID of the credential + * to use to connect to the output destination. + * @property {object} [executionOptions] Execution options for the job step. + * @property {number} [executionOptions.timeoutSeconds] Execution timeout for * the job step. - * @member {number} [executionOptions.retryAttempts] Maximum number of times - * the job step will be reattempted if the first attempt fails. - * @member {number} [executionOptions.initialRetryIntervalSeconds] Initial + * @property {number} [executionOptions.retryAttempts] Maximum number of + * times the job step will be reattempted if the first attempt fails. + * @property {number} [executionOptions.initialRetryIntervalSeconds] Initial * delay between retries for job step execution. - * @member {number} [executionOptions.maximumRetryIntervalSeconds] The + * @property {number} [executionOptions.maximumRetryIntervalSeconds] The * maximum amount of time to wait between retries for job step execution. - * @member {number} [executionOptions.retryIntervalBackoffMultiplier] The + * @property {number} [executionOptions.retryIntervalBackoffMultiplier] The * backoff multiplier for the time between retries. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/jobStepAction.js b/lib/services/sqlManagement2/lib/models/jobStepAction.js index 06414b7657..f54f7ce2f7 100644 --- a/lib/services/sqlManagement2/lib/models/jobStepAction.js +++ b/lib/services/sqlManagement2/lib/models/jobStepAction.js @@ -17,12 +17,12 @@ class JobStepAction { /** * Create a JobStepAction. - * @member {string} [type] Type of action being executed by the job step. + * @property {string} [type] Type of action being executed by the job step. * Possible values include: 'TSql'. Default value: 'TSql' . - * @member {string} [source] The source of the action to execute. Possible + * @property {string} [source] The source of the action to execute. Possible * values include: 'Inline'. Default value: 'Inline' . - * @member {string} value The action value, for example the text of the T-SQL - * script to execute. + * @property {string} value The action value, for example the text of the + * T-SQL script to execute. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/jobStepExecutionOptions.js b/lib/services/sqlManagement2/lib/models/jobStepExecutionOptions.js index 0cea78cf12..0a5d802854 100644 --- a/lib/services/sqlManagement2/lib/models/jobStepExecutionOptions.js +++ b/lib/services/sqlManagement2/lib/models/jobStepExecutionOptions.js @@ -17,15 +17,15 @@ class JobStepExecutionOptions { /** * Create a JobStepExecutionOptions. - * @member {number} [timeoutSeconds] Execution timeout for the job step. + * @property {number} [timeoutSeconds] Execution timeout for the job step. * Default value: 43200 . - * @member {number} [retryAttempts] Maximum number of times the job step will - * be reattempted if the first attempt fails. Default value: 10 . - * @member {number} [initialRetryIntervalSeconds] Initial delay between + * @property {number} [retryAttempts] Maximum number of times the job step + * will be reattempted if the first attempt fails. Default value: 10 . + * @property {number} [initialRetryIntervalSeconds] Initial delay between * retries for job step execution. Default value: 1 . - * @member {number} [maximumRetryIntervalSeconds] The maximum amount of time - * to wait between retries for job step execution. Default value: 120 . - * @member {number} [retryIntervalBackoffMultiplier] The backoff multiplier + * @property {number} [maximumRetryIntervalSeconds] The maximum amount of + * time to wait between retries for job step execution. Default value: 120 . + * @property {number} [retryIntervalBackoffMultiplier] The backoff multiplier * for the time between retries. Default value: 2 . */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/jobStepListResult.js b/lib/services/sqlManagement2/lib/models/jobStepListResult.js index c7d8733fdf..eace11ed51 100644 --- a/lib/services/sqlManagement2/lib/models/jobStepListResult.js +++ b/lib/services/sqlManagement2/lib/models/jobStepListResult.js @@ -16,7 +16,7 @@ class JobStepListResult extends Array { /** * Create a JobStepListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobStepOutput.js b/lib/services/sqlManagement2/lib/models/jobStepOutput.js index dd00174899..c5f17f72a3 100644 --- a/lib/services/sqlManagement2/lib/models/jobStepOutput.js +++ b/lib/services/sqlManagement2/lib/models/jobStepOutput.js @@ -17,17 +17,17 @@ class JobStepOutput { /** * Create a JobStepOutput. - * @member {string} [type] The output destination type. Possible values + * @property {string} [type] The output destination type. Possible values * include: 'SqlDatabase'. Default value: 'SqlDatabase' . - * @member {uuid} [subscriptionId] The output destination subscription id. - * @member {string} [resourceGroupName] The output destination resource + * @property {uuid} [subscriptionId] The output destination subscription id. + * @property {string} [resourceGroupName] The output destination resource * group. - * @member {string} serverName The output destination server name. - * @member {string} databaseName The output destination database. - * @member {string} [schemaName] The output destination schema. Default + * @property {string} serverName The output destination server name. + * @property {string} databaseName The output destination database. + * @property {string} [schemaName] The output destination schema. Default * value: 'dbo' . - * @member {string} tableName The output destination table. - * @member {string} credential The resource ID of the credential to use to + * @property {string} tableName The output destination table. + * @property {string} credential The resource ID of the credential to use to * connect to the output destination. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/jobTarget.js b/lib/services/sqlManagement2/lib/models/jobTarget.js index e5b4d649dc..79e578796f 100644 --- a/lib/services/sqlManagement2/lib/models/jobTarget.js +++ b/lib/services/sqlManagement2/lib/models/jobTarget.js @@ -18,16 +18,16 @@ class JobTarget { /** * Create a JobTarget. - * @member {string} [membershipType] Whether the target is included or + * @property {string} [membershipType] Whether the target is included or * excluded from the group. Possible values include: 'Include', 'Exclude'. * Default value: 'Include' . - * @member {string} type The target type. Possible values include: + * @property {string} type The target type. Possible values include: * 'TargetGroup', 'SqlDatabase', 'SqlElasticPool', 'SqlShardMap', 'SqlServer' - * @member {string} [serverName] The target server name. - * @member {string} [databaseName] The target database name. - * @member {string} [elasticPoolName] The target elastic pool name. - * @member {string} [shardMapName] The target shard map. - * @member {string} [refreshCredential] The resource ID of the credential + * @property {string} [serverName] The target server name. + * @property {string} [databaseName] The target database name. + * @property {string} [elasticPoolName] The target elastic pool name. + * @property {string} [shardMapName] The target shard map. + * @property {string} [refreshCredential] The resource ID of the credential * that is used during job execution to connect to the target and determine * the list of databases inside the target. */ diff --git a/lib/services/sqlManagement2/lib/models/jobTargetGroup.js b/lib/services/sqlManagement2/lib/models/jobTargetGroup.js index f23a55c620..d144ca6742 100644 --- a/lib/services/sqlManagement2/lib/models/jobTargetGroup.js +++ b/lib/services/sqlManagement2/lib/models/jobTargetGroup.js @@ -20,7 +20,7 @@ const models = require('./index'); class JobTargetGroup extends models['ProxyResource'] { /** * Create a JobTargetGroup. - * @member {array} members Members of the target group. + * @property {array} members Members of the target group. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobTargetGroupListResult.js b/lib/services/sqlManagement2/lib/models/jobTargetGroupListResult.js index 181d09707b..9cdaf27f5c 100644 --- a/lib/services/sqlManagement2/lib/models/jobTargetGroupListResult.js +++ b/lib/services/sqlManagement2/lib/models/jobTargetGroupListResult.js @@ -16,7 +16,7 @@ class JobTargetGroupListResult extends Array { /** * Create a JobTargetGroupListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/jobVersionListResult.js b/lib/services/sqlManagement2/lib/models/jobVersionListResult.js index a2bb14997d..a10a1256f7 100644 --- a/lib/services/sqlManagement2/lib/models/jobVersionListResult.js +++ b/lib/services/sqlManagement2/lib/models/jobVersionListResult.js @@ -16,7 +16,7 @@ class JobVersionListResult extends Array { /** * Create a JobVersionListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/licenseTypeCapability.js b/lib/services/sqlManagement2/lib/models/licenseTypeCapability.js index 7149b0c6b8..55de02ba03 100644 --- a/lib/services/sqlManagement2/lib/models/licenseTypeCapability.js +++ b/lib/services/sqlManagement2/lib/models/licenseTypeCapability.js @@ -17,10 +17,10 @@ class LicenseTypeCapability { /** * Create a LicenseTypeCapability. - * @member {string} [name] License type identifier. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [name] License type identifier. + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/locationCapabilities.js b/lib/services/sqlManagement2/lib/models/locationCapabilities.js index 96d6d38763..aff7c1cffe 100644 --- a/lib/services/sqlManagement2/lib/models/locationCapabilities.js +++ b/lib/services/sqlManagement2/lib/models/locationCapabilities.js @@ -17,14 +17,14 @@ class LocationCapabilities { /** * Create a LocationCapabilities. - * @member {string} [name] The location name. - * @member {array} [supportedServerVersions] The list of supported server + * @property {string} [name] The location name. + * @property {array} [supportedServerVersions] The list of supported server * versions. - * @member {array} [supportedManagedInstanceVersions] The list of supported + * @property {array} [supportedManagedInstanceVersions] The list of supported * managed instance versions. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/logSizeCapability.js b/lib/services/sqlManagement2/lib/models/logSizeCapability.js index 939f3898f1..9fa838299f 100644 --- a/lib/services/sqlManagement2/lib/models/logSizeCapability.js +++ b/lib/services/sqlManagement2/lib/models/logSizeCapability.js @@ -17,10 +17,10 @@ class LogSizeCapability { /** * Create a LogSizeCapability. - * @member {number} [limit] The log size limit (see 'unit' for the units). - * @member {string} [unit] The units that the limit is expressed in. Possible - * values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes', - * 'Percent' + * @property {number} [limit] The log size limit (see 'unit' for the units). + * @property {string} [unit] The units that the limit is expressed in. + * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', + * 'Petabytes', 'Percent' */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/longTermRetentionBackup.js b/lib/services/sqlManagement2/lib/models/longTermRetentionBackup.js index d5c13d1442..58adaf698e 100644 --- a/lib/services/sqlManagement2/lib/models/longTermRetentionBackup.js +++ b/lib/services/sqlManagement2/lib/models/longTermRetentionBackup.js @@ -20,14 +20,14 @@ const models = require('./index'); class LongTermRetentionBackup extends models['ProxyResource'] { /** * Create a LongTermRetentionBackup. - * @member {string} [serverName] The server name that the backup database + * @property {string} [serverName] The server name that the backup database * belong to. - * @member {date} [serverCreateTime] The create time of the server. - * @member {string} [databaseName] The name of the database the backup belong - * to - * @member {date} [databaseDeletionTime] The delete time of the database - * @member {date} [backupTime] The time the backup was taken - * @member {date} [backupExpirationTime] The time the long term retention + * @property {date} [serverCreateTime] The create time of the server. + * @property {string} [databaseName] The name of the database the backup + * belong to + * @property {date} [databaseDeletionTime] The delete time of the database + * @property {date} [backupTime] The time the backup was taken + * @property {date} [backupExpirationTime] The time the long term retention * backup will expire. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/longTermRetentionBackupListResult.js b/lib/services/sqlManagement2/lib/models/longTermRetentionBackupListResult.js index a03e44911a..9242d51953 100644 --- a/lib/services/sqlManagement2/lib/models/longTermRetentionBackupListResult.js +++ b/lib/services/sqlManagement2/lib/models/longTermRetentionBackupListResult.js @@ -11,12 +11,12 @@ 'use strict'; /** - * A list of long term retention bacukps. + * A list of long term retention backups. */ class LongTermRetentionBackupListResult extends Array { /** * Create a LongTermRetentionBackupListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedBackupShortTermRetentionPolicy.js b/lib/services/sqlManagement2/lib/models/managedBackupShortTermRetentionPolicy.js index e35a855fcc..f5a3e37d0f 100644 --- a/lib/services/sqlManagement2/lib/models/managedBackupShortTermRetentionPolicy.js +++ b/lib/services/sqlManagement2/lib/models/managedBackupShortTermRetentionPolicy.js @@ -20,8 +20,8 @@ const models = require('./index'); class ManagedBackupShortTermRetentionPolicy extends models['ProxyResource'] { /** * Create a ManagedBackupShortTermRetentionPolicy. - * @member {number} [retentionDays] The backup retention period in days. This - * is how many days Point-in-Time Restore will be supported. + * @property {number} [retentionDays] The backup retention period in days. + * This is how many days Point-in-Time Restore will be supported. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedBackupShortTermRetentionPolicyListResult.js b/lib/services/sqlManagement2/lib/models/managedBackupShortTermRetentionPolicyListResult.js index 7f5f89a13d..4d833bc279 100644 --- a/lib/services/sqlManagement2/lib/models/managedBackupShortTermRetentionPolicyListResult.js +++ b/lib/services/sqlManagement2/lib/models/managedBackupShortTermRetentionPolicyListResult.js @@ -16,7 +16,7 @@ class ManagedBackupShortTermRetentionPolicyListResult extends Array { /** * Create a ManagedBackupShortTermRetentionPolicyListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedDatabase.js b/lib/services/sqlManagement2/lib/models/managedDatabase.js index 3ca5f1e06a..0ff8229728 100644 --- a/lib/services/sqlManagement2/lib/models/managedDatabase.js +++ b/lib/services/sqlManagement2/lib/models/managedDatabase.js @@ -20,37 +20,45 @@ const models = require('./index'); class ManagedDatabase extends models['TrackedResource'] { /** * Create a ManagedDatabase. - * @member {string} [collation] Collation of the managed database. - * @member {string} [status] Status for the database. Possible values - * include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible' - * @member {date} [creationDate] Creation date of the database. - * @member {date} [earliestRestorePoint] Earliest restore point in time for + * @property {string} [collation] Collation of the managed database. + * @property {string} [status] Status of the database. Possible values + * include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible', + * 'Updating' + * @property {date} [creationDate] Creation date of the database. + * @property {date} [earliestRestorePoint] Earliest restore point in time for * point in time restore. - * @member {date} [restorePointInTime] Conditional. If createMode is + * @property {date} [restorePointInTime] Conditional. If createMode is * PointInTimeRestore, this value is required. Specifies the point in time * (ISO8601 format) of the source database that will be restored to create * the new database. - * @member {string} [defaultSecondaryLocation] Geo paired region. - * @member {string} [catalogCollation] Collation of the metadata catalog. + * @property {string} [defaultSecondaryLocation] Geo paired region. + * @property {string} [catalogCollation] Collation of the metadata catalog. * Possible values include: 'DATABASE_DEFAULT', * 'SQL_Latin1_General_CP1_CI_AS' - * @member {string} [createMode] Managed database create mode. + * @property {string} [createMode] Managed database create mode. * PointInTimeRestore: Create a database by restoring a point in time backup * of an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - * @member {string} [storageContainerUri] Conditional. If createMode is + * StorageContainerSasToken must be specified. Recovery: Creates a database + * by restoring a geo-replicated backup. RecoverableDatabaseId must be + * specified as the recoverable database resource ID to restore. Possible + * values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + * 'Recovery' + * @property {string} [storageContainerUri] Conditional. If createMode is * RestoreExternalBackup, this value is required. Specifies the uri of the * storage container where backups for this restore are stored. - * @member {string} [sourceDatabaseId] The resource identifier of the source - * database associated with create operation of this database. - * @member {string} [storageContainerSasToken] Conditional. If createMode is - * RestoreExternalBackup, this value is required. Specifies the storage + * @property {string} [sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. + * @property {string} [restorableDroppedDatabaseId] The restorable dropped + * database resource id to restore when creating this database. + * @property {string} [storageContainerSasToken] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the storage * container sas token. - * @member {string} [failoverGroupId] Instance Failover Group resource + * @property {string} [failoverGroupId] Instance Failover Group resource * identifier that this managed database belongs to. + * @property {string} [recoverableDatabaseId] The resource identifier of the + * recoverable database associated with create operation of this database. */ constructor() { super(); @@ -189,6 +197,13 @@ class ManagedDatabase extends models['TrackedResource'] { name: 'String' } }, + restorableDroppedDatabaseId: { + required: false, + serializedName: 'properties.restorableDroppedDatabaseId', + type: { + name: 'String' + } + }, storageContainerSasToken: { required: false, serializedName: 'properties.storageContainerSasToken', @@ -203,6 +218,13 @@ class ManagedDatabase extends models['TrackedResource'] { type: { name: 'String' } + }, + recoverableDatabaseId: { + required: false, + serializedName: 'properties.recoverableDatabaseId', + type: { + name: 'String' + } } } } diff --git a/lib/services/sqlManagement2/lib/models/managedDatabaseListResult.js b/lib/services/sqlManagement2/lib/models/managedDatabaseListResult.js index dcd44d94b3..42f53a6859 100644 --- a/lib/services/sqlManagement2/lib/models/managedDatabaseListResult.js +++ b/lib/services/sqlManagement2/lib/models/managedDatabaseListResult.js @@ -16,7 +16,7 @@ class ManagedDatabaseListResult extends Array { /** * Create a ManagedDatabaseListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedDatabaseSecurityAlertPolicy.js b/lib/services/sqlManagement2/lib/models/managedDatabaseSecurityAlertPolicy.js new file mode 100644 index 0000000000..6fa7d5c76c --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/managedDatabaseSecurityAlertPolicy.js @@ -0,0 +1,162 @@ +/* + * 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 models = require('./index'); + +/** + * A managed database security alert policy. + * + * @extends models['ProxyResource'] + */ +class ManagedDatabaseSecurityAlertPolicy extends models['ProxyResource'] { + /** + * Create a ManagedDatabaseSecurityAlertPolicy. + * @property {string} state Specifies the state of the policy, whether it is + * enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled' + * @property {array} [disabledAlerts] Specifies an array of alerts that are + * disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + * Access_Anomaly, Data_Exfiltration, Unsafe_Action + * @property {array} [emailAddresses] Specifies an array of e-mail addresses + * to which the alert is sent. + * @property {boolean} [emailAccountAdmins] Specifies that the alert is sent + * to the account administrators. + * @property {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). This blob storage will + * hold all Threat Detection audit logs. + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the Threat Detection audit storage account. + * @property {number} [retentionDays] Specifies the number of days to keep in + * the Threat Detection audit logs. + * @property {date} [creationTime] Specifies the UTC creation time of the + * policy. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ManagedDatabaseSecurityAlertPolicy + * + * @returns {object} metadata of ManagedDatabaseSecurityAlertPolicy + * + */ + mapper() { + return { + required: false, + serializedName: 'ManagedDatabaseSecurityAlertPolicy', + type: { + name: 'Composite', + className: 'ManagedDatabaseSecurityAlertPolicy', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + state: { + required: true, + serializedName: 'properties.state', + type: { + name: 'Enum', + allowedValues: [ 'New', 'Enabled', 'Disabled' ] + } + }, + disabledAlerts: { + required: false, + serializedName: 'properties.disabledAlerts', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + emailAddresses: { + required: false, + serializedName: 'properties.emailAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + emailAccountAdmins: { + required: false, + serializedName: 'properties.emailAccountAdmins', + type: { + name: 'Boolean' + } + }, + storageEndpoint: { + required: false, + serializedName: 'properties.storageEndpoint', + type: { + name: 'String' + } + }, + storageAccountAccessKey: { + required: false, + serializedName: 'properties.storageAccountAccessKey', + type: { + name: 'String' + } + }, + retentionDays: { + required: false, + serializedName: 'properties.retentionDays', + type: { + name: 'Number' + } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ManagedDatabaseSecurityAlertPolicy; diff --git a/lib/services/sqlManagement2/lib/models/managedDatabaseUpdate.js b/lib/services/sqlManagement2/lib/models/managedDatabaseUpdate.js index 8649d21350..95d93fe3d4 100644 --- a/lib/services/sqlManagement2/lib/models/managedDatabaseUpdate.js +++ b/lib/services/sqlManagement2/lib/models/managedDatabaseUpdate.js @@ -17,38 +17,46 @@ class ManagedDatabaseUpdate { /** * Create a ManagedDatabaseUpdate. - * @member {string} [collation] Collation of the managed database. - * @member {string} [status] Status for the database. Possible values - * include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible' - * @member {date} [creationDate] Creation date of the database. - * @member {date} [earliestRestorePoint] Earliest restore point in time for + * @property {string} [collation] Collation of the managed database. + * @property {string} [status] Status of the database. Possible values + * include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible', + * 'Updating' + * @property {date} [creationDate] Creation date of the database. + * @property {date} [earliestRestorePoint] Earliest restore point in time for * point in time restore. - * @member {date} [restorePointInTime] Conditional. If createMode is + * @property {date} [restorePointInTime] Conditional. If createMode is * PointInTimeRestore, this value is required. Specifies the point in time * (ISO8601 format) of the source database that will be restored to create * the new database. - * @member {string} [defaultSecondaryLocation] Geo paired region. - * @member {string} [catalogCollation] Collation of the metadata catalog. + * @property {string} [defaultSecondaryLocation] Geo paired region. + * @property {string} [catalogCollation] Collation of the metadata catalog. * Possible values include: 'DATABASE_DEFAULT', * 'SQL_Latin1_General_CP1_CI_AS' - * @member {string} [createMode] Managed database create mode. + * @property {string} [createMode] Managed database create mode. * PointInTimeRestore: Create a database by restoring a point in time backup * of an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - * @member {string} [storageContainerUri] Conditional. If createMode is + * StorageContainerSasToken must be specified. Recovery: Creates a database + * by restoring a geo-replicated backup. RecoverableDatabaseId must be + * specified as the recoverable database resource ID to restore. Possible + * values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', + * 'Recovery' + * @property {string} [storageContainerUri] Conditional. If createMode is * RestoreExternalBackup, this value is required. Specifies the uri of the * storage container where backups for this restore are stored. - * @member {string} [sourceDatabaseId] The resource identifier of the source - * database associated with create operation of this database. - * @member {string} [storageContainerSasToken] Conditional. If createMode is - * RestoreExternalBackup, this value is required. Specifies the storage + * @property {string} [sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. + * @property {string} [restorableDroppedDatabaseId] The restorable dropped + * database resource id to restore when creating this database. + * @property {string} [storageContainerSasToken] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the storage * container sas token. - * @member {string} [failoverGroupId] Instance Failover Group resource + * @property {string} [failoverGroupId] Instance Failover Group resource * identifier that this managed database belongs to. - * @member {object} [tags] Resource tags. + * @property {string} [recoverableDatabaseId] The resource identifier of the + * recoverable database associated with create operation of this database. + * @property {object} [tags] Resource tags. */ constructor() { } @@ -141,6 +149,13 @@ class ManagedDatabaseUpdate { name: 'String' } }, + restorableDroppedDatabaseId: { + required: false, + serializedName: 'properties.restorableDroppedDatabaseId', + type: { + name: 'String' + } + }, storageContainerSasToken: { required: false, serializedName: 'properties.storageContainerSasToken', @@ -156,6 +171,13 @@ class ManagedDatabaseUpdate { name: 'String' } }, + recoverableDatabaseId: { + required: false, + serializedName: 'properties.recoverableDatabaseId', + type: { + name: 'String' + } + }, tags: { required: false, serializedName: 'tags', diff --git a/lib/services/sqlManagement2/lib/models/managedInstance.js b/lib/services/sqlManagement2/lib/models/managedInstance.js index e361173447..06739b4cae 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstance.js +++ b/lib/services/sqlManagement2/lib/models/managedInstance.js @@ -20,46 +20,61 @@ const models = require('./index'); class ManagedInstance extends models['TrackedResource'] { /** * Create a ManagedInstance. - * @member {object} [identity] The Azure Active Directory identity of the + * @property {object} [identity] The Azure Active Directory identity of the * managed instance. - * @member {uuid} [identity.principalId] The Azure Active Directory principal - * id. - * @member {string} [identity.type] The identity type. Set this to + * @property {uuid} [identity.principalId] The Azure Active Directory + * principal id. + * @property {string} [identity.type] The identity type. Set this to * 'SystemAssigned' in order to automatically create and assign an Azure * Active Directory principal for the resource. Possible values include: * 'SystemAssigned' - * @member {uuid} [identity.tenantId] The Azure Active Directory tenant id. - * @member {object} [sku] Managed instance sku - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically - * a letter+number code - * @member {string} [sku.tier] This field is required to be implemented by + * @property {uuid} [identity.tenantId] The Azure Active Directory tenant id. + * @property {object} [sku] Managed instance sku + * @property {string} [sku.name] The name of the SKU. Ex - P3. It is + * typically a letter+number code + * @property {string} [sku.tier] This field is required to be implemented by * the Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the + * @property {string} [sku.size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {string} [fullyQualifiedDomainName] The fully qualified domain + * @property {string} [sku.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * @property {number} [sku.capacity] If the SKU supports scale out/in then + * the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + * @property {string} [fullyQualifiedDomainName] The fully qualified domain * name of the managed instance. - * @member {string} [administratorLogin] Administrator username for the + * @property {string} [administratorLogin] Administrator username for the * managed instance. Can only be specified when the managed instance is being * created (and is required for creation). - * @member {string} [administratorLoginPassword] The administrator login + * @property {string} [administratorLoginPassword] The administrator login * password (required for managed instance creation). - * @member {string} [subnetId] Subnet resource ID for the managed instance. - * @member {string} [state] The state of the managed instance. - * @member {string} [licenseType] The license type. Possible values are + * @property {string} [subnetId] Subnet resource ID for the managed instance. + * @property {string} [state] The state of the managed instance. + * @property {string} [licenseType] The license type. Possible values are * 'LicenseIncluded' and 'BasePrice'. - * @member {number} [vCores] The number of VCores. - * @member {number} [storageSizeInGB] The maximum storage size in GB. - * @member {string} [collation] Collation of the managed instance. - * @member {string} [dnsZone] The Dns Zone that the managed instance is in. - * @member {string} [dnsZonePartner] The resource id of another managed + * @property {number} [vCores] The number of VCores. + * @property {number} [storageSizeInGB] The maximum storage size in GB. + * @property {string} [collation] Collation of the managed instance. + * @property {string} [dnsZone] The Dns Zone that the managed instance is in. + * @property {string} [dnsZonePartner] The resource id of another managed * 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] Connection type used for connecting to + * the instance. Possible values include: 'Proxy', 'Redirect', 'Default' + * @property {string} [timezoneId] Id of the timezone. Allowed values are + * timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in + * registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name + * AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". */ constructor() { super(); @@ -219,6 +234,27 @@ class ManagedInstance extends models['TrackedResource'] { type: { name: 'String' } + }, + publicDataEndpointEnabled: { + required: false, + serializedName: 'properties.publicDataEndpointEnabled', + type: { + name: 'Boolean' + } + }, + proxyOverride: { + required: false, + serializedName: 'properties.proxyOverride', + type: { + name: 'String' + } + }, + timezoneId: { + required: false, + serializedName: 'properties.timezoneId', + type: { + name: 'String' + } } } } diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceEditionCapability.js b/lib/services/sqlManagement2/lib/models/managedInstanceEditionCapability.js index 48c8301ff2..61a58674ca 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceEditionCapability.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceEditionCapability.js @@ -17,11 +17,11 @@ class ManagedInstanceEditionCapability { /** * Create a ManagedInstanceEditionCapability. - * @member {string} [name] The managed server version name. - * @member {array} [supportedFamilies] The supported families. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [name] The managed server version name. + * @property {array} [supportedFamilies] The supported families. + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceEncryptionProtector.js b/lib/services/sqlManagement2/lib/models/managedInstanceEncryptionProtector.js index 505319454c..84e26922b9 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceEncryptionProtector.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceEncryptionProtector.js @@ -20,14 +20,14 @@ const models = require('./index'); class ManagedInstanceEncryptionProtector extends models['ProxyResource'] { /** * Create a ManagedInstanceEncryptionProtector. - * @member {string} [kind] Kind of encryption protector. This is metadata + * @property {string} [kind] Kind of encryption protector. This is metadata * used for the Azure portal experience. - * @member {string} [serverKeyName] The name of the managed instance key. - * @member {string} serverKeyType The encryption protector type like + * @property {string} [serverKeyName] The name of the managed instance key. + * @property {string} serverKeyType The encryption protector type like * 'ServiceManaged', 'AzureKeyVault'. Possible values include: * 'ServiceManaged', 'AzureKeyVault' - * @member {string} [uri] The URI of the server key. - * @member {string} [thumbprint] Thumbprint of the server key. + * @property {string} [uri] The URI of the server key. + * @property {string} [thumbprint] Thumbprint of the server key. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceEncryptionProtectorListResult.js b/lib/services/sqlManagement2/lib/models/managedInstanceEncryptionProtectorListResult.js index c545cb8176..29043b949f 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceEncryptionProtectorListResult.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceEncryptionProtectorListResult.js @@ -16,7 +16,7 @@ class ManagedInstanceEncryptionProtectorListResult extends Array { /** * Create a ManagedInstanceEncryptionProtectorListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceFamilyCapability.js b/lib/services/sqlManagement2/lib/models/managedInstanceFamilyCapability.js index dfc52ff910..5247352af2 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceFamilyCapability.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceFamilyCapability.js @@ -17,21 +17,21 @@ class ManagedInstanceFamilyCapability { /** * Create a ManagedInstanceFamilyCapability. - * @member {string} [name] Family name. - * @member {string} [sku] SKU name. - * @member {array} [supportedLicenseTypes] List of supported license types. - * @member {array} [supportedVcoresValues] List of supported virtual cores + * @property {string} [name] Family name. + * @property {string} [sku] SKU name. + * @property {array} [supportedLicenseTypes] List of supported license types. + * @property {array} [supportedVcoresValues] List of supported virtual cores * values. - * @member {object} [includedMaxSize] Included size. - * @member {number} [includedMaxSize.limit] The maximum size limit (see + * @property {object} [includedMaxSize] Included size. + * @property {number} [includedMaxSize.limit] The maximum size limit (see * 'unit' for the units). - * @member {string} [includedMaxSize.unit] The units that the limit is + * @property {string} [includedMaxSize.unit] The units that the limit is * expressed in. Possible values include: 'Megabytes', 'Gigabytes', * 'Terabytes', 'Petabytes' - * @member {array} [supportedStorageSizes] Storage size ranges. - * @member {string} [status] The status of the capability. Possible values + * @property {array} [supportedStorageSizes] Storage size ranges. + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceKey.js b/lib/services/sqlManagement2/lib/models/managedInstanceKey.js index 24c25d8a86..8fee2e8cad 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceKey.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceKey.js @@ -20,15 +20,15 @@ const models = require('./index'); class ManagedInstanceKey extends models['ProxyResource'] { /** * Create a ManagedInstanceKey. - * @member {string} [kind] Kind of encryption protector. This is metadata + * @property {string} [kind] Kind of encryption protector. This is metadata * used for the Azure portal experience. - * @member {string} serverKeyType The key type like 'ServiceManaged', + * @property {string} serverKeyType The key type like 'ServiceManaged', * 'AzureKeyVault'. Possible values include: 'ServiceManaged', * 'AzureKeyVault' - * @member {string} [uri] The URI of the key. If the ServerKeyType is + * @property {string} [uri] The URI of the key. If the ServerKeyType is * AzureKeyVault, then the URI is required. - * @member {string} [thumbprint] Thumbprint of the key. - * @member {date} [creationDate] The key creation date. + * @property {string} [thumbprint] Thumbprint of the key. + * @property {date} [creationDate] The key creation date. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceKeyListResult.js b/lib/services/sqlManagement2/lib/models/managedInstanceKeyListResult.js index 861111ffc1..2020652f09 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceKeyListResult.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceKeyListResult.js @@ -16,7 +16,7 @@ class ManagedInstanceKeyListResult extends Array { /** * Create a ManagedInstanceKeyListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceListResult.js b/lib/services/sqlManagement2/lib/models/managedInstanceListResult.js index a6b27f7ebf..afeeb6fdb2 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceListResult.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceListResult.js @@ -16,7 +16,7 @@ class ManagedInstanceListResult extends Array { /** * Create a ManagedInstanceListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/managedInstancePairInfo.js b/lib/services/sqlManagement2/lib/models/managedInstancePairInfo.js index c352f8d74c..6bd4816e63 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstancePairInfo.js +++ b/lib/services/sqlManagement2/lib/models/managedInstancePairInfo.js @@ -17,10 +17,10 @@ class ManagedInstancePairInfo { /** * Create a ManagedInstancePairInfo. - * @member {string} [primaryManagedInstanceId] Id of Primary Managed Instance - * in pair. - * @member {string} [partnerManagedInstanceId] Id of Partner Managed Instance - * in pair. + * @property {string} [primaryManagedInstanceId] Id of Primary Managed + * Instance in pair. + * @property {string} [partnerManagedInstanceId] Id of Partner Managed + * Instance in pair. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceUpdate.js b/lib/services/sqlManagement2/lib/models/managedInstanceUpdate.js index af9f0a3de2..264523169b 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceUpdate.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceUpdate.js @@ -17,38 +17,53 @@ class ManagedInstanceUpdate { /** * Create a ManagedInstanceUpdate. - * @member {object} [sku] Managed instance sku - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically - * a letter+number code - * @member {string} [sku.tier] This field is required to be implemented by + * @property {object} [sku] Managed instance sku + * @property {string} [sku.name] The name of the SKU. Ex - P3. It is + * typically a letter+number code + * @property {string} [sku.tier] This field is required to be implemented by * the Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the + * @property {string} [sku.size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {string} [fullyQualifiedDomainName] The fully qualified domain + * @property {string} [sku.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * @property {number} [sku.capacity] If the SKU supports scale out/in then + * the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + * @property {string} [fullyQualifiedDomainName] The fully qualified domain * name of the managed instance. - * @member {string} [administratorLogin] Administrator username for the + * @property {string} [administratorLogin] Administrator username for the * managed instance. Can only be specified when the managed instance is being * created (and is required for creation). - * @member {string} [administratorLoginPassword] The administrator login + * @property {string} [administratorLoginPassword] The administrator login * password (required for managed instance creation). - * @member {string} [subnetId] Subnet resource ID for the managed instance. - * @member {string} [state] The state of the managed instance. - * @member {string} [licenseType] The license type. Possible values are + * @property {string} [subnetId] Subnet resource ID for the managed instance. + * @property {string} [state] The state of the managed instance. + * @property {string} [licenseType] The license type. Possible values are * 'LicenseIncluded' and 'BasePrice'. - * @member {number} [vCores] The number of VCores. - * @member {number} [storageSizeInGB] The maximum storage size in GB. - * @member {string} [collation] Collation of the managed instance. - * @member {string} [dnsZone] The Dns Zone that the managed instance is in. - * @member {string} [dnsZonePartner] The resource id of another managed + * @property {number} [vCores] The number of VCores. + * @property {number} [storageSizeInGB] The maximum storage size in GB. + * @property {string} [collation] Collation of the managed instance. + * @property {string} [dnsZone] The Dns Zone that the managed instance is in. + * @property {string} [dnsZonePartner] The resource id of another managed * instance whose DNS zone this managed instance will share after creation. - * @member {object} [tags] Resource tags. + * @property {boolean} [publicDataEndpointEnabled] Whether or not the public + * data endpoint is enabled. + * @property {string} [proxyOverride] Connection type used for connecting to + * the instance. Possible values include: 'Proxy', 'Redirect', 'Default' + * @property {string} [timezoneId] Id of the timezone. Allowed values are + * timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in + * registry under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name + * AS timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * @property {object} [tags] Resource tags. */ constructor() { } @@ -155,6 +170,27 @@ class ManagedInstanceUpdate { name: 'String' } }, + publicDataEndpointEnabled: { + required: false, + serializedName: 'properties.publicDataEndpointEnabled', + type: { + name: 'Boolean' + } + }, + proxyOverride: { + required: false, + serializedName: 'properties.proxyOverride', + type: { + name: 'String' + } + }, + timezoneId: { + required: false, + serializedName: 'properties.timezoneId', + type: { + name: 'String' + } + }, tags: { required: false, serializedName: 'tags', diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceVcoresCapability.js b/lib/services/sqlManagement2/lib/models/managedInstanceVcoresCapability.js index 2bed9e08d7..bda795b531 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceVcoresCapability.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceVcoresCapability.js @@ -17,11 +17,11 @@ class ManagedInstanceVcoresCapability { /** * Create a ManagedInstanceVcoresCapability. - * @member {string} [name] The virtual cores identifier. - * @member {number} [value] The virtual cores value. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [name] The virtual cores identifier. + * @property {number} [value] The virtual cores value. + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceVersionCapability.js b/lib/services/sqlManagement2/lib/models/managedInstanceVersionCapability.js index 154896a493..ea5c032d45 100644 --- a/lib/services/sqlManagement2/lib/models/managedInstanceVersionCapability.js +++ b/lib/services/sqlManagement2/lib/models/managedInstanceVersionCapability.js @@ -17,12 +17,12 @@ class ManagedInstanceVersionCapability { /** * Create a ManagedInstanceVersionCapability. - * @member {string} [name] The server version name. - * @member {array} [supportedEditions] The list of supported managed instance - * editions. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [name] The server version name. + * @property {array} [supportedEditions] The list of supported managed + * instance editions. + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceVulnerabilityAssessment.js b/lib/services/sqlManagement2/lib/models/managedInstanceVulnerabilityAssessment.js new file mode 100644 index 0000000000..70be4293ed --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/managedInstanceVulnerabilityAssessment.js @@ -0,0 +1,119 @@ +/* + * 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 models = require('./index'); + +/** + * A managed instance vulnerability assessment. + * + * @extends models['ProxyResource'] + */ +class ManagedInstanceVulnerabilityAssessment extends models['ProxyResource'] { + /** + * Create a ManagedInstanceVulnerabilityAssessment. + * @property {string} storageContainerPath A blob storage container path to + * hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). + * @property {string} [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. + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the storage account for vulnerability assessment scan results. If + * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + * required. + * @property {object} [recurringScans] The recurring scans settings + * @property {boolean} [recurringScans.isEnabled] Recurring scans state. + * @property {boolean} [recurringScans.emailSubscriptionAdmins] Specifies + * that the schedule scan notification will be is sent to the subscription + * administrators. + * @property {array} [recurringScans.emails] Specifies an array of e-mail + * addresses to which the scan notification is sent. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ManagedInstanceVulnerabilityAssessment + * + * @returns {object} metadata of ManagedInstanceVulnerabilityAssessment + * + */ + mapper() { + return { + required: false, + serializedName: 'ManagedInstanceVulnerabilityAssessment', + type: { + name: 'Composite', + className: 'ManagedInstanceVulnerabilityAssessment', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + storageContainerPath: { + required: true, + serializedName: 'properties.storageContainerPath', + type: { + name: 'String' + } + }, + storageContainerSasKey: { + required: false, + serializedName: 'properties.storageContainerSasKey', + type: { + name: 'String' + } + }, + storageAccountAccessKey: { + required: false, + serializedName: 'properties.storageAccountAccessKey', + type: { + name: 'String' + } + }, + recurringScans: { + required: false, + serializedName: 'properties.recurringScans', + type: { + name: 'Composite', + className: 'VulnerabilityAssessmentRecurringScansProperties' + } + } + } + } + }; + } +} + +module.exports = ManagedInstanceVulnerabilityAssessment; diff --git a/lib/services/sqlManagement2/lib/models/managedInstanceVulnerabilityAssessmentListResult.js b/lib/services/sqlManagement2/lib/models/managedInstanceVulnerabilityAssessmentListResult.js new file mode 100644 index 0000000000..a02f14978f --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/managedInstanceVulnerabilityAssessmentListResult.js @@ -0,0 +1,69 @@ +/* + * 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'; + +/** + * A list of the ManagedInstance's vulnerability assessments. + */ +class ManagedInstanceVulnerabilityAssessmentListResult extends Array { + /** + * Create a ManagedInstanceVulnerabilityAssessmentListResult. + * @property {string} [nextLink] Link to retrieve next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ManagedInstanceVulnerabilityAssessmentListResult + * + * @returns {object} metadata of ManagedInstanceVulnerabilityAssessmentListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ManagedInstanceVulnerabilityAssessmentListResult', + type: { + name: 'Composite', + className: 'ManagedInstanceVulnerabilityAssessmentListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ManagedInstanceVulnerabilityAssessmentElementType', + type: { + name: 'Composite', + className: 'ManagedInstanceVulnerabilityAssessment' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ManagedInstanceVulnerabilityAssessmentListResult; diff --git a/lib/services/sqlManagement2/lib/models/managedServerSecurityAlertPolicy.js b/lib/services/sqlManagement2/lib/models/managedServerSecurityAlertPolicy.js new file mode 100644 index 0000000000..01c5530828 --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/managedServerSecurityAlertPolicy.js @@ -0,0 +1,162 @@ +/* + * 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 models = require('./index'); + +/** + * A managed server security alert policy. + * + * @extends models['ProxyResource'] + */ +class ManagedServerSecurityAlertPolicy extends models['ProxyResource'] { + /** + * Create a ManagedServerSecurityAlertPolicy. + * @property {string} state Specifies the state of the policy, whether it is + * enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled' + * @property {array} [disabledAlerts] Specifies an array of alerts that are + * disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, + * Access_Anomaly, Data_Exfiltration, Unsafe_Action + * @property {array} [emailAddresses] Specifies an array of e-mail addresses + * to which the alert is sent. + * @property {boolean} [emailAccountAdmins] Specifies that the alert is sent + * to the account administrators. + * @property {string} [storageEndpoint] Specifies the blob storage endpoint + * (e.g. https://MyAccount.blob.core.windows.net). This blob storage will + * hold all Threat Detection audit logs. + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the Threat Detection audit storage account. + * @property {number} [retentionDays] Specifies the number of days to keep in + * the Threat Detection audit logs. + * @property {date} [creationTime] Specifies the UTC creation time of the + * policy. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ManagedServerSecurityAlertPolicy + * + * @returns {object} metadata of ManagedServerSecurityAlertPolicy + * + */ + mapper() { + return { + required: false, + serializedName: 'ManagedServerSecurityAlertPolicy', + type: { + name: 'Composite', + className: 'ManagedServerSecurityAlertPolicy', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + state: { + required: true, + serializedName: 'properties.state', + type: { + name: 'Enum', + allowedValues: [ 'New', 'Enabled', 'Disabled' ] + } + }, + disabledAlerts: { + required: false, + serializedName: 'properties.disabledAlerts', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + emailAddresses: { + required: false, + serializedName: 'properties.emailAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + emailAccountAdmins: { + required: false, + serializedName: 'properties.emailAccountAdmins', + type: { + name: 'Boolean' + } + }, + storageEndpoint: { + required: false, + serializedName: 'properties.storageEndpoint', + type: { + name: 'String' + } + }, + storageAccountAccessKey: { + required: false, + serializedName: 'properties.storageAccountAccessKey', + type: { + name: 'String' + } + }, + retentionDays: { + required: false, + serializedName: 'properties.retentionDays', + type: { + name: 'Number' + } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = ManagedServerSecurityAlertPolicy; diff --git a/lib/services/sqlManagement2/lib/models/maxSizeCapability.js b/lib/services/sqlManagement2/lib/models/maxSizeCapability.js index 14fe8dc472..35fc65f118 100644 --- a/lib/services/sqlManagement2/lib/models/maxSizeCapability.js +++ b/lib/services/sqlManagement2/lib/models/maxSizeCapability.js @@ -17,10 +17,11 @@ class MaxSizeCapability { /** * Create a MaxSizeCapability. - * @member {number} [limit] The maximum size limit (see 'unit' for the + * @property {number} [limit] The maximum size limit (see 'unit' for the * units). - * @member {string} [unit] The units that the limit is expressed in. Possible - * values include: 'Megabytes', 'Gigabytes', 'Terabytes', 'Petabytes' + * @property {string} [unit] The units that the limit is expressed in. + * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', + * 'Petabytes' */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/maxSizeRangeCapability.js b/lib/services/sqlManagement2/lib/models/maxSizeRangeCapability.js index 37aecc9b82..e1598e9b1b 100644 --- a/lib/services/sqlManagement2/lib/models/maxSizeRangeCapability.js +++ b/lib/services/sqlManagement2/lib/models/maxSizeRangeCapability.js @@ -17,34 +17,34 @@ class MaxSizeRangeCapability { /** * Create a MaxSizeRangeCapability. - * @member {object} [minValue] Minimum value. - * @member {number} [minValue.limit] The maximum size limit (see 'unit' for + * @property {object} [minValue] Minimum value. + * @property {number} [minValue.limit] The maximum size limit (see 'unit' for * the units). - * @member {string} [minValue.unit] The units that the limit is expressed in. - * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', + * @property {string} [minValue.unit] The units that the limit is expressed + * in. Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', * 'Petabytes' - * @member {object} [maxValue] Maximum value. - * @member {number} [maxValue.limit] The maximum size limit (see 'unit' for + * @property {object} [maxValue] Maximum value. + * @property {number} [maxValue.limit] The maximum size limit (see 'unit' for * the units). - * @member {string} [maxValue.unit] The units that the limit is expressed in. - * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', + * @property {string} [maxValue.unit] The units that the limit is expressed + * in. Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', * 'Petabytes' - * @member {object} [scaleSize] Scale/step size for discrete values between + * @property {object} [scaleSize] Scale/step size for discrete values between * the minimum value and the maximum value. - * @member {number} [scaleSize.limit] The maximum size limit (see 'unit' for - * the units). - * @member {string} [scaleSize.unit] The units that the limit is expressed + * @property {number} [scaleSize.limit] The maximum size limit (see 'unit' + * for the units). + * @property {string} [scaleSize.unit] The units that the limit is expressed * in. Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', * 'Petabytes' - * @member {object} [logSize] Size of transaction log. - * @member {number} [logSize.limit] The log size limit (see 'unit' for the + * @property {object} [logSize] Size of transaction log. + * @property {number} [logSize.limit] The log size limit (see 'unit' for the * units). - * @member {string} [logSize.unit] The units that the limit is expressed in. - * Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', + * @property {string} [logSize.unit] The units that the limit is expressed + * in. Possible values include: 'Megabytes', 'Gigabytes', 'Terabytes', * 'Petabytes', 'Percent' - * @member {string} [status] The status of the capability. Possible values + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/metric.js b/lib/services/sqlManagement2/lib/models/metric.js index 923087500d..9a907da2c8 100644 --- a/lib/services/sqlManagement2/lib/models/metric.js +++ b/lib/services/sqlManagement2/lib/models/metric.js @@ -17,18 +17,18 @@ class Metric { /** * Create a Metric. - * @member {date} [startTime] The start time for the metric (ISO-8601 + * @property {date} [startTime] The start time for the metric (ISO-8601 * format). - * @member {date} [endTime] The end time for the metric (ISO-8601 format). - * @member {string} [timeGrain] The time step to be used to summarize the + * @property {date} [endTime] The end time for the metric (ISO-8601 format). + * @property {string} [timeGrain] The time step to be used to summarize the * metric values. - * @member {string} [unit] The unit of the metric. Possible values include: + * @property {string} [unit] The unit of the metric. Possible values include: * 'count', 'bytes', 'seconds', 'percent', 'countPerSecond', 'bytesPerSecond' - * @member {object} [name] The name information for the metric. - * @member {string} [name.value] The name of the database metric. - * @member {string} [name.localizedValue] The friendly name of the database + * @property {object} [name] The name information for the metric. + * @property {string} [name.value] The name of the database metric. + * @property {string} [name.localizedValue] The friendly name of the database * metric. - * @member {array} [metricValues] The metric values for the specified time + * @property {array} [metricValues] The metric values for the specified time * window and timestep. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/metricAvailability.js b/lib/services/sqlManagement2/lib/models/metricAvailability.js index 76a4bbdbba..7c2d77d740 100644 --- a/lib/services/sqlManagement2/lib/models/metricAvailability.js +++ b/lib/services/sqlManagement2/lib/models/metricAvailability.js @@ -17,9 +17,9 @@ class MetricAvailability { /** * Create a MetricAvailability. - * @member {string} [retention] The length of retention for the database + * @property {string} [retention] The length of retention for the database * metric. - * @member {string} [timeGrain] The granularity of the database metric. + * @property {string} [timeGrain] The granularity of the database metric. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/metricDefinition.js b/lib/services/sqlManagement2/lib/models/metricDefinition.js index e71bb4cd29..f01615d958 100644 --- a/lib/services/sqlManagement2/lib/models/metricDefinition.js +++ b/lib/services/sqlManagement2/lib/models/metricDefinition.js @@ -17,18 +17,18 @@ class MetricDefinition { /** * Create a MetricDefinition. - * @member {object} [name] The name information for the metric. - * @member {string} [name.value] The name of the database metric. - * @member {string} [name.localizedValue] The friendly name of the database + * @property {object} [name] The name information for the metric. + * @property {string} [name.value] The name of the database metric. + * @property {string} [name.localizedValue] The friendly name of the database * metric. - * @member {string} [primaryAggregationType] The primary aggregation type + * @property {string} [primaryAggregationType] The primary aggregation type * defining how metric values are displayed. Possible values include: 'None', * 'Average', 'Count', 'Minimum', 'Maximum', 'Total' - * @member {string} [resourceUri] The resource uri of the database. - * @member {string} [unit] The unit of the metric. Possible values include: + * @property {string} [resourceUri] The resource uri of the database. + * @property {string} [unit] The unit of the metric. Possible values include: * 'Count', 'Bytes', 'Seconds', 'Percent', 'CountPerSecond', 'BytesPerSecond' - * @member {array} [metricAvailabilities] The list of database metric - * availabities for the metric. + * @property {array} [metricAvailabilities] The list of database metric + * availabilities for the metric. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/metricName.js b/lib/services/sqlManagement2/lib/models/metricName.js index 7d726e2782..cf126031e5 100644 --- a/lib/services/sqlManagement2/lib/models/metricName.js +++ b/lib/services/sqlManagement2/lib/models/metricName.js @@ -17,8 +17,8 @@ class MetricName { /** * Create a MetricName. - * @member {string} [value] The name of the database metric. - * @member {string} [localizedValue] The friendly name of the database + * @property {string} [value] The name of the database metric. + * @property {string} [localizedValue] The friendly name of the database * metric. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/metricValue.js b/lib/services/sqlManagement2/lib/models/metricValue.js index 141203e6cf..a2a3a27196 100644 --- a/lib/services/sqlManagement2/lib/models/metricValue.js +++ b/lib/services/sqlManagement2/lib/models/metricValue.js @@ -17,12 +17,12 @@ class MetricValue { /** * Create a MetricValue. - * @member {number} [count] The number of values for the metric. - * @member {number} [average] The average value of the metric. - * @member {number} [maximum] The max value of the metric. - * @member {number} [minimum] The min value of the metric. - * @member {date} [timestamp] The metric timestamp (ISO-8601 format). - * @member {number} [total] The total value of the metric. + * @property {number} [count] The number of values for the metric. + * @property {number} [average] The average value of the metric. + * @property {number} [maximum] The max value of the metric. + * @property {number} [minimum] The min value of the metric. + * @property {date} [timestamp] The metric timestamp (ISO-8601 format). + * @property {number} [total] The total value of the metric. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/operation.js b/lib/services/sqlManagement2/lib/models/operation.js index 8886037343..9f2a00e1af 100644 --- a/lib/services/sqlManagement2/lib/models/operation.js +++ b/lib/services/sqlManagement2/lib/models/operation.js @@ -17,21 +17,21 @@ class Operation { /** * Create a Operation. - * @member {string} [name] The name of the operation being performed on this - * particular object. - * @member {object} [display] The localized display information for this + * @property {string} [name] The name of the operation being performed on + * this particular object. + * @property {object} [display] The localized display information for this * particular operation / action. - * @member {string} [display.provider] The localized friendly form of the + * @property {string} [display.provider] The localized friendly form of the * resource provider name. - * @member {string} [display.resource] The localized friendly form of the + * @property {string} [display.resource] The localized friendly form of the * resource type related to this action/operation. - * @member {string} [display.operation] The localized friendly name for the + * @property {string} [display.operation] The localized friendly name for the * operation. - * @member {string} [display.description] The localized friendly description - * for the operation. - * @member {string} [origin] The intended executor of the operation. Possible - * values include: 'user', 'system' - * @member {object} [properties] Additional descriptions for the operation. + * @property {string} [display.description] The localized friendly + * description for the operation. + * @property {string} [origin] The intended executor of the operation. + * Possible values include: 'user', 'system' + * @property {object} [properties] Additional descriptions for the operation. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/operationDisplay.js b/lib/services/sqlManagement2/lib/models/operationDisplay.js index 905da4b50c..8ed41f761d 100644 --- a/lib/services/sqlManagement2/lib/models/operationDisplay.js +++ b/lib/services/sqlManagement2/lib/models/operationDisplay.js @@ -17,14 +17,14 @@ class OperationDisplay { /** * Create a OperationDisplay. - * @member {string} [provider] The localized friendly form of the resource + * @property {string} [provider] The localized friendly form of the resource * provider name. - * @member {string} [resource] The localized friendly form of the resource + * @property {string} [resource] The localized friendly form of the resource * type related to this action/operation. - * @member {string} [operation] The localized friendly name for the - * operation. - * @member {string} [description] The localized friendly description for the + * @property {string} [operation] The localized friendly name for the * operation. + * @property {string} [description] The localized friendly description for + * the operation. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/operationImpact.js b/lib/services/sqlManagement2/lib/models/operationImpact.js index 13f85545e9..7c6811cb2d 100644 --- a/lib/services/sqlManagement2/lib/models/operationImpact.js +++ b/lib/services/sqlManagement2/lib/models/operationImpact.js @@ -17,11 +17,11 @@ class OperationImpact { /** * Create a OperationImpact. - * @member {string} [name] The name of the impact dimension. - * @member {string} [unit] The unit in which estimated impact to dimension is - * measured. - * @member {number} [changeValueAbsolute] The absolute impact to dimension. - * @member {number} [changeValueRelative] The relative impact to dimension + * @property {string} [name] The name of the impact dimension. + * @property {string} [unit] The unit in which estimated impact to dimension + * is measured. + * @property {number} [changeValueAbsolute] The absolute impact to dimension. + * @property {number} [changeValueRelative] The relative impact to dimension * (null if not applicable) */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/operationListResult.js b/lib/services/sqlManagement2/lib/models/operationListResult.js index b822f6c79d..a6179c8d07 100644 --- a/lib/services/sqlManagement2/lib/models/operationListResult.js +++ b/lib/services/sqlManagement2/lib/models/operationListResult.js @@ -16,7 +16,7 @@ class OperationListResult extends Array { /** * Create a OperationListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/partnerInfo.js b/lib/services/sqlManagement2/lib/models/partnerInfo.js index 17f9aa74f3..9158ff515a 100644 --- a/lib/services/sqlManagement2/lib/models/partnerInfo.js +++ b/lib/services/sqlManagement2/lib/models/partnerInfo.js @@ -17,10 +17,10 @@ class PartnerInfo { /** * Create a PartnerInfo. - * @member {string} id Resource identifier of the partner server. - * @member {string} [location] Geo location of the partner server. - * @member {string} [replicationRole] Replication role of the partner server. - * Possible values include: 'Primary', 'Secondary' + * @property {string} id Resource identifier of the partner server. + * @property {string} [location] Geo location of the partner server. + * @property {string} [replicationRole] Replication role of the partner + * server. Possible values include: 'Primary', 'Secondary' */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/partnerRegionInfo.js b/lib/services/sqlManagement2/lib/models/partnerRegionInfo.js index dc0b958260..a2f166b047 100644 --- a/lib/services/sqlManagement2/lib/models/partnerRegionInfo.js +++ b/lib/services/sqlManagement2/lib/models/partnerRegionInfo.js @@ -17,9 +17,10 @@ class PartnerRegionInfo { /** * Create a PartnerRegionInfo. - * @member {string} [location] Geo location of the partner managed instances. - * @member {string} [replicationRole] Replication role of the partner managed - * instances. Possible values include: 'Primary', 'Secondary' + * @property {string} [location] Geo location of the partner managed + * instances. + * @property {string} [replicationRole] Replication role of the partner + * managed instances. Possible values include: 'Primary', 'Secondary' */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/performanceLevelCapability.js b/lib/services/sqlManagement2/lib/models/performanceLevelCapability.js index 236196e0d3..7b99f97e14 100644 --- a/lib/services/sqlManagement2/lib/models/performanceLevelCapability.js +++ b/lib/services/sqlManagement2/lib/models/performanceLevelCapability.js @@ -17,8 +17,8 @@ class PerformanceLevelCapability { /** * Create a PerformanceLevelCapability. - * @member {number} [value] Performance level value. - * @member {string} [unit] Unit type used to measure performance level. + * @property {number} [value] Performance level value. + * @property {string} [unit] Unit type used to measure performance level. * Possible values include: 'DTU', 'VCores' */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/recommendedElasticPool.js b/lib/services/sqlManagement2/lib/models/recommendedElasticPool.js index dd8c75d9c7..a4d6db7416 100644 --- a/lib/services/sqlManagement2/lib/models/recommendedElasticPool.js +++ b/lib/services/sqlManagement2/lib/models/recommendedElasticPool.js @@ -13,30 +13,30 @@ const models = require('./index'); /** - * Represents a recommented elastic pool. + * Represents a recommended elastic pool. * * @extends models['ProxyResource'] */ class RecommendedElasticPool extends models['ProxyResource'] { /** * Create a RecommendedElasticPool. - * @member {string} [databaseEdition] The edition of the recommended elastic - * pool. The ElasticPoolEdition enumeration contains all the valid editions. - * Possible values include: 'Basic', 'Standard', 'Premium' - * @member {number} [dtu] The DTU for the recommended elastic pool. - * @member {number} [databaseDtuMin] The minimum DTU for the database. - * @member {number} [databaseDtuMax] The maximum DTU for the database. - * @member {number} [storageMB] Gets storage size in megabytes. - * @member {date} [observationPeriodStart] The observation period start + * @property {string} [databaseEdition] The edition of the recommended + * elastic pool. The ElasticPoolEdition enumeration contains all the valid + * editions. Possible values include: 'Basic', 'Standard', 'Premium' + * @property {number} [dtu] The DTU for the recommended elastic pool. + * @property {number} [databaseDtuMin] The minimum DTU for the database. + * @property {number} [databaseDtuMax] The maximum DTU for the database. + * @property {number} [storageMB] Gets storage size in megabytes. + * @property {date} [observationPeriodStart] The observation period start * (ISO8601 format). - * @member {date} [observationPeriodEnd] The observation period start + * @property {date} [observationPeriodEnd] The observation period start * (ISO8601 format). - * @member {number} [maxObservedDtu] Gets maximum observed DTU. - * @member {number} [maxObservedStorageMB] Gets maximum observed storage in + * @property {number} [maxObservedDtu] Gets maximum observed DTU. + * @property {number} [maxObservedStorageMB] Gets maximum observed storage in * megabytes. - * @member {array} [databases] The list of databases in this pool. Expanded + * @property {array} [databases] The list of databases in this pool. Expanded * property - * @member {array} [metrics] The list of databases housed in the server. + * @property {array} [metrics] The list of databases housed in the server. * Expanded property */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/recommendedElasticPoolMetric.js b/lib/services/sqlManagement2/lib/models/recommendedElasticPoolMetric.js index f4fc839305..5d8ac43dff 100644 --- a/lib/services/sqlManagement2/lib/models/recommendedElasticPoolMetric.js +++ b/lib/services/sqlManagement2/lib/models/recommendedElasticPoolMetric.js @@ -17,11 +17,11 @@ class RecommendedElasticPoolMetric { /** * Create a RecommendedElasticPoolMetric. - * @member {date} [dateTime] The time of metric (ISO8601 format). - * @member {number} [dtu] Gets or sets the DTUs (Database Transaction Units). - * See + * @property {date} [dateTime] The time of metric (ISO8601 format). + * @property {number} [dtu] Gets or sets the DTUs (Database Transaction + * Units). See * https://azure.microsoft.com/documentation/articles/sql-database-what-is-a-dtu/ - * @member {number} [sizeGB] Gets or sets size in gigabytes. + * @property {number} [sizeGB] Gets or sets size in gigabytes. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/recommendedIndex.js b/lib/services/sqlManagement2/lib/models/recommendedIndex.js index 3f53c9a38d..a2348a38fc 100644 --- a/lib/services/sqlManagement2/lib/models/recommendedIndex.js +++ b/lib/services/sqlManagement2/lib/models/recommendedIndex.js @@ -20,31 +20,32 @@ const models = require('./index'); class RecommendedIndex extends models['ProxyResource'] { /** * Create a RecommendedIndex. - * @member {string} [action] The proposed index action. You can create a + * @property {string} [action] The proposed index action. You can create a * missing index, drop an unused index, or rebuild an existing index to * improve its performance. Possible values include: 'Create', 'Drop', * 'Rebuild' - * @member {string} [state] The current recommendation state. Possible values - * include: 'Active', 'Pending', 'Executing', 'Verifying', 'Pending Revert', - * 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', 'Success' - * @member {date} [created] The UTC datetime showing when this resource was + * @property {string} [state] The current recommendation state. Possible + * values include: 'Active', 'Pending', 'Executing', 'Verifying', 'Pending + * Revert', 'Reverting', 'Reverted', 'Ignored', 'Expired', 'Blocked', + * 'Success' + * @property {date} [created] The UTC datetime showing when this resource was * created (ISO8601 format). - * @member {date} [lastModified] The UTC datetime of when was this resource + * @property {date} [lastModified] The UTC datetime of when was this resource * last changed (ISO8601 format). - * @member {string} [indexType] The type of index (CLUSTERED, NONCLUSTERED, + * @property {string} [indexType] The type of index (CLUSTERED, NONCLUSTERED, * COLUMNSTORE, CLUSTERED COLUMNSTORE). Possible values include: 'CLUSTERED', * 'NONCLUSTERED', 'COLUMNSTORE', 'CLUSTERED COLUMNSTORE' - * @member {string} [schema] The schema where table to build index over + * @property {string} [schema] The schema where table to build index over * resides - * @member {string} [table] The table on which to build index. - * @member {array} [columns] Columns over which to build index - * @member {array} [includedColumns] The list of column names to be included - * in the index - * @member {string} [indexScript] The full build index script - * @member {array} [estimatedImpact] The estimated impact of doing + * @property {string} [table] The table on which to build index. + * @property {array} [columns] Columns over which to build index + * @property {array} [includedColumns] The list of column names to be + * included in the index + * @property {string} [indexScript] The full build index script + * @property {array} [estimatedImpact] The estimated impact of doing * recommended index action. - * @member {array} [reportedImpact] The values reported after index action is - * complete. + * @property {array} [reportedImpact] The values reported after index action + * is complete. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/recoverableDatabase.js b/lib/services/sqlManagement2/lib/models/recoverableDatabase.js index 0f9cb2af1f..4a5d371091 100644 --- a/lib/services/sqlManagement2/lib/models/recoverableDatabase.js +++ b/lib/services/sqlManagement2/lib/models/recoverableDatabase.js @@ -20,12 +20,12 @@ const models = require('./index'); class RecoverableDatabase extends models['ProxyResource'] { /** * Create a RecoverableDatabase. - * @member {string} [edition] The edition of the database - * @member {string} [serviceLevelObjective] The service level objective name - * of the database - * @member {string} [elasticPoolName] The elastic pool name of the database - * @member {date} [lastAvailableBackupDate] The last available backup date of - * the database (ISO8601 format) + * @property {string} [edition] The edition of the database + * @property {string} [serviceLevelObjective] The service level objective + * name of the database + * @property {string} [elasticPoolName] The elastic pool name of the database + * @property {date} [lastAvailableBackupDate] The last available backup date + * of the database (ISO8601 format) */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/recoverableManagedDatabase.js b/lib/services/sqlManagement2/lib/models/recoverableManagedDatabase.js new file mode 100644 index 0000000000..42fda76f71 --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/recoverableManagedDatabase.js @@ -0,0 +1,82 @@ +/* + * 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 models = require('./index'); + +/** + * A recoverable managed database resource. + * + * @extends models['ProxyResource'] + */ +class RecoverableManagedDatabase extends models['ProxyResource'] { + /** + * Create a RecoverableManagedDatabase. + * @property {string} [lastAvailableBackupDate] The last available backup + * date. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of RecoverableManagedDatabase + * + * @returns {object} metadata of RecoverableManagedDatabase + * + */ + mapper() { + return { + required: false, + serializedName: 'RecoverableManagedDatabase', + type: { + name: 'Composite', + className: 'RecoverableManagedDatabase', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + lastAvailableBackupDate: { + required: false, + readOnly: true, + serializedName: 'properties.lastAvailableBackupDate', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RecoverableManagedDatabase; diff --git a/lib/services/sqlManagement2/lib/models/recoverableManagedDatabaseListResult.js b/lib/services/sqlManagement2/lib/models/recoverableManagedDatabaseListResult.js new file mode 100644 index 0000000000..5a3d20e65d --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/recoverableManagedDatabaseListResult.js @@ -0,0 +1,69 @@ +/* + * 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'; + +/** + * A list of recoverable managed databases. + */ +class RecoverableManagedDatabaseListResult extends Array { + /** + * Create a RecoverableManagedDatabaseListResult. + * @property {string} [nextLink] Link to retrieve next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of RecoverableManagedDatabaseListResult + * + * @returns {object} metadata of RecoverableManagedDatabaseListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'RecoverableManagedDatabaseListResult', + type: { + name: 'Composite', + className: 'RecoverableManagedDatabaseListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RecoverableManagedDatabaseElementType', + type: { + name: 'Composite', + className: 'RecoverableManagedDatabase' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RecoverableManagedDatabaseListResult; diff --git a/lib/services/sqlManagement2/lib/models/replicationLink.js b/lib/services/sqlManagement2/lib/models/replicationLink.js index a83f1ac876..eb1a29c897 100644 --- a/lib/services/sqlManagement2/lib/models/replicationLink.js +++ b/lib/services/sqlManagement2/lib/models/replicationLink.js @@ -20,27 +20,27 @@ const models = require('./index'); class ReplicationLink extends models['ProxyResource'] { /** * Create a ReplicationLink. - * @member {string} [location] Location of the server that contains this + * @property {string} [location] Location of the server that contains this * firewall rule. - * @member {boolean} [isTerminationAllowed] Legacy value indicating whether + * @property {boolean} [isTerminationAllowed] Legacy value indicating whether * termination is allowed. Currently always returns true. - * @member {string} [replicationMode] Replication mode of this replication + * @property {string} [replicationMode] Replication mode of this replication * link. - * @member {string} [partnerServer] The name of the server hosting the + * @property {string} [partnerServer] The name of the server hosting the * partner database. - * @member {string} [partnerDatabase] The name of the partner database. - * @member {string} [partnerLocation] The Azure Region of the partner + * @property {string} [partnerDatabase] The name of the partner database. + * @property {string} [partnerLocation] The Azure Region of the partner * database. - * @member {string} [role] The role of the database in the replication link. - * Possible values include: 'Primary', 'Secondary', 'NonReadableSecondary', - * 'Source', 'Copy' - * @member {string} [partnerRole] The role of the partner database in the + * @property {string} [role] The role of the database in the replication + * link. Possible values include: 'Primary', 'Secondary', + * 'NonReadableSecondary', 'Source', 'Copy' + * @property {string} [partnerRole] The role of the partner database in the * replication link. Possible values include: 'Primary', 'Secondary', * 'NonReadableSecondary', 'Source', 'Copy' - * @member {date} [startTime] The start time for the replication link. - * @member {number} [percentComplete] The percentage of seeding complete for - * the replication link. - * @member {string} [replicationState] The replication state for the + * @property {date} [startTime] The start time for the replication link. + * @property {number} [percentComplete] The percentage of seeding complete + * for the replication link. + * @property {string} [replicationState] The replication state for the * replication link. Possible values include: 'PENDING', 'SEEDING', * 'CATCH_UP', 'SUSPENDED' */ diff --git a/lib/services/sqlManagement2/lib/models/resource.js b/lib/services/sqlManagement2/lib/models/resource.js index 57088e37e3..9ccac357d1 100644 --- a/lib/services/sqlManagement2/lib/models/resource.js +++ b/lib/services/sqlManagement2/lib/models/resource.js @@ -20,9 +20,9 @@ const models = require('./index'); class Resource extends models['BaseResource'] { /** * Create a Resource. - * @member {string} [id] Resource ID. - * @member {string} [name] Resource name. - * @member {string} [type] Resource type. + * @property {string} [id] Resource ID. + * @property {string} [name] Resource name. + * @property {string} [type] Resource type. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/resourceIdentity.js b/lib/services/sqlManagement2/lib/models/resourceIdentity.js index 7894f19232..7082928fc1 100644 --- a/lib/services/sqlManagement2/lib/models/resourceIdentity.js +++ b/lib/services/sqlManagement2/lib/models/resourceIdentity.js @@ -17,11 +17,11 @@ class ResourceIdentity { /** * Create a ResourceIdentity. - * @member {uuid} [principalId] The Azure Active Directory principal id. - * @member {string} [type] The identity type. Set this to 'SystemAssigned' in - * order to automatically create and assign an Azure Active Directory + * @property {uuid} [principalId] The Azure Active Directory principal id. + * @property {string} [type] The identity type. Set this to 'SystemAssigned' + * in order to automatically create and assign an Azure Active Directory * principal for the resource. Possible values include: 'SystemAssigned' - * @member {uuid} [tenantId] The Azure Active Directory tenant id. + * @property {uuid} [tenantId] The Azure Active Directory tenant id. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/resourceMoveDefinition.js b/lib/services/sqlManagement2/lib/models/resourceMoveDefinition.js index db42dcff0f..52120388c3 100644 --- a/lib/services/sqlManagement2/lib/models/resourceMoveDefinition.js +++ b/lib/services/sqlManagement2/lib/models/resourceMoveDefinition.js @@ -17,7 +17,7 @@ class ResourceMoveDefinition { /** * Create a ResourceMoveDefinition. - * @member {string} id The target ID for the resource + * @property {string} id The target ID for the resource */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/restorableDroppedDatabase.js b/lib/services/sqlManagement2/lib/models/restorableDroppedDatabase.js index e18ed5e402..2103bc1ba3 100644 --- a/lib/services/sqlManagement2/lib/models/restorableDroppedDatabase.js +++ b/lib/services/sqlManagement2/lib/models/restorableDroppedDatabase.js @@ -20,18 +20,18 @@ const models = require('./index'); class RestorableDroppedDatabase extends models['ProxyResource'] { /** * Create a RestorableDroppedDatabase. - * @member {string} [location] The geo-location where the resource lives - * @member {string} [databaseName] The name of the database - * @member {string} [edition] The edition of the database - * @member {string} [maxSizeBytes] The max size in bytes of the database - * @member {string} [serviceLevelObjective] The service level objective name - * of the database - * @member {string} [elasticPoolName] The elastic pool name of the database - * @member {date} [creationDate] The creation date of the database (ISO8601 + * @property {string} [location] The geo-location where the resource lives + * @property {string} [databaseName] The name of the database + * @property {string} [edition] The edition of the database + * @property {string} [maxSizeBytes] The max size in bytes of the database + * @property {string} [serviceLevelObjective] The service level objective + * name of the database + * @property {string} [elasticPoolName] The elastic pool name of the database + * @property {date} [creationDate] The creation date of the database (ISO8601 * format) - * @member {date} [deletionDate] The deletion date of the database (ISO8601 + * @property {date} [deletionDate] The deletion date of the database (ISO8601 * format) - * @member {date} [earliestRestoreDate] The earliest restore date of the + * @property {date} [earliestRestoreDate] The earliest restore date of the * database (ISO8601 format) */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/restorableDroppedManagedDatabase.js b/lib/services/sqlManagement2/lib/models/restorableDroppedManagedDatabase.js new file mode 100644 index 0000000000..695502b4b9 --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/restorableDroppedManagedDatabase.js @@ -0,0 +1,132 @@ +/* + * 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 models = require('./index'); + +/** + * A restorable dropped managed database resource. + * + * @extends models['TrackedResource'] + */ +class RestorableDroppedManagedDatabase extends models['TrackedResource'] { + /** + * Create a RestorableDroppedManagedDatabase. + * @property {string} [databaseName] The name of the database. + * @property {date} [creationDate] The creation date of the database (ISO8601 + * format). + * @property {date} [deletionDate] The deletion date of the database (ISO8601 + * format). + * @property {date} [earliestRestoreDate] The earliest restore date of the + * database (ISO8601 format). + */ + constructor() { + super(); + } + + /** + * Defines the metadata of RestorableDroppedManagedDatabase + * + * @returns {object} metadata of RestorableDroppedManagedDatabase + * + */ + mapper() { + return { + required: false, + serializedName: 'RestorableDroppedManagedDatabase', + type: { + name: 'Composite', + className: 'RestorableDroppedManagedDatabase', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + databaseName: { + required: false, + readOnly: true, + serializedName: 'properties.databaseName', + type: { + name: 'String' + } + }, + creationDate: { + required: false, + readOnly: true, + serializedName: 'properties.creationDate', + type: { + name: 'DateTime' + } + }, + deletionDate: { + required: false, + readOnly: true, + serializedName: 'properties.deletionDate', + type: { + name: 'DateTime' + } + }, + earliestRestoreDate: { + required: false, + readOnly: true, + serializedName: 'properties.earliestRestoreDate', + type: { + name: 'DateTime' + } + } + } + } + }; + } +} + +module.exports = RestorableDroppedManagedDatabase; diff --git a/lib/services/sqlManagement2/lib/models/restorableDroppedManagedDatabaseListResult.js b/lib/services/sqlManagement2/lib/models/restorableDroppedManagedDatabaseListResult.js new file mode 100644 index 0000000000..ef25bc0af7 --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/restorableDroppedManagedDatabaseListResult.js @@ -0,0 +1,69 @@ +/* + * 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'; + +/** + * A list of restorable dropped managed databases. + */ +class RestorableDroppedManagedDatabaseListResult extends Array { + /** + * Create a RestorableDroppedManagedDatabaseListResult. + * @property {string} [nextLink] Link to retrieve next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of RestorableDroppedManagedDatabaseListResult + * + * @returns {object} metadata of RestorableDroppedManagedDatabaseListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'RestorableDroppedManagedDatabaseListResult', + type: { + name: 'Composite', + className: 'RestorableDroppedManagedDatabaseListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'RestorableDroppedManagedDatabaseElementType', + type: { + name: 'Composite', + className: 'RestorableDroppedManagedDatabase' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = RestorableDroppedManagedDatabaseListResult; diff --git a/lib/services/sqlManagement2/lib/models/restorePoint.js b/lib/services/sqlManagement2/lib/models/restorePoint.js index 0765e34c30..aceb71deb9 100644 --- a/lib/services/sqlManagement2/lib/models/restorePoint.js +++ b/lib/services/sqlManagement2/lib/models/restorePoint.js @@ -20,14 +20,14 @@ const models = require('./index'); class RestorePoint extends models['ProxyResource'] { /** * Create a RestorePoint. - * @member {string} [location] Resource location. - * @member {string} [restorePointType] The type of restore point. Possible + * @property {string} [location] Resource location. + * @property {string} [restorePointType] The type of restore point. Possible * values include: 'CONTINUOUS', 'DISCRETE' - * @member {date} [earliestRestoreDate] The earliest time to which this + * @property {date} [earliestRestoreDate] The earliest time to which this * database can be restored - * @member {date} [restorePointCreationDate] The time the backup was taken - * @member {string} [restorePointLabel] The label of restore point for backup - * request by user + * @property {date} [restorePointCreationDate] The time the backup was taken + * @property {string} [restorePointLabel] The label of restore point for + * backup request by user */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/restorePointListResult.js b/lib/services/sqlManagement2/lib/models/restorePointListResult.js index e89c1079ba..977c36c63f 100644 --- a/lib/services/sqlManagement2/lib/models/restorePointListResult.js +++ b/lib/services/sqlManagement2/lib/models/restorePointListResult.js @@ -11,12 +11,12 @@ 'use strict'; /** - * A list of long term retention bacukps. + * A list of long term retention backups. */ class RestorePointListResult extends Array { /** * Create a RestorePointListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/sensitivityLabel.js b/lib/services/sqlManagement2/lib/models/sensitivityLabel.js index 935d580335..5cca24aba4 100644 --- a/lib/services/sqlManagement2/lib/models/sensitivityLabel.js +++ b/lib/services/sqlManagement2/lib/models/sensitivityLabel.js @@ -20,8 +20,10 @@ const models = require('./index'); class SensitivityLabel extends models['ProxyResource'] { /** * Create a SensitivityLabel. - * @member {string} [labelName] The label name. - * @member {string} [informationType] The information type. + * @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. */ constructor() { super(); @@ -72,12 +74,26 @@ class SensitivityLabel extends models['ProxyResource'] { name: 'String' } }, + labelId: { + required: false, + serializedName: 'properties.labelId', + type: { + name: 'String' + } + }, informationType: { required: false, serializedName: 'properties.informationType', type: { name: 'String' } + }, + informationTypeId: { + required: false, + serializedName: 'properties.informationTypeId', + type: { + name: 'String' + } } } } diff --git a/lib/services/sqlManagement2/lib/models/sensitivityLabelListResult.js b/lib/services/sqlManagement2/lib/models/sensitivityLabelListResult.js index ab47324930..25a6b1528c 100644 --- a/lib/services/sqlManagement2/lib/models/sensitivityLabelListResult.js +++ b/lib/services/sqlManagement2/lib/models/sensitivityLabelListResult.js @@ -16,7 +16,7 @@ class SensitivityLabelListResult extends Array { /** * Create a SensitivityLabelListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/server.js b/lib/services/sqlManagement2/lib/models/server.js index a382dc4dc7..14c2c6e2cb 100644 --- a/lib/services/sqlManagement2/lib/models/server.js +++ b/lib/services/sqlManagement2/lib/models/server.js @@ -20,24 +20,24 @@ const models = require('./index'); class Server extends models['TrackedResource'] { /** * Create a Server. - * @member {object} [identity] The Azure Active Directory identity of the + * @property {object} [identity] The Azure Active Directory identity of the * server. - * @member {uuid} [identity.principalId] The Azure Active Directory principal - * id. - * @member {string} [identity.type] The identity type. Set this to + * @property {uuid} [identity.principalId] The Azure Active Directory + * principal id. + * @property {string} [identity.type] The identity type. Set this to * 'SystemAssigned' in order to automatically create and assign an Azure * Active Directory principal for the resource. Possible values include: * 'SystemAssigned' - * @member {uuid} [identity.tenantId] The Azure Active Directory tenant id. - * @member {string} [kind] Kind of sql server. This is metadata used for the - * Azure portal experience. - * @member {string} [administratorLogin] Administrator username for the + * @property {uuid} [identity.tenantId] The Azure Active Directory tenant id. + * @property {string} [kind] Kind of sql server. This is metadata used for + * the Azure portal experience. + * @property {string} [administratorLogin] Administrator username for the * server. Once created it cannot be changed. - * @member {string} [administratorLoginPassword] The administrator login + * @property {string} [administratorLoginPassword] The administrator login * password (required for server creation). - * @member {string} [version] The version of the server. - * @member {string} [state] The state of the server. - * @member {string} [fullyQualifiedDomainName] The fully qualified domain + * @property {string} [version] The version of the server. + * @property {string} [state] The state of the server. + * @property {string} [fullyQualifiedDomainName] The fully qualified domain * name of the server. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/serverAutomaticTuning.js b/lib/services/sqlManagement2/lib/models/serverAutomaticTuning.js index 339999b62f..5e9861b536 100644 --- a/lib/services/sqlManagement2/lib/models/serverAutomaticTuning.js +++ b/lib/services/sqlManagement2/lib/models/serverAutomaticTuning.js @@ -20,11 +20,11 @@ const models = require('./index'); class ServerAutomaticTuning extends models['ProxyResource'] { /** * Create a ServerAutomaticTuning. - * @member {string} [desiredState] Automatic tuning desired state. Possible + * @property {string} [desiredState] Automatic tuning desired state. Possible * values include: 'Custom', 'Auto', 'Unspecified' - * @member {string} [actualState] Automatic tuning actual state. Possible + * @property {string} [actualState] Automatic tuning actual state. Possible * values include: 'Custom', 'Auto', 'Unspecified' - * @member {object} [options] Automatic tuning options definition. + * @property {object} [options] Automatic tuning options definition. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/serverAzureADAdministrator.js b/lib/services/sqlManagement2/lib/models/serverAzureADAdministrator.js index 42085b04b8..66a9c2fe7d 100644 --- a/lib/services/sqlManagement2/lib/models/serverAzureADAdministrator.js +++ b/lib/services/sqlManagement2/lib/models/serverAzureADAdministrator.js @@ -20,9 +20,9 @@ const models = require('./index'); class ServerAzureADAdministrator extends models['ProxyResource'] { /** * Create a ServerAzureADAdministrator. - * @member {string} login The server administrator login value. - * @member {uuid} sid The server administrator Sid (Secure ID). - * @member {uuid} tenantId The server Active Directory Administrator tenant + * @property {string} login The server administrator login value. + * @property {uuid} sid The server administrator Sid (Secure ID). + * @property {uuid} tenantId The server Active Directory Administrator tenant * id. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/serverBlobAuditingPolicy.js b/lib/services/sqlManagement2/lib/models/serverBlobAuditingPolicy.js index 0d7fce9d01..876de3aa15 100644 --- a/lib/services/sqlManagement2/lib/models/serverBlobAuditingPolicy.js +++ b/lib/services/sqlManagement2/lib/models/serverBlobAuditingPolicy.js @@ -20,18 +20,18 @@ const models = require('./index'); class ServerBlobAuditingPolicy extends models['ProxyResource'] { /** * Create a ServerBlobAuditingPolicy. - * @member {string} state Specifies the state of the policy. If state is + * @property {string} state Specifies the state of the policy. If state is * Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. * Possible values include: 'Enabled', 'Disabled' - * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * @property {string} [storageEndpoint] Specifies the blob storage endpoint * (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, * storageEndpoint is required. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the auditing storage account. If state is Enabled and storageEndpoint is - * specified, storageAccountAccessKey is required. - * @member {number} [retentionDays] Specifies the number of days to keep in + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the auditing storage account. If state is Enabled and storageEndpoint + * is specified, storageAccountAccessKey is required. + * @property {number} [retentionDays] Specifies the number of days to keep in * the audit logs in the storage account. - * @member {array} [auditActionsAndGroups] Specifies the Actions-Groups and + * @property {array} [auditActionsAndGroups] Specifies the Actions-Groups and * Actions to audit. * * The recommended set of action groups to use is the following combination - @@ -103,11 +103,11 @@ class ServerBlobAuditingPolicy extends models['ProxyResource'] { * * For more information, see [Database-Level Audit * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) - * @member {uuid} [storageAccountSubscriptionId] Specifies the blob storage + * @property {uuid} [storageAccountSubscriptionId] Specifies the blob storage * subscription Id. - * @member {boolean} [isStorageSecondaryKeyInUse] Specifies whether + * @property {boolean} [isStorageSecondaryKeyInUse] Specifies whether * storageAccountAccessKey value is the storage's secondary key. - * @member {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit + * @property {boolean} [isAzureMonitorTargetEnabled] Specifies whether audit * events are sent to Azure Monitor. * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' * and 'IsAzureMonitorTargetEnabled' as true. diff --git a/lib/services/sqlManagement2/lib/models/serverCommunicationLink.js b/lib/services/sqlManagement2/lib/models/serverCommunicationLink.js index b94d324ce4..29abf28b32 100644 --- a/lib/services/sqlManagement2/lib/models/serverCommunicationLink.js +++ b/lib/services/sqlManagement2/lib/models/serverCommunicationLink.js @@ -20,10 +20,10 @@ const models = require('./index'); class ServerCommunicationLink extends models['ProxyResource'] { /** * Create a ServerCommunicationLink. - * @member {string} [state] The state. - * @member {string} partnerServer The name of the partner server. - * @member {string} [location] Communication link location. - * @member {string} [kind] Communication link kind. This property is used + * @property {string} [state] The state. + * @property {string} partnerServer The name of the partner server. + * @property {string} [location] Communication link location. + * @property {string} [kind] Communication link kind. This property is used * for Azure Portal metadata. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/serverConnectionPolicy.js b/lib/services/sqlManagement2/lib/models/serverConnectionPolicy.js index e0b6358587..e3ca311d25 100644 --- a/lib/services/sqlManagement2/lib/models/serverConnectionPolicy.js +++ b/lib/services/sqlManagement2/lib/models/serverConnectionPolicy.js @@ -20,9 +20,9 @@ const models = require('./index'); class ServerConnectionPolicy extends models['ProxyResource'] { /** * Create a ServerConnectionPolicy. - * @member {string} [kind] Metadata used for the Azure portal experience. - * @member {string} [location] Resource location. - * @member {string} connectionType The server connection type. Possible + * @property {string} [kind] Metadata used for the Azure portal experience. + * @property {string} [location] Resource location. + * @property {string} connectionType The server connection type. Possible * values include: 'Default', 'Proxy', 'Redirect' */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/serverDnsAlias.js b/lib/services/sqlManagement2/lib/models/serverDnsAlias.js index 34d55a5648..374fb36b31 100644 --- a/lib/services/sqlManagement2/lib/models/serverDnsAlias.js +++ b/lib/services/sqlManagement2/lib/models/serverDnsAlias.js @@ -20,7 +20,8 @@ const models = require('./index'); class ServerDnsAlias extends models['ProxyResource'] { /** * Create a ServerDnsAlias. - * @member {string} [azureDnsRecord] The fully qualified DNS record for alias + * @property {string} [azureDnsRecord] The fully qualified DNS record for + * alias */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/serverDnsAliasAcquisition.js b/lib/services/sqlManagement2/lib/models/serverDnsAliasAcquisition.js index 7ea9139af4..541116dad9 100644 --- a/lib/services/sqlManagement2/lib/models/serverDnsAliasAcquisition.js +++ b/lib/services/sqlManagement2/lib/models/serverDnsAliasAcquisition.js @@ -17,7 +17,7 @@ class ServerDnsAliasAcquisition { /** * Create a ServerDnsAliasAcquisition. - * @member {string} [oldServerDnsAliasId] The id of the server alias that + * @property {string} [oldServerDnsAliasId] The id of the server alias that * will be acquired to point to this server instead. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/serverDnsAliasListResult.js b/lib/services/sqlManagement2/lib/models/serverDnsAliasListResult.js index 6d85947ac1..021b864904 100644 --- a/lib/services/sqlManagement2/lib/models/serverDnsAliasListResult.js +++ b/lib/services/sqlManagement2/lib/models/serverDnsAliasListResult.js @@ -16,7 +16,7 @@ class ServerDnsAliasListResult extends Array { /** * Create a ServerDnsAliasListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/serverKey.js b/lib/services/sqlManagement2/lib/models/serverKey.js index a000b99218..71677a16d0 100644 --- a/lib/services/sqlManagement2/lib/models/serverKey.js +++ b/lib/services/sqlManagement2/lib/models/serverKey.js @@ -20,16 +20,16 @@ const models = require('./index'); class ServerKey extends models['ProxyResource'] { /** * Create a ServerKey. - * @member {string} [kind] Kind of encryption protector. This is metadata + * @property {string} [kind] Kind of encryption protector. This is metadata * used for the Azure portal experience. - * @member {string} [location] Resource location. - * @member {string} [subregion] Subregion of the server key. - * @member {string} serverKeyType The server key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', - * 'AzureKeyVault' - * @member {string} [uri] The URI of the server key. - * @member {string} [thumbprint] Thumbprint of the server key. - * @member {date} [creationDate] The server key creation date. + * @property {string} [location] Resource location. + * @property {string} [subregion] Subregion of the server key. + * @property {string} serverKeyType The server key type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' + * @property {string} [uri] The URI of the server key. + * @property {string} [thumbprint] Thumbprint of the server key. + * @property {date} [creationDate] The server key creation date. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/serverKeyListResult.js b/lib/services/sqlManagement2/lib/models/serverKeyListResult.js index ff41b8b899..a3730dcd22 100644 --- a/lib/services/sqlManagement2/lib/models/serverKeyListResult.js +++ b/lib/services/sqlManagement2/lib/models/serverKeyListResult.js @@ -16,7 +16,7 @@ class ServerKeyListResult extends Array { /** * Create a ServerKeyListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/serverListResult.js b/lib/services/sqlManagement2/lib/models/serverListResult.js index ff05820412..f39f3096a6 100644 --- a/lib/services/sqlManagement2/lib/models/serverListResult.js +++ b/lib/services/sqlManagement2/lib/models/serverListResult.js @@ -16,7 +16,7 @@ class ServerListResult extends Array { /** * Create a ServerListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/serverSecurityAlertPolicy.js b/lib/services/sqlManagement2/lib/models/serverSecurityAlertPolicy.js index 51a8322dd0..0ce89477be 100644 --- a/lib/services/sqlManagement2/lib/models/serverSecurityAlertPolicy.js +++ b/lib/services/sqlManagement2/lib/models/serverSecurityAlertPolicy.js @@ -20,22 +20,24 @@ const models = require('./index'); class ServerSecurityAlertPolicy extends models['ProxyResource'] { /** * Create a ServerSecurityAlertPolicy. - * @member {string} state Specifies the state of the policy, whether it is + * @property {string} state Specifies the state of the policy, whether it is * enabled or disabled. Possible values include: 'New', 'Enabled', 'Disabled' - * @member {array} [disabledAlerts] Specifies an array of alerts that are + * @property {array} [disabledAlerts] Specifies an array of alerts that are * disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, * Access_Anomaly, Data_Exfiltration, Unsafe_Action - * @member {array} [emailAddresses] Specifies an array of e-mail addresses to - * which the alert is sent. - * @member {boolean} [emailAccountAdmins] Specifies that the alert is sent to - * the account administrators. - * @member {string} [storageEndpoint] Specifies the blob storage endpoint + * @property {array} [emailAddresses] Specifies an array of e-mail addresses + * to which the alert is sent. + * @property {boolean} [emailAccountAdmins] Specifies that the alert is sent + * to the account administrators. + * @property {string} [storageEndpoint] Specifies the blob storage endpoint * (e.g. https://MyAccount.blob.core.windows.net). This blob storage will * hold all Threat Detection audit logs. - * @member {string} [storageAccountAccessKey] Specifies the identifier key of - * the Threat Detection audit storage account. - * @member {number} [retentionDays] Specifies the number of days to keep in + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the Threat Detection audit storage account. + * @property {number} [retentionDays] Specifies the number of days to keep in * the Threat Detection audit logs. + * @property {date} [creationTime] Specifies the UTC creation time of the + * policy. */ constructor() { super(); @@ -142,6 +144,14 @@ class ServerSecurityAlertPolicy extends models['ProxyResource'] { type: { name: 'Number' } + }, + creationTime: { + required: false, + readOnly: true, + serializedName: 'properties.creationTime', + type: { + name: 'DateTime' + } } } } diff --git a/lib/services/sqlManagement2/lib/models/serverUpdate.js b/lib/services/sqlManagement2/lib/models/serverUpdate.js index f405bc8246..6c06f57f4a 100644 --- a/lib/services/sqlManagement2/lib/models/serverUpdate.js +++ b/lib/services/sqlManagement2/lib/models/serverUpdate.js @@ -17,15 +17,15 @@ class ServerUpdate { /** * Create a ServerUpdate. - * @member {string} [administratorLogin] Administrator username for the + * @property {string} [administratorLogin] Administrator username for the * server. Once created it cannot be changed. - * @member {string} [administratorLoginPassword] The administrator login + * @property {string} [administratorLoginPassword] The administrator login * password (required for server creation). - * @member {string} [version] The version of the server. - * @member {string} [state] The state of the server. - * @member {string} [fullyQualifiedDomainName] The fully qualified domain + * @property {string} [version] The version of the server. + * @property {string} [state] The state of the server. + * @property {string} [fullyQualifiedDomainName] The fully qualified domain * name of the server. - * @member {object} [tags] Resource tags. + * @property {object} [tags] Resource tags. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/serverUsage.js b/lib/services/sqlManagement2/lib/models/serverUsage.js index d03946f298..528b57ae5f 100644 --- a/lib/services/sqlManagement2/lib/models/serverUsage.js +++ b/lib/services/sqlManagement2/lib/models/serverUsage.js @@ -17,14 +17,14 @@ class ServerUsage { /** * Create a ServerUsage. - * @member {string} [name] Name of the server usage metric. - * @member {string} [resourceName] The name of the resource. - * @member {string} [displayName] The metric display name. - * @member {number} [currentValue] The current value of the metric. - * @member {number} [limit] The current limit of the metric. - * @member {string} [unit] The units of the metric. - * @member {date} [nextResetTime] The next reset time for the metric (ISO8601 - * format). + * @property {string} [name] Name of the server usage metric. + * @property {string} [resourceName] The name of the resource. + * @property {string} [displayName] The metric display name. + * @property {number} [currentValue] The current value of the metric. + * @property {number} [limit] The current limit of the metric. + * @property {string} [unit] The units of the metric. + * @property {date} [nextResetTime] The next reset time for the metric + * (ISO8601 format). */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/serverVersionCapability.js b/lib/services/sqlManagement2/lib/models/serverVersionCapability.js index 5fe7e5a592..032602f801 100644 --- a/lib/services/sqlManagement2/lib/models/serverVersionCapability.js +++ b/lib/services/sqlManagement2/lib/models/serverVersionCapability.js @@ -17,14 +17,14 @@ class ServerVersionCapability { /** * Create a ServerVersionCapability. - * @member {string} [name] The server version name. - * @member {array} [supportedEditions] The list of supported database + * @property {string} [name] The server version name. + * @property {array} [supportedEditions] The list of supported database * editions. - * @member {array} [supportedElasticPoolEditions] The list of supported + * @property {array} [supportedElasticPoolEditions] The list of supported * elastic pool editions. - * @member {string} [status] The status of the capability. Possible values + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/serverVulnerabilityAssessment.js b/lib/services/sqlManagement2/lib/models/serverVulnerabilityAssessment.js new file mode 100644 index 0000000000..79b05773c6 --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/serverVulnerabilityAssessment.js @@ -0,0 +1,119 @@ +/* + * 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 models = require('./index'); + +/** + * A server vulnerability assessment. + * + * @extends models['ProxyResource'] + */ +class ServerVulnerabilityAssessment extends models['ProxyResource'] { + /** + * Create a ServerVulnerabilityAssessment. + * @property {string} storageContainerPath A blob storage container path to + * hold the scan results (e.g. + * https://myStorage.blob.core.windows.net/VaScans/). + * @property {string} [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. + * @property {string} [storageAccountAccessKey] Specifies the identifier key + * of the storage account for vulnerability assessment scan results. If + * 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is + * required. + * @property {object} [recurringScans] The recurring scans settings + * @property {boolean} [recurringScans.isEnabled] Recurring scans state. + * @property {boolean} [recurringScans.emailSubscriptionAdmins] Specifies + * that the schedule scan notification will be is sent to the subscription + * administrators. + * @property {array} [recurringScans.emails] Specifies an array of e-mail + * addresses to which the scan notification is sent. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServerVulnerabilityAssessment + * + * @returns {object} metadata of ServerVulnerabilityAssessment + * + */ + mapper() { + return { + required: false, + serializedName: 'ServerVulnerabilityAssessment', + type: { + name: 'Composite', + className: 'ServerVulnerabilityAssessment', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + storageContainerPath: { + required: true, + serializedName: 'properties.storageContainerPath', + type: { + name: 'String' + } + }, + storageContainerSasKey: { + required: false, + serializedName: 'properties.storageContainerSasKey', + type: { + name: 'String' + } + }, + storageAccountAccessKey: { + required: false, + serializedName: 'properties.storageAccountAccessKey', + type: { + name: 'String' + } + }, + recurringScans: { + required: false, + serializedName: 'properties.recurringScans', + type: { + name: 'Composite', + className: 'VulnerabilityAssessmentRecurringScansProperties' + } + } + } + } + }; + } +} + +module.exports = ServerVulnerabilityAssessment; diff --git a/lib/services/sqlManagement2/lib/models/serverVulnerabilityAssessmentListResult.js b/lib/services/sqlManagement2/lib/models/serverVulnerabilityAssessmentListResult.js new file mode 100644 index 0000000000..0d588fb790 --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/serverVulnerabilityAssessmentListResult.js @@ -0,0 +1,69 @@ +/* + * 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'; + +/** + * A list of the server's vulnerability assessments. + */ +class ServerVulnerabilityAssessmentListResult extends Array { + /** + * Create a ServerVulnerabilityAssessmentListResult. + * @property {string} [nextLink] Link to retrieve next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ServerVulnerabilityAssessmentListResult + * + * @returns {object} metadata of ServerVulnerabilityAssessmentListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ServerVulnerabilityAssessmentListResult', + type: { + name: 'Composite', + className: 'ServerVulnerabilityAssessmentListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ServerVulnerabilityAssessmentElementType', + type: { + name: 'Composite', + className: 'ServerVulnerabilityAssessment' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ServerVulnerabilityAssessmentListResult; diff --git a/lib/services/sqlManagement2/lib/models/serviceObjective.js b/lib/services/sqlManagement2/lib/models/serviceObjective.js index b6f69e8394..d2f0a08435 100644 --- a/lib/services/sqlManagement2/lib/models/serviceObjective.js +++ b/lib/services/sqlManagement2/lib/models/serviceObjective.js @@ -20,15 +20,15 @@ const models = require('./index'); class ServiceObjective extends models['ProxyResource'] { /** * Create a ServiceObjective. - * @member {string} [serviceObjectiveName] The name for the service + * @property {string} [serviceObjectiveName] The name for the service * objective. - * @member {boolean} [isDefault] Gets whether the service level objective is - * the default service objective. - * @member {boolean} [isSystem] Gets whether the service level objective is a - * system service objective. - * @member {string} [description] The description for the service level + * @property {boolean} [isDefault] Gets whether the service level objective + * is the default service objective. + * @property {boolean} [isSystem] Gets whether the service level objective is + * a system service objective. + * @property {string} [description] The description for the service level * objective. - * @member {boolean} [enabled] Gets whether the service level objective is + * @property {boolean} [enabled] Gets whether the service level objective is * enabled. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/serviceObjectiveCapability.js b/lib/services/sqlManagement2/lib/models/serviceObjectiveCapability.js index 1d3ce05b55..94c0be3420 100644 --- a/lib/services/sqlManagement2/lib/models/serviceObjectiveCapability.js +++ b/lib/services/sqlManagement2/lib/models/serviceObjectiveCapability.js @@ -17,38 +17,38 @@ class ServiceObjectiveCapability { /** * Create a ServiceObjectiveCapability. - * @member {uuid} [id] The unique ID of the service objective. - * @member {string} [name] The service objective name. - * @member {array} [supportedMaxSizes] The list of supported maximum database - * sizes. - * @member {object} [performanceLevel] The performance level. - * @member {number} [performanceLevel.value] Performance level value. - * @member {string} [performanceLevel.unit] Unit type used to measure + * @property {uuid} [id] The unique ID of the service objective. + * @property {string} [name] The service objective name. + * @property {array} [supportedMaxSizes] The list of supported maximum + * database sizes. + * @property {object} [performanceLevel] The performance level. + * @property {number} [performanceLevel.value] Performance level value. + * @property {string} [performanceLevel.unit] Unit type used to measure * performance level. Possible values include: 'DTU', 'VCores' - * @member {object} [sku] The sku. - * @member {string} [sku.name] The name of the SKU. Ex - P3. It is typically - * a letter+number code - * @member {string} [sku.tier] This field is required to be implemented by + * @property {object} [sku] The sku. + * @property {string} [sku.name] The name of the SKU. Ex - P3. It is + * typically a letter+number code + * @property {string} [sku.tier] This field is required to be implemented by * the Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [sku.size] The SKU size. When the name field is the + * @property {string} [sku.size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [sku.family] If the service has different generations of - * hardware, for the same SKU, then that can be captured here. - * @member {number} [sku.capacity] If the SKU supports scale out/in then the - * capacity integer should be included. If scale out/in is not possible for - * the resource this may be omitted. - * @member {array} [supportedLicenseTypes] List of supported license types. - * @member {object} [includedMaxSize] The included (free) max size. - * @member {number} [includedMaxSize.limit] The maximum size limit (see + * @property {string} [sku.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * @property {number} [sku.capacity] If the SKU supports scale out/in then + * the capacity integer should be included. If scale out/in is not possible + * for the resource this may be omitted. + * @property {array} [supportedLicenseTypes] List of supported license types. + * @property {object} [includedMaxSize] The included (free) max size. + * @property {number} [includedMaxSize.limit] The maximum size limit (see * 'unit' for the units). - * @member {string} [includedMaxSize.unit] The units that the limit is + * @property {string} [includedMaxSize.unit] The units that the limit is * expressed in. Possible values include: 'Megabytes', 'Gigabytes', * 'Terabytes', 'Petabytes' - * @member {string} [status] The status of the capability. Possible values + * @property {string} [status] The status of the capability. Possible values * include: 'Visible', 'Available', 'Default', 'Disabled' - * @member {string} [reason] The reason for the capability not being + * @property {string} [reason] The reason for the capability not being * available. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/serviceTierAdvisor.js b/lib/services/sqlManagement2/lib/models/serviceTierAdvisor.js index e2aa7fbb1c..a36ae56b6f 100644 --- a/lib/services/sqlManagement2/lib/models/serviceTierAdvisor.js +++ b/lib/services/sqlManagement2/lib/models/serviceTierAdvisor.js @@ -20,46 +20,47 @@ const models = require('./index'); class ServiceTierAdvisor extends models['ProxyResource'] { /** * Create a ServiceTierAdvisor. - * @member {date} [observationPeriodStart] The observation period start + * @property {date} [observationPeriodStart] The observation period start * (ISO8601 format). - * @member {date} [observationPeriodEnd] The observation period start + * @property {date} [observationPeriodEnd] The observation period start * (ISO8601 format). - * @member {number} [activeTimeRatio] The activeTimeRatio for service tier + * @property {number} [activeTimeRatio] The activeTimeRatio for service tier * advisor. - * @member {number} [minDtu] Gets or sets minDtu for service tier advisor. - * @member {number} [avgDtu] Gets or sets avgDtu for service tier advisor. - * @member {number} [maxDtu] Gets or sets maxDtu for service tier advisor. - * @member {number} [maxSizeInGB] Gets or sets maxSizeInGB for service tier + * @property {number} [minDtu] Gets or sets minDtu for service tier advisor. + * @property {number} [avgDtu] Gets or sets avgDtu for service tier advisor. + * @property {number} [maxDtu] Gets or sets maxDtu for service tier advisor. + * @property {number} [maxSizeInGB] Gets or sets maxSizeInGB for service tier * advisor. - * @member {array} [serviceLevelObjectiveUsageMetrics] Gets or sets + * @property {array} [serviceLevelObjectiveUsageMetrics] Gets or sets * serviceLevelObjectiveUsageMetrics for the service tier advisor. - * @member {string} [currentServiceLevelObjective] Gets or sets + * @property {string} [currentServiceLevelObjective] Gets or sets * currentServiceLevelObjective for service tier advisor. - * @member {uuid} [currentServiceLevelObjectiveId] Gets or sets + * @property {uuid} [currentServiceLevelObjectiveId] Gets or sets * currentServiceLevelObjectiveId for service tier advisor. - * @member {string} [usageBasedRecommendationServiceLevelObjective] Gets or + * @property {string} [usageBasedRecommendationServiceLevelObjective] Gets or * sets usageBasedRecommendationServiceLevelObjective for service tier * advisor. - * @member {uuid} [usageBasedRecommendationServiceLevelObjectiveId] Gets or + * @property {uuid} [usageBasedRecommendationServiceLevelObjectiveId] Gets or * sets usageBasedRecommendationServiceLevelObjectiveId for service tier * advisor. - * @member {string} [databaseSizeBasedRecommendationServiceLevelObjective] + * @property {string} [databaseSizeBasedRecommendationServiceLevelObjective] * Gets or sets databaseSizeBasedRecommendationServiceLevelObjective for * service tier advisor. - * @member {uuid} [databaseSizeBasedRecommendationServiceLevelObjectiveId] + * @property {uuid} [databaseSizeBasedRecommendationServiceLevelObjectiveId] * Gets or sets databaseSizeBasedRecommendationServiceLevelObjectiveId for * service tier advisor. - * @member {string} [disasterPlanBasedRecommendationServiceLevelObjective] + * @property {string} [disasterPlanBasedRecommendationServiceLevelObjective] * Gets or sets disasterPlanBasedRecommendationServiceLevelObjective for * service tier advisor. - * @member {uuid} [disasterPlanBasedRecommendationServiceLevelObjectiveId] + * @property {uuid} [disasterPlanBasedRecommendationServiceLevelObjectiveId] * Gets or sets disasterPlanBasedRecommendationServiceLevelObjectiveId for * service tier advisor. - * @member {string} [overallRecommendationServiceLevelObjective] Gets or sets - * overallRecommendationServiceLevelObjective for service tier advisor. - * @member {uuid} [overallRecommendationServiceLevelObjectiveId] Gets or sets - * overallRecommendationServiceLevelObjectiveId for service tier advisor. - * @member {number} [confidence] Gets or sets confidence for service tier + * @property {string} [overallRecommendationServiceLevelObjective] Gets or + * sets overallRecommendationServiceLevelObjective for service tier advisor. + * @property {uuid} [overallRecommendationServiceLevelObjectiveId] Gets or + * sets overallRecommendationServiceLevelObjectiveId for service tier + * advisor. + * @property {number} [confidence] Gets or sets confidence for service tier * advisor. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/sku.js b/lib/services/sqlManagement2/lib/models/sku.js index afb42bd67f..7a08457b54 100644 --- a/lib/services/sqlManagement2/lib/models/sku.js +++ b/lib/services/sqlManagement2/lib/models/sku.js @@ -17,17 +17,17 @@ class Sku { /** * Create a Sku. - * @member {string} name The name of the SKU. Ex - P3. It is typically a + * @property {string} name The name of the SKU. Ex - P3. It is typically a * letter+number code - * @member {string} [tier] This field is required to be implemented by the + * @property {string} [tier] This field is required to be implemented by the * Resource Provider if the service has more than one tier, but is not * required on a PUT. - * @member {string} [size] The SKU size. When the name field is the + * @property {string} [size] The SKU size. When the name field is the * combination of tier and some other value, this would be the standalone * code. - * @member {string} [family] If the service has different generations of + * @property {string} [family] If the service has different generations of * hardware, for the same SKU, then that can be captured here. - * @member {number} [capacity] If the SKU supports scale out/in then the + * @property {number} [capacity] If the SKU supports scale out/in then the * capacity integer should be included. If scale out/in is not possible for * the resource this may be omitted. */ diff --git a/lib/services/sqlManagement2/lib/models/sloUsageMetric.js b/lib/services/sqlManagement2/lib/models/sloUsageMetric.js index 0d45b00b7c..827b234980 100644 --- a/lib/services/sqlManagement2/lib/models/sloUsageMetric.js +++ b/lib/services/sqlManagement2/lib/models/sloUsageMetric.js @@ -17,8 +17,8 @@ class SloUsageMetric { /** * Create a SloUsageMetric. - * @member {string} [serviceLevelObjective] The serviceLevelObjective for SLO - * usage metric. Possible values include: 'System', 'System0', 'System1', + * @property {string} [serviceLevelObjective] The serviceLevelObjective for + * SLO usage metric. Possible values include: 'System', 'System0', 'System1', * 'System2', 'System3', 'System4', 'System2L', 'System3L', 'System4L', * 'Free', 'Basic', 'S0', 'S1', 'S2', 'S3', 'S4', 'S6', 'S7', 'S9', 'S12', * 'P1', 'P2', 'P3', 'P4', 'P6', 'P11', 'P15', 'PRS1', 'PRS2', 'PRS4', @@ -27,10 +27,10 @@ class SloUsageMetric { * 'DW2500c', 'DW3000c', 'DW6000', 'DW5000c', 'DW6000c', 'DW7500c', * 'DW10000c', 'DW15000c', 'DW30000c', 'DS100', 'DS200', 'DS300', 'DS400', * 'DS500', 'DS600', 'DS1000', 'DS1200', 'DS1500', 'DS2000', 'ElasticPool' - * @member {uuid} [serviceLevelObjectiveId] The serviceLevelObjectiveId for + * @property {uuid} [serviceLevelObjectiveId] The serviceLevelObjectiveId for + * SLO usage metric. + * @property {number} [inRangeTimeRatio] Gets or sets inRangeTimeRatio for * SLO usage metric. - * @member {number} [inRangeTimeRatio] Gets or sets inRangeTimeRatio for SLO - * usage metric. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/subscriptionUsage.js b/lib/services/sqlManagement2/lib/models/subscriptionUsage.js index d58c9739c1..119a5baaf6 100644 --- a/lib/services/sqlManagement2/lib/models/subscriptionUsage.js +++ b/lib/services/sqlManagement2/lib/models/subscriptionUsage.js @@ -20,10 +20,10 @@ const models = require('./index'); class SubscriptionUsage extends models['ProxyResource'] { /** * Create a SubscriptionUsage. - * @member {string} [displayName] User-readable name of the metric. - * @member {number} [currentValue] Current value of the metric. - * @member {number} [limit] Boundary value of the metric. - * @member {string} [unit] Unit of the metric. + * @property {string} [displayName] User-readable name of the metric. + * @property {number} [currentValue] Current value of the metric. + * @property {number} [limit] Boundary value of the metric. + * @property {string} [unit] Unit of the metric. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/subscriptionUsageListResult.js b/lib/services/sqlManagement2/lib/models/subscriptionUsageListResult.js index 9405a6b359..15a9bb9a8e 100644 --- a/lib/services/sqlManagement2/lib/models/subscriptionUsageListResult.js +++ b/lib/services/sqlManagement2/lib/models/subscriptionUsageListResult.js @@ -16,7 +16,7 @@ class SubscriptionUsageListResult extends Array { /** * Create a SubscriptionUsageListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncAgent.js b/lib/services/sqlManagement2/lib/models/syncAgent.js index cc6dc3006a..7bd6707989 100644 --- a/lib/services/sqlManagement2/lib/models/syncAgent.js +++ b/lib/services/sqlManagement2/lib/models/syncAgent.js @@ -20,15 +20,15 @@ const models = require('./index'); class SyncAgent extends models['ProxyResource'] { /** * Create a SyncAgent. - * @member {string} [syncAgentName] Name of the sync agent. - * @member {string} [syncDatabaseId] ARM resource id of the sync database in - * the sync agent. - * @member {date} [lastAliveTime] Last alive time of the sync agent. - * @member {string} [state] State of the sync agent. Possible values include: - * 'Online', 'Offline', 'NeverConnected' - * @member {boolean} [isUpToDate] If the sync agent version is up to date. - * @member {date} [expiryTime] Expiration time of the sync agent version. - * @member {string} [version] Version of the sync agent. + * @property {string} [syncAgentName] Name of the sync agent. + * @property {string} [syncDatabaseId] ARM resource id of the sync database + * in the sync agent. + * @property {date} [lastAliveTime] Last alive time of the sync agent. + * @property {string} [state] State of the sync agent. Possible values + * include: 'Online', 'Offline', 'NeverConnected' + * @property {boolean} [isUpToDate] If the sync agent version is up to date. + * @property {date} [expiryTime] Expiration time of the sync agent version. + * @property {string} [version] Version of the sync agent. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncAgentKeyProperties.js b/lib/services/sqlManagement2/lib/models/syncAgentKeyProperties.js index 909f84b53c..093c4785ea 100644 --- a/lib/services/sqlManagement2/lib/models/syncAgentKeyProperties.js +++ b/lib/services/sqlManagement2/lib/models/syncAgentKeyProperties.js @@ -17,7 +17,7 @@ class SyncAgentKeyProperties { /** * Create a SyncAgentKeyProperties. - * @member {string} [syncAgentKey] Key of sync agent. + * @property {string} [syncAgentKey] Key of sync agent. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/syncAgentLinkedDatabase.js b/lib/services/sqlManagement2/lib/models/syncAgentLinkedDatabase.js index 64700a8f0a..e51ab78c4f 100644 --- a/lib/services/sqlManagement2/lib/models/syncAgentLinkedDatabase.js +++ b/lib/services/sqlManagement2/lib/models/syncAgentLinkedDatabase.js @@ -20,16 +20,16 @@ const models = require('./index'); class SyncAgentLinkedDatabase extends models['ProxyResource'] { /** * Create a SyncAgentLinkedDatabase. - * @member {string} [databaseType] Type of the sync agent linked database. + * @property {string} [databaseType] Type of the sync agent linked database. * Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase' - * @member {string} [databaseId] Id of the sync agent linked database. - * @member {string} [description] Description of the sync agent linked + * @property {string} [databaseId] Id of the sync agent linked database. + * @property {string} [description] Description of the sync agent linked * database. - * @member {string} [serverName] Server name of the sync agent linked + * @property {string} [serverName] Server name of the sync agent linked * database. - * @member {string} [databaseName] Database name of the sync agent linked + * @property {string} [databaseName] Database name of the sync agent linked * database. - * @member {string} [userName] User name of the sync agent linked database. + * @property {string} [userName] User name of the sync agent linked database. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncAgentLinkedDatabaseListResult.js b/lib/services/sqlManagement2/lib/models/syncAgentLinkedDatabaseListResult.js index ac8d386b33..2be85009af 100644 --- a/lib/services/sqlManagement2/lib/models/syncAgentLinkedDatabaseListResult.js +++ b/lib/services/sqlManagement2/lib/models/syncAgentLinkedDatabaseListResult.js @@ -16,7 +16,7 @@ class SyncAgentLinkedDatabaseListResult extends Array { /** * Create a SyncAgentLinkedDatabaseListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncAgentListResult.js b/lib/services/sqlManagement2/lib/models/syncAgentListResult.js index aa53c365f9..1f6fdd6db4 100644 --- a/lib/services/sqlManagement2/lib/models/syncAgentListResult.js +++ b/lib/services/sqlManagement2/lib/models/syncAgentListResult.js @@ -16,7 +16,7 @@ class SyncAgentListResult extends Array { /** * Create a SyncAgentListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncDatabaseIdListResult.js b/lib/services/sqlManagement2/lib/models/syncDatabaseIdListResult.js index 37049a7b4e..984d38fd1f 100644 --- a/lib/services/sqlManagement2/lib/models/syncDatabaseIdListResult.js +++ b/lib/services/sqlManagement2/lib/models/syncDatabaseIdListResult.js @@ -16,7 +16,7 @@ class SyncDatabaseIdListResult extends Array { /** * Create a SyncDatabaseIdListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncDatabaseIdProperties.js b/lib/services/sqlManagement2/lib/models/syncDatabaseIdProperties.js index 3c1d35ab3f..a84a1ad723 100644 --- a/lib/services/sqlManagement2/lib/models/syncDatabaseIdProperties.js +++ b/lib/services/sqlManagement2/lib/models/syncDatabaseIdProperties.js @@ -17,7 +17,7 @@ class SyncDatabaseIdProperties { /** * Create a SyncDatabaseIdProperties. - * @member {string} [id] ARM resource id of sync database. + * @property {string} [id] ARM resource id of sync database. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/syncFullSchemaProperties.js b/lib/services/sqlManagement2/lib/models/syncFullSchemaProperties.js index 2a7fd7b6f5..ec3eefc7d4 100644 --- a/lib/services/sqlManagement2/lib/models/syncFullSchemaProperties.js +++ b/lib/services/sqlManagement2/lib/models/syncFullSchemaProperties.js @@ -17,8 +17,8 @@ class SyncFullSchemaProperties { /** * Create a SyncFullSchemaProperties. - * @member {array} [tables] List of tables in the database full schema. - * @member {date} [lastUpdateTime] Last update time of the database schema. + * @property {array} [tables] List of tables in the database full schema. + * @property {date} [lastUpdateTime] Last update time of the database schema. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/syncFullSchemaPropertiesListResult.js b/lib/services/sqlManagement2/lib/models/syncFullSchemaPropertiesListResult.js index 036fc26356..775800ba95 100644 --- a/lib/services/sqlManagement2/lib/models/syncFullSchemaPropertiesListResult.js +++ b/lib/services/sqlManagement2/lib/models/syncFullSchemaPropertiesListResult.js @@ -16,7 +16,7 @@ class SyncFullSchemaPropertiesListResult extends Array { /** * Create a SyncFullSchemaPropertiesListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncFullSchemaTable.js b/lib/services/sqlManagement2/lib/models/syncFullSchemaTable.js index 514fb77a81..45f4e3afaa 100644 --- a/lib/services/sqlManagement2/lib/models/syncFullSchemaTable.js +++ b/lib/services/sqlManagement2/lib/models/syncFullSchemaTable.js @@ -17,12 +17,12 @@ class SyncFullSchemaTable { /** * Create a SyncFullSchemaTable. - * @member {array} [columns] List of columns in the table of database full + * @property {array} [columns] List of columns in the table of database full * schema. - * @member {string} [errorId] Error id of the table. - * @member {boolean} [hasError] If there is error in the table. - * @member {string} [name] Name of the table. - * @member {string} [quotedName] Quoted name of the table. + * @property {string} [errorId] Error id of the table. + * @property {boolean} [hasError] If there is error in the table. + * @property {string} [name] Name of the table. + * @property {string} [quotedName] Quoted name of the table. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/syncFullSchemaTableColumn.js b/lib/services/sqlManagement2/lib/models/syncFullSchemaTableColumn.js index 97e7d115d2..ec549398c1 100644 --- a/lib/services/sqlManagement2/lib/models/syncFullSchemaTableColumn.js +++ b/lib/services/sqlManagement2/lib/models/syncFullSchemaTableColumn.js @@ -17,13 +17,13 @@ class SyncFullSchemaTableColumn { /** * Create a SyncFullSchemaTableColumn. - * @member {string} [dataSize] Data size of the column. - * @member {string} [dataType] Data type of the column. - * @member {string} [errorId] Error id of the column. - * @member {boolean} [hasError] If there is error in the table. - * @member {boolean} [isPrimaryKey] If it is the primary key of the table. - * @member {string} [name] Name of the column. - * @member {string} [quotedName] Quoted name of the column. + * @property {string} [dataSize] Data size of the column. + * @property {string} [dataType] Data type of the column. + * @property {string} [errorId] Error id of the column. + * @property {boolean} [hasError] If there is error in the table. + * @property {boolean} [isPrimaryKey] If it is the primary key of the table. + * @property {string} [name] Name of the column. + * @property {string} [quotedName] Quoted name of the column. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/syncGroup.js b/lib/services/sqlManagement2/lib/models/syncGroup.js index 115ec8f770..e33831e2bd 100644 --- a/lib/services/sqlManagement2/lib/models/syncGroup.js +++ b/lib/services/sqlManagement2/lib/models/syncGroup.js @@ -20,22 +20,22 @@ const models = require('./index'); class SyncGroup extends models['ProxyResource'] { /** * Create a SyncGroup. - * @member {number} [interval] Sync interval of the sync group. - * @member {date} [lastSyncTime] Last sync time of the sync group. - * @member {string} [conflictResolutionPolicy] Conflict resolution policy of - * the sync group. Possible values include: 'HubWin', 'MemberWin' - * @member {string} [syncDatabaseId] ARM resource id of the sync database in - * the sync group. - * @member {string} [hubDatabaseUserName] User name for the sync group hub + * @property {number} [interval] Sync interval of the sync group. + * @property {date} [lastSyncTime] Last sync time of the sync group. + * @property {string} [conflictResolutionPolicy] Conflict resolution policy + * of the sync group. Possible values include: 'HubWin', 'MemberWin' + * @property {string} [syncDatabaseId] ARM resource id of the sync database + * in the sync group. + * @property {string} [hubDatabaseUserName] User name for the sync group hub * database credential. - * @member {string} [hubDatabasePassword] Password for the sync group hub + * @property {string} [hubDatabasePassword] Password for the sync group hub * database credential. - * @member {string} [syncState] Sync state of the sync group. Possible values - * include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' - * @member {object} [schema] Sync schema of the sync group. - * @member {array} [schema.tables] List of tables in sync group schema. - * @member {string} [schema.masterSyncMemberName] Name of master sync member - * where the schema is from. + * @property {string} [syncState] Sync state of the sync group. Possible + * values include: 'NotReady', 'Error', 'Warning', 'Progressing', 'Good' + * @property {object} [schema] Sync schema of the sync group. + * @property {array} [schema.tables] List of tables in sync group schema. + * @property {string} [schema.masterSyncMemberName] Name of master sync + * member where the schema is from. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncGroupListResult.js b/lib/services/sqlManagement2/lib/models/syncGroupListResult.js index e56a3dc758..006000a68c 100644 --- a/lib/services/sqlManagement2/lib/models/syncGroupListResult.js +++ b/lib/services/sqlManagement2/lib/models/syncGroupListResult.js @@ -16,7 +16,7 @@ class SyncGroupListResult extends Array { /** * Create a SyncGroupListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncGroupLogListResult.js b/lib/services/sqlManagement2/lib/models/syncGroupLogListResult.js index d2c7e6e1a7..86d8b95238 100644 --- a/lib/services/sqlManagement2/lib/models/syncGroupLogListResult.js +++ b/lib/services/sqlManagement2/lib/models/syncGroupLogListResult.js @@ -16,7 +16,7 @@ class SyncGroupLogListResult extends Array { /** * Create a SyncGroupLogListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/syncGroupLogProperties.js b/lib/services/sqlManagement2/lib/models/syncGroupLogProperties.js index 39f0ee25b6..d0a2e87693 100644 --- a/lib/services/sqlManagement2/lib/models/syncGroupLogProperties.js +++ b/lib/services/sqlManagement2/lib/models/syncGroupLogProperties.js @@ -17,13 +17,14 @@ class SyncGroupLogProperties { /** * Create a SyncGroupLogProperties. - * @member {date} [timestamp] Timestamp of the sync group log. - * @member {string} [type] Type of the sync group log. Possible values + * @property {date} [timestamp] Timestamp of the sync group log. + * @property {string} [type] Type of the sync group log. Possible values * include: 'All', 'Error', 'Warning', 'Success' - * @member {string} [source] Source of the sync group log. - * @member {string} [details] Details of the sync group log. - * @member {uuid} [tracingId] TracingId of the sync group log. - * @member {string} [operationStatus] OperationStatus of the sync group log. + * @property {string} [source] Source of the sync group log. + * @property {string} [details] Details of the sync group log. + * @property {uuid} [tracingId] TracingId of the sync group log. + * @property {string} [operationStatus] OperationStatus of the sync group + * log. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/syncGroupSchema.js b/lib/services/sqlManagement2/lib/models/syncGroupSchema.js index 90c1d38c65..c4a0675edb 100644 --- a/lib/services/sqlManagement2/lib/models/syncGroupSchema.js +++ b/lib/services/sqlManagement2/lib/models/syncGroupSchema.js @@ -17,8 +17,8 @@ class SyncGroupSchema { /** * Create a SyncGroupSchema. - * @member {array} [tables] List of tables in sync group schema. - * @member {string} [masterSyncMemberName] Name of master sync member where + * @property {array} [tables] List of tables in sync group schema. + * @property {string} [masterSyncMemberName] Name of master sync member where * the schema is from. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/syncGroupSchemaTable.js b/lib/services/sqlManagement2/lib/models/syncGroupSchemaTable.js index 1a8444a95a..15e0bb12af 100644 --- a/lib/services/sqlManagement2/lib/models/syncGroupSchemaTable.js +++ b/lib/services/sqlManagement2/lib/models/syncGroupSchemaTable.js @@ -17,8 +17,8 @@ class SyncGroupSchemaTable { /** * Create a SyncGroupSchemaTable. - * @member {array} [columns] List of columns in sync group schema. - * @member {string} [quotedName] Quoted name of sync group schema table. + * @property {array} [columns] List of columns in sync group schema. + * @property {string} [quotedName] Quoted name of sync group schema table. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/syncGroupSchemaTableColumn.js b/lib/services/sqlManagement2/lib/models/syncGroupSchemaTableColumn.js index 6e16acf1f4..9059d7c993 100644 --- a/lib/services/sqlManagement2/lib/models/syncGroupSchemaTableColumn.js +++ b/lib/services/sqlManagement2/lib/models/syncGroupSchemaTableColumn.js @@ -17,9 +17,9 @@ class SyncGroupSchemaTableColumn { /** * Create a SyncGroupSchemaTableColumn. - * @member {string} [quotedName] Quoted name of sync group table column. - * @member {string} [dataSize] Data size of the column. - * @member {string} [dataType] Data type of the column. + * @property {string} [quotedName] Quoted name of sync group table column. + * @property {string} [dataSize] Data size of the column. + * @property {string} [dataType] Data type of the column. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/syncMember.js b/lib/services/sqlManagement2/lib/models/syncMember.js index 59d9bd5d91..78340605e9 100644 --- a/lib/services/sqlManagement2/lib/models/syncMember.js +++ b/lib/services/sqlManagement2/lib/models/syncMember.js @@ -20,24 +20,24 @@ const models = require('./index'); class SyncMember extends models['ProxyResource'] { /** * Create a SyncMember. - * @member {string} [databaseType] Database type of the sync member. Possible - * values include: 'AzureSqlDatabase', 'SqlServerDatabase' - * @member {string} [syncAgentId] ARM resource id of the sync agent in the + * @property {string} [databaseType] Database type of the sync member. + * Possible values include: 'AzureSqlDatabase', 'SqlServerDatabase' + * @property {string} [syncAgentId] ARM resource id of the sync agent in the * sync member. - * @member {uuid} [sqlServerDatabaseId] SQL Server database id of the sync + * @property {uuid} [sqlServerDatabaseId] SQL Server database id of the sync * member. - * @member {string} [serverName] Server name of the member database in the + * @property {string} [serverName] Server name of the member database in the * sync member - * @member {string} [databaseName] Database name of the member database in + * @property {string} [databaseName] Database name of the member database in * the sync member. - * @member {string} [userName] User name of the member database in the sync + * @property {string} [userName] User name of the member database in the sync * member. - * @member {string} [password] Password of the member database in the sync + * @property {string} [password] Password of the member database in the sync * member. - * @member {string} [syncDirection] Sync direction of the sync member. + * @property {string} [syncDirection] Sync direction of the sync member. * Possible values include: 'Bidirectional', 'OneWayMemberToHub', * 'OneWayHubToMember' - * @member {string} [syncState] Sync state of the sync member. Possible + * @property {string} [syncState] Sync state of the sync member. Possible * values include: 'SyncInProgress', 'SyncSucceeded', 'SyncFailed', * 'DisabledTombstoneCleanup', 'DisabledBackupRestore', * 'SyncSucceededWithWarnings', 'SyncCancelling', 'SyncCancelled', diff --git a/lib/services/sqlManagement2/lib/models/syncMemberListResult.js b/lib/services/sqlManagement2/lib/models/syncMemberListResult.js index 78d43f1038..b9548300af 100644 --- a/lib/services/sqlManagement2/lib/models/syncMemberListResult.js +++ b/lib/services/sqlManagement2/lib/models/syncMemberListResult.js @@ -16,7 +16,7 @@ class SyncMemberListResult extends Array { /** * Create a SyncMemberListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/tdeCertificate.js b/lib/services/sqlManagement2/lib/models/tdeCertificate.js index 2c73aecdd2..042797feb6 100644 --- a/lib/services/sqlManagement2/lib/models/tdeCertificate.js +++ b/lib/services/sqlManagement2/lib/models/tdeCertificate.js @@ -20,8 +20,9 @@ const models = require('./index'); class TdeCertificate extends models['ProxyResource'] { /** * Create a TdeCertificate. - * @member {string} privateBlob The base64 encoded certificate private blob. - * @member {string} [certPassword] The certificate password. + * @property {string} privateBlob The base64 encoded certificate private + * blob. + * @property {string} [certPassword] The certificate password. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/trackedResource.js b/lib/services/sqlManagement2/lib/models/trackedResource.js index 042c9c57b6..0fe6d7d553 100644 --- a/lib/services/sqlManagement2/lib/models/trackedResource.js +++ b/lib/services/sqlManagement2/lib/models/trackedResource.js @@ -20,8 +20,8 @@ const models = require('./index'); class TrackedResource extends models['Resource'] { /** * Create a TrackedResource. - * @member {string} location Resource location. - * @member {object} [tags] Resource tags. + * @property {string} location Resource location. + * @property {object} [tags] Resource tags. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/transparentDataEncryption.js b/lib/services/sqlManagement2/lib/models/transparentDataEncryption.js index 903801d20d..604190cc13 100644 --- a/lib/services/sqlManagement2/lib/models/transparentDataEncryption.js +++ b/lib/services/sqlManagement2/lib/models/transparentDataEncryption.js @@ -20,8 +20,8 @@ const models = require('./index'); class TransparentDataEncryption extends models['ProxyResource'] { /** * Create a TransparentDataEncryption. - * @member {string} [location] Resource location. - * @member {string} [status] The status of the database transparent data + * @property {string} [location] Resource location. + * @property {string} [status] The status of the database transparent data * encryption. Possible values include: 'Enabled', 'Disabled' */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/transparentDataEncryptionActivity.js b/lib/services/sqlManagement2/lib/models/transparentDataEncryptionActivity.js index 42241f5ae0..643cbf61f7 100644 --- a/lib/services/sqlManagement2/lib/models/transparentDataEncryptionActivity.js +++ b/lib/services/sqlManagement2/lib/models/transparentDataEncryptionActivity.js @@ -20,11 +20,11 @@ const models = require('./index'); class TransparentDataEncryptionActivity extends models['ProxyResource'] { /** * Create a TransparentDataEncryptionActivity. - * @member {string} [location] Resource location. - * @member {string} [status] The status of the database. Possible values + * @property {string} [location] Resource location. + * @property {string} [status] The status of the database. Possible values * include: 'Encrypting', 'Decrypting' - * @member {number} [percentComplete] The percent complete of the transparent - * data encryption scan for a database. + * @property {number} [percentComplete] The percent complete of the + * transparent data encryption scan for a database. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/virtualCluster.js b/lib/services/sqlManagement2/lib/models/virtualCluster.js new file mode 100644 index 0000000000..24e01ff60a --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/virtualCluster.js @@ -0,0 +1,128 @@ +/* + * 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 models = require('./index'); + +/** + * An Azure SQL virtual cluster. + * + * @extends models['TrackedResource'] + */ +class VirtualCluster extends models['TrackedResource'] { + /** + * Create a VirtualCluster. + * @property {string} [subnetId] Subnet resource ID for the virtual cluster. + * @property {string} [family] If the service has different generations of + * hardware, for the same SKU, then that can be captured here. + * @property {array} [childResources] List of resources in this virtual + * cluster. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of VirtualCluster + * + * @returns {object} metadata of VirtualCluster + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualCluster', + type: { + name: 'Composite', + className: 'VirtualCluster', + modelProperties: { + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: true, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + subnetId: { + required: false, + readOnly: true, + serializedName: 'properties.subnetId', + type: { + name: 'String' + } + }, + family: { + required: false, + serializedName: 'properties.family', + type: { + name: 'String' + } + }, + childResources: { + required: false, + readOnly: true, + serializedName: 'properties.childResources', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = VirtualCluster; diff --git a/lib/services/sqlManagement2/lib/models/virtualClusterListResult.js b/lib/services/sqlManagement2/lib/models/virtualClusterListResult.js new file mode 100644 index 0000000000..61b8ec45cb --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/virtualClusterListResult.js @@ -0,0 +1,69 @@ +/* + * 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'; + +/** + * A list of virtual clusters. + */ +class VirtualClusterListResult extends Array { + /** + * Create a VirtualClusterListResult. + * @property {string} [nextLink] Link to retrieve next page of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of VirtualClusterListResult + * + * @returns {object} metadata of VirtualClusterListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualClusterListResult', + type: { + name: 'Composite', + className: 'VirtualClusterListResult', + modelProperties: { + value: { + required: false, + readOnly: true, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'VirtualClusterElementType', + type: { + name: 'Composite', + className: 'VirtualCluster' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VirtualClusterListResult; diff --git a/lib/services/sqlManagement2/lib/models/virtualClusterUpdate.js b/lib/services/sqlManagement2/lib/models/virtualClusterUpdate.js new file mode 100644 index 0000000000..e3320f8153 --- /dev/null +++ b/lib/services/sqlManagement2/lib/models/virtualClusterUpdate.js @@ -0,0 +1,94 @@ +/* + * 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'; + +/** + * An update request for an Azure SQL Database virtual cluster. + * + */ +class VirtualClusterUpdate { + /** + * Create a VirtualClusterUpdate. + * @property {string} [subnetId] Subnet resource ID for the virtual cluster. + * @property {string} [family] If the service has different generations of + * hardware, for the same SKU, then that can be captured here. + * @property {array} [childResources] List of resources in this virtual + * cluster. + * @property {object} [tags] Resource tags. + */ + constructor() { + } + + /** + * Defines the metadata of VirtualClusterUpdate + * + * @returns {object} metadata of VirtualClusterUpdate + * + */ + mapper() { + return { + required: false, + serializedName: 'VirtualClusterUpdate', + type: { + name: 'Composite', + className: 'VirtualClusterUpdate', + modelProperties: { + subnetId: { + required: false, + readOnly: true, + serializedName: 'properties.subnetId', + type: { + name: 'String' + } + }, + family: { + required: false, + serializedName: 'properties.family', + type: { + name: 'String' + } + }, + childResources: { + required: false, + readOnly: true, + serializedName: 'properties.childResources', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + } + } + } + }; + } +} + +module.exports = VirtualClusterUpdate; diff --git a/lib/services/sqlManagement2/lib/models/virtualNetworkRule.js b/lib/services/sqlManagement2/lib/models/virtualNetworkRule.js index c0f9a60278..80787c6b89 100644 --- a/lib/services/sqlManagement2/lib/models/virtualNetworkRule.js +++ b/lib/services/sqlManagement2/lib/models/virtualNetworkRule.js @@ -20,11 +20,11 @@ const models = require('./index'); class VirtualNetworkRule extends models['ProxyResource'] { /** * Create a VirtualNetworkRule. - * @member {string} virtualNetworkSubnetId The ARM resource id of the virtual - * network subnet. - * @member {boolean} [ignoreMissingVnetServiceEndpoint] Create firewall rule - * before the virtual network has vnet service endpoint enabled. - * @member {string} [state] Virtual Network Rule State. Possible values + * @property {string} virtualNetworkSubnetId The ARM resource id of the + * virtual network subnet. + * @property {boolean} [ignoreMissingVnetServiceEndpoint] Create firewall + * rule before the virtual network has vnet service endpoint enabled. + * @property {string} [state] Virtual Network Rule State. Possible values * include: 'Initializing', 'InProgress', 'Ready', 'Deleting', 'Unknown' */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/virtualNetworkRuleListResult.js b/lib/services/sqlManagement2/lib/models/virtualNetworkRuleListResult.js index c80a275efd..48f0bd1d48 100644 --- a/lib/services/sqlManagement2/lib/models/virtualNetworkRuleListResult.js +++ b/lib/services/sqlManagement2/lib/models/virtualNetworkRuleListResult.js @@ -16,7 +16,7 @@ class VirtualNetworkRuleListResult extends Array { /** * Create a VirtualNetworkRuleListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentRecurringScansProperties.js b/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentRecurringScansProperties.js index b08942b1ca..3a82d0e0ee 100644 --- a/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentRecurringScansProperties.js +++ b/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentRecurringScansProperties.js @@ -17,11 +17,11 @@ class VulnerabilityAssessmentRecurringScansProperties { /** * Create a VulnerabilityAssessmentRecurringScansProperties. - * @member {boolean} [isEnabled] Recurring scans state. - * @member {boolean} [emailSubscriptionAdmins] Specifies that the schedule + * @property {boolean} [isEnabled] Recurring scans state. + * @property {boolean} [emailSubscriptionAdmins] Specifies that the schedule * scan notification will be is sent to the subscription administrators. * Default value: true . - * @member {array} [emails] Specifies an array of e-mail addresses to which + * @property {array} [emails] Specifies an array of e-mail addresses to which * the scan notification is sent. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanError.js b/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanError.js index 29ed29a2d7..8d713c4835 100644 --- a/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanError.js +++ b/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanError.js @@ -17,8 +17,8 @@ class VulnerabilityAssessmentScanError { /** * Create a VulnerabilityAssessmentScanError. - * @member {string} [code] The error code. - * @member {string} [message] The error message. + * @property {string} [code] The error code. + * @property {string} [message] The error message. */ constructor() { } diff --git a/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanRecord.js b/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanRecord.js index cbef4bb19f..bbf2eadab1 100644 --- a/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanRecord.js +++ b/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanRecord.js @@ -20,17 +20,17 @@ const models = require('./index'); class VulnerabilityAssessmentScanRecord extends models['ProxyResource'] { /** * Create a VulnerabilityAssessmentScanRecord. - * @member {string} [scanId] The scan ID. - * @member {string} [triggerType] The scan trigger type. Possible values + * @property {string} [scanId] The scan ID. + * @property {string} [triggerType] The scan trigger type. Possible values * include: 'OnDemand', 'Recurring' - * @member {string} [state] The scan status. Possible values include: + * @property {string} [state] The scan status. Possible values include: * 'Passed', 'Failed', 'FailedToRun', 'InProgress' - * @member {date} [startTime] The scan start time (UTC). - * @member {date} [endTime] The scan end time (UTC). - * @member {array} [errors] The scan errors. - * @member {string} [storageContainerPath] The scan results storage container - * path. - * @member {number} [numberOfFailedSecurityChecks] The number of failed + * @property {date} [startTime] The scan start time (UTC). + * @property {date} [endTime] The scan end time (UTC). + * @property {array} [errors] The scan errors. + * @property {string} [storageContainerPath] The scan results storage + * container path. + * @property {number} [numberOfFailedSecurityChecks] The number of failed * security checks. */ constructor() { diff --git a/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanRecordListResult.js b/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanRecordListResult.js index 04d5447c1b..09f3ca97fd 100644 --- a/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanRecordListResult.js +++ b/lib/services/sqlManagement2/lib/models/vulnerabilityAssessmentScanRecordListResult.js @@ -16,7 +16,7 @@ class VulnerabilityAssessmentScanRecordListResult extends Array { /** * Create a VulnerabilityAssessmentScanRecordListResult. - * @member {string} [nextLink] Link to retrieve next page of results. + * @property {string} [nextLink] Link to retrieve next page of results. */ constructor() { super(); diff --git a/lib/services/sqlManagement2/lib/operations/index.d.ts b/lib/services/sqlManagement2/lib/operations/index.d.ts index 9ac7a4af69..8f61d39b8f 100644 --- a/lib/services/sqlManagement2/lib/operations/index.d.ts +++ b/lib/services/sqlManagement2/lib/operations/index.d.ts @@ -6570,7 +6570,7 @@ export interface RecommendedElasticPools { /** - * Gets a recommented elastic pool. + * Gets a recommended elastic pool. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -6595,7 +6595,7 @@ export interface RecommendedElasticPools { getWithHttpOperationResponse(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a recommented elastic pool. + * Gets a recommended elastic pool. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -6704,7 +6704,7 @@ export interface RecommendedElasticPools { /** - * Returns recommented elastic pool metrics. + * Returns recommended elastic pool metrics. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -6729,7 +6729,7 @@ export interface RecommendedElasticPools { listMetricsWithHttpOperationResponse(resourceGroupName: string, serverName: string, recommendedElasticPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Returns recommented elastic pool metrics. + * Returns recommended elastic pool metrics. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -10835,6 +10835,25 @@ export interface ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -10914,6 +10933,25 @@ export interface ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -11066,6 +11104,25 @@ export interface ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -11135,6 +11192,25 @@ export interface ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -11231,6 +11307,25 @@ export interface ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -11310,6 +11405,25 @@ export interface ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -11462,6 +11576,25 @@ export interface ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -11531,6 +11664,25 @@ export interface ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -15944,24 +16096,72 @@ export interface SubscriptionUsages { /** * @class - * VirtualNetworkRules + * VirtualClusters * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface VirtualNetworkRules { +export interface VirtualClusters { /** - * Gets a virtual network rule. + * Gets a list of all virtualClusters in the subscription. + * + * @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. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of all virtualClusters in the subscription. + * + * @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 {VirtualClusterListResult} - 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. + * + * {VirtualClusterListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualClusterListResult} 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. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of virtual clusters in a resource 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} virtualNetworkRuleName The name of the virtual network rule. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -15969,23 +16169,19 @@ export interface VirtualNetworkRules { * * @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, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a virtual network rule. + * Gets a list of virtual clusters in a resource 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} virtualNetworkRuleName The name of the virtual network rule. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -15998,7 +16194,7 @@ export interface VirtualNetworkRules { * * {Promise} A promise is returned. * - * @resolve {VirtualNetworkRule} - The deserialized result object. + * @resolve {VirtualClusterListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16006,37 +16202,27 @@ export interface VirtualNetworkRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualNetworkRule} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualNetworkRule} for more information. + * {VirtualClusterListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualClusterListResult} 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, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates an existing virtual network rule. + * Gets a virtual cluster. * * @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} virtualNetworkRuleName The name of the virtual network rule. - * - * @param {object} parameters The requested virtual Network Rule Resource - * state. - * - * @param {string} parameters.virtualNetworkSubnetId The ARM resource id of the - * virtual network subnet. - * - * @param {boolean} [parameters.ignoreMissingVnetServiceEndpoint] Create - * firewall rule before the virtual network has vnet service endpoint enabled. + * @param {string} virtualClusterName The name of the virtual cluster. * * @param {object} [options] Optional Parameters. * @@ -16045,31 +16231,20 @@ export interface VirtualNetworkRules { * * @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, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, virtualClusterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an existing virtual network rule. + * Gets a virtual cluster. * * @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} virtualNetworkRuleName The name of the virtual network rule. - * - * @param {object} parameters The requested virtual Network Rule Resource - * state. - * - * @param {string} parameters.virtualNetworkSubnetId The ARM resource id of the - * virtual network subnet. - * - * @param {boolean} [parameters.ignoreMissingVnetServiceEndpoint] Create - * firewall rule before the virtual network has vnet service endpoint enabled. + * @param {string} virtualClusterName The name of the virtual cluster. * * @param {object} [options] Optional Parameters. * @@ -16083,7 +16258,7 @@ export interface VirtualNetworkRules { * * {Promise} A promise is returned. * - * @resolve {VirtualNetworkRule} - The deserialized result object. + * @resolve {VirtualCluster} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16091,28 +16266,26 @@ export interface VirtualNetworkRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualNetworkRule} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualNetworkRule} for more information. + * {VirtualCluster} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualCluster} 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, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, virtualClusterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, virtualClusterName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, virtualClusterName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the virtual network rule with the given name. + * Deletes a virtual cluster. * * @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} virtualNetworkRuleName The name of the virtual network rule. + * @param {string} virtualClusterName The name of the virtual cluster. * * @param {object} [options] Optional Parameters. * @@ -16125,18 +16298,16 @@ export interface VirtualNetworkRules { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualClusterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the virtual network rule with the given name. + * Deletes a virtual cluster. * * @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} virtualNetworkRuleName The name of the virtual network rule. + * @param {string} virtualClusterName The name of the virtual cluster. * * @param {object} [options] Optional Parameters. * @@ -16164,19 +16335,26 @@ export interface VirtualNetworkRules { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, virtualClusterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, virtualClusterName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, virtualClusterName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of virtual network rules in a server. + * Updates a virtual cluster. * * @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} virtualClusterName The name of the virtual cluster. + * + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -16185,20 +16363,27 @@ export interface VirtualNetworkRules { * * @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>; + updateWithHttpOperationResponse(resourceGroupName: string, virtualClusterName: string, parameters: models.VirtualClusterUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of virtual network rules in a server. + * Updates a virtual cluster. * * @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} virtualClusterName The name of the virtual cluster. + * + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -16212,7 +16397,7 @@ export interface VirtualNetworkRules { * * {Promise} A promise is returned. * - * @resolve {VirtualNetworkRuleListResult} - The deserialized result object. + * @resolve {VirtualCluster} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16220,38 +16405,26 @@ export interface VirtualNetworkRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualNetworkRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualNetworkRuleListResult} for more - * information. + * {VirtualCluster} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualCluster} 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; + update(resourceGroupName: string, virtualClusterName: string, parameters: models.VirtualClusterUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, virtualClusterName: string, parameters: models.VirtualClusterUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, virtualClusterName: string, parameters: models.VirtualClusterUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates an existing virtual network rule. + * Deletes a virtual cluster. * * @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} virtualNetworkRuleName The name of the virtual network rule. - * - * @param {object} parameters The requested virtual Network Rule Resource - * state. - * - * @param {string} parameters.virtualNetworkSubnetId The ARM resource id of the - * virtual network subnet. - * - * @param {boolean} [parameters.ignoreMissingVnetServiceEndpoint] Create - * firewall rule before the virtual network has vnet service endpoint enabled. + * @param {string} virtualClusterName The name of the virtual cluster. * * @param {object} [options] Optional Parameters. * @@ -16260,31 +16433,20 @@ export interface VirtualNetworkRules { * * @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, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, virtualClusterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an existing virtual network rule. + * Deletes a virtual cluster. * * @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} virtualNetworkRuleName The name of the virtual network rule. - * - * @param {object} parameters The requested virtual Network Rule Resource - * state. - * - * @param {string} parameters.virtualNetworkSubnetId The ARM resource id of the - * virtual network subnet. - * - * @param {boolean} [parameters.ignoreMissingVnetServiceEndpoint] Create - * firewall rule before the virtual network has vnet service endpoint enabled. + * @param {string} virtualClusterName The name of the virtual cluster. * * @param {object} [options] Optional Parameters. * @@ -16298,7 +16460,7 @@ export interface VirtualNetworkRules { * * {Promise} A promise is returned. * - * @resolve {VirtualNetworkRule} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16306,28 +16468,32 @@ export interface VirtualNetworkRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualNetworkRule} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualNetworkRule} 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, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, virtualClusterName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, virtualClusterName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, virtualClusterName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the virtual network rule with the given name. + * Updates a virtual cluster. * * @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} virtualClusterName The name of the virtual cluster. * - * @param {string} virtualNetworkRuleName The name of the virtual network rule. + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -16336,22 +16502,27 @@ export interface VirtualNetworkRules { * * @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, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, virtualClusterName: string, parameters: models.VirtualClusterUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the virtual network rule with the given name. + * Updates a virtual cluster. * * @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} virtualClusterName The name of the virtual cluster. * - * @param {string} virtualNetworkRuleName The name of the virtual network rule. + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -16365,7 +16536,7 @@ export interface VirtualNetworkRules { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {VirtualCluster} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16373,19 +16544,20 @@ export interface VirtualNetworkRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {VirtualCluster} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualCluster} 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, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, virtualClusterName: string, parameters: models.VirtualClusterUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, virtualClusterName: string, parameters: models.VirtualClusterUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, virtualClusterName: string, parameters: models.VirtualClusterUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of virtual network rules in a server. + * Gets a list of all virtualClusters in the subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -16397,14 +16569,14 @@ export interface VirtualNetworkRules { * * @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>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of virtual network rules in a server. + * Gets a list of all virtualClusters in the subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -16421,7 +16593,7 @@ export interface VirtualNetworkRules { * * {Promise} A promise is returned. * - * @resolve {VirtualNetworkRuleListResult} - The deserialized result object. + * @resolve {VirtualClusterListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16429,38 +16601,24 @@ export interface VirtualNetworkRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VirtualNetworkRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualNetworkRuleListResult} for more + * {VirtualClusterListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualClusterListResult} 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 - * ExtendedDatabaseBlobAuditingPolicies - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ExtendedDatabaseBlobAuditingPolicies { + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets an extended database's blob auditing 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. + * Gets a list of virtual clusters in a resource group. * - * @param {string} databaseName The name of the database. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -16469,22 +16627,17 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * * @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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets an extended database's blob auditing 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. + * Gets a list of virtual clusters in a resource group. * - * @param {string} databaseName The name of the database. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -16498,7 +16651,7 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {ExtendedDatabaseBlobAuditingPolicy} - The deserialized result object. + * @resolve {VirtualClusterListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16506,21 +16659,30 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExtendedDatabaseBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ExtendedDatabaseBlobAuditingPolicy} for more + * {VirtualClusterListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualClusterListResult} 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; + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * VirtualNetworkRules + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface VirtualNetworkRules { /** - * Creates or updates an extended database's blob auditing policy. + * Gets a virtual network rule. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -16528,127 +16690,83 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * - * @param {object} parameters The extended database blob auditing policy. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.predicateExpression] Specifies condition of - * where clause when creating an audit. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} parameters.state Specifies the state of the policy. If state - * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - * Possible values include: 'Enabled', 'Disabled' + * @returns {Promise} A promise is returned * - * @param {string} [parameters.storageEndpoint] Specifies the blob storage - * endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is - * Enabled, storageEndpoint is required. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the auditing storage account. If state is Enabled and - * storageEndpoint is specified, storageAccountAccessKey is required. + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a virtual network rule. * - * @param {number} [parameters.retentionDays] Specifies the number of days to - * keep in the audit logs in the storage account. + * @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 {array} [parameters.auditActionsAndGroups] Specifies the - * Actions-Groups and Actions to audit. + * @param {string} serverName The name of the server. * - * The recommended set of action groups to use is the following combination - - * this will audit all the queries and stored procedures executed against the - * database, as well as successful and failed logins: + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. + * @param {object} [options] Optional Parameters. * - * This above combination is also the set that is configured by default when - * enabling auditing from the Azure portal. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * The supported action groups to audit are (note: choose only specific groups - * that cover your auditing needs. Using unnecessary groups could lead to very - * large quantities of audit records): + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination with - * other groups as this will result in duplicate audit logs. + * {Promise} A promise is returned. * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * @resolve {VirtualNetworkRule} - The deserialized result object. * - * For Database auditing policy, specific Actions can also be specified (note - * that Actions cannot be specified for Server auditing policy). The supported - * actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES + * @reject {Error|ServiceError} - The error object. * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} + * {ServiceCallback} optionalCallback(err, result, request, response) * - * Note that in the above format can refer to an object like a table, - * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, - * respectively. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public + * {VirtualNetworkRule} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualNetworkRule} for more information. * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob - * storage subscription Id. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates an existing virtual network rule. * - * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether - * storageAccountAccessKey value is the storage's secondary 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 {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether - * audit events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - * and 'IsAzureMonitorTargetEnabled' as true. + * @param {string} serverName The name of the server. * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be - * also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * @param {object} parameters The requested virtual Network Rule Resource + * state. * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * @param {string} parameters.virtualNetworkSubnetId The ARM resource id of the + * virtual network subnet. * + * @param {boolean} [parameters.ignoreMissingVnetServiceEndpoint] Create + * firewall rule before the virtual network has vnet service endpoint enabled. * * @param {object} [options] Optional Parameters. * @@ -16657,14 +16775,14 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * * @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.ExtendedDatabaseBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an extended database's blob auditing policy. + * Creates or updates an existing virtual network rule. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -16672,127 +16790,83 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * - * @param {object} parameters The extended database blob auditing policy. + * @param {object} parameters The requested virtual Network Rule Resource + * state. * - * @param {string} [parameters.predicateExpression] Specifies condition of - * where clause when creating an audit. + * @param {string} parameters.virtualNetworkSubnetId The ARM resource id of the + * virtual network subnet. * - * @param {string} parameters.state Specifies the state of the policy. If state - * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - * Possible values include: 'Enabled', 'Disabled' + * @param {boolean} [parameters.ignoreMissingVnetServiceEndpoint] Create + * firewall rule before the virtual network has vnet service endpoint enabled. * - * @param {string} [parameters.storageEndpoint] Specifies the blob storage - * endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is - * Enabled, storageEndpoint is required. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the auditing storage account. If state is Enabled and - * storageEndpoint is specified, storageAccountAccessKey is required. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} [parameters.retentionDays] Specifies the number of days to - * keep in the audit logs in the storage account. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {array} [parameters.auditActionsAndGroups] Specifies the - * Actions-Groups and Actions to audit. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * The recommended set of action groups to use is the following combination - - * this will audit all the queries and stored procedures executed against the - * database, as well as successful and failed logins: + * {Promise} A promise is returned. * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. + * @resolve {VirtualNetworkRule} - The deserialized result object. * - * This above combination is also the set that is configured by default when - * enabling auditing from the Azure portal. + * @reject {Error|ServiceError} - The error object. * - * The supported action groups to audit are (note: choose only specific groups - * that cover your auditing needs. Using unnecessary groups could lead to very - * large quantities of audit records): + * {ServiceCallback} optionalCallback(err, result, request, response) * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination with - * other groups as this will result in duplicate audit logs. + * {VirtualNetworkRule} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualNetworkRule} for more information. * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * For Database auditing policy, specific Actions can also be specified (note - * that Actions cannot be specified for Server auditing policy). The supported - * actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes the virtual network rule with the given name. * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} + * @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. * - * Note that in the above format can refer to an object like a table, - * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, - * respectively. + * @param {string} serverName The name of the server. * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * @param {object} [options] Optional Parameters. * - * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob - * storage subscription Id. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether - * storageAccountAccessKey value is the storage's secondary key. + * @returns {Promise} A promise is returned * - * @param {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether - * audit events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - * and 'IsAzureMonitorTargetEnabled' as true. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be - * also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes the virtual network rule with the given name. * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * @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. * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * @param {string} serverName The name of the server. * + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * * @param {object} [options] Optional Parameters. * @@ -16806,7 +16880,7 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {ExtendedDatabaseBlobAuditingPolicy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16814,30 +16888,19 @@ export interface ExtendedDatabaseBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExtendedDatabaseBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ExtendedDatabaseBlobAuditingPolicy} 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.ExtendedDatabaseBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.ExtendedDatabaseBlobAuditingPolicy, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.ExtendedDatabaseBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ExtendedServerBlobAuditingPolicies - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ExtendedServerBlobAuditingPolicies { + deleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets an extended server's blob auditing policy. + * Gets a list of virtual network rules in a server. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -16852,14 +16915,14 @@ export interface ExtendedServerBlobAuditingPolicies { * * @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>; + listByServerWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets an extended server's blob auditing policy. + * Gets a list of virtual network rules in a server. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -16879,7 +16942,7 @@ export interface ExtendedServerBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {ExtendedServerBlobAuditingPolicy} - The deserialized result object. + * @resolve {VirtualNetworkRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -16887,21 +16950,21 @@ export interface ExtendedServerBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExtendedServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ExtendedServerBlobAuditingPolicy} for more + * {VirtualNetworkRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualNetworkRuleListResult} 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, 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; + 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; /** - * Creates or updates an extended server's blob auditing policy. + * Creates or updates an existing virtual network rule. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -16909,125 +16972,92 @@ export interface ExtendedServerBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {object} parameters Properties of extended blob auditing policy + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * - * @param {string} [parameters.predicateExpression] Specifies condition of - * where clause when creating an audit. + * @param {object} parameters The requested virtual Network Rule Resource + * state. * - * @param {string} parameters.state Specifies the state of the policy. If state - * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - * Possible values include: 'Enabled', 'Disabled' + * @param {string} parameters.virtualNetworkSubnetId The ARM resource id of the + * virtual network subnet. * - * @param {string} [parameters.storageEndpoint] Specifies the blob storage - * endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is - * Enabled, storageEndpoint is required. + * @param {boolean} [parameters.ignoreMissingVnetServiceEndpoint] Create + * firewall rule before the virtual network has vnet service endpoint enabled. * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the auditing storage account. If state is Enabled and - * storageEndpoint is specified, storageAccountAccessKey is required. + * @param {object} [options] Optional Parameters. * - * @param {number} [parameters.retentionDays] Specifies the number of days to - * keep in the audit logs in the storage account. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [parameters.auditActionsAndGroups] Specifies the - * Actions-Groups and Actions to audit. + * @returns {Promise} A promise is returned * - * The recommended set of action groups to use is the following combination - - * this will audit all the queries and stored procedures executed against the - * database, as well as successful and failed logins: + * @resolve {HttpOperationResponse} - The deserialized result object. * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates an existing virtual network rule. * - * This above combination is also the set that is configured by default when - * enabling auditing from the Azure portal. + * @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. * - * The supported action groups to audit are (note: choose only specific groups - * that cover your auditing needs. Using unnecessary groups could lead to very - * large quantities of audit records): + * @param {string} serverName The name of the server. * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination with - * other groups as this will result in duplicate audit logs. + * @param {object} parameters The requested virtual Network Rule Resource + * state. * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * @param {string} parameters.virtualNetworkSubnetId The ARM resource id of the + * virtual network subnet. * - * For Database auditing policy, specific Actions can also be specified (note - * that Actions cannot be specified for Server auditing policy). The supported - * actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES + * @param {boolean} [parameters.ignoreMissingVnetServiceEndpoint] Create + * firewall rule before the virtual network has vnet service endpoint enabled. * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} + * @param {object} [options] Optional Parameters. * - * Note that in the above format can refer to an object like a table, - * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, - * respectively. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob - * storage subscription Id. + * {Promise} A promise is returned. * - * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether - * storageAccountAccessKey value is the storage's secondary key. + * @resolve {VirtualNetworkRule} - The deserialized result object. * - * @param {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether - * audit events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - * and 'IsAzureMonitorTargetEnabled' as true. + * @reject {Error|ServiceError} - The error object. * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be - * also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * {VirtualNetworkRule} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualNetworkRule} 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, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, parameters: models.VirtualNetworkRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes the virtual network rule 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 + * Manager API or the portal. + * + * @param {string} serverName The name of the server. * + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * * @param {object} [options] Optional Parameters. * @@ -17036,14 +17066,14 @@ export interface ExtendedServerBlobAuditingPolicies { * * @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.ExtendedServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an extended server's blob auditing policy. + * Deletes the virtual network rule 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 @@ -17051,125 +17081,140 @@ export interface ExtendedServerBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {object} parameters Properties of extended blob auditing policy + * @param {string} virtualNetworkRuleName The name of the virtual network rule. * - * @param {string} [parameters.predicateExpression] Specifies condition of - * where clause when creating an audit. + * @param {object} [options] Optional Parameters. * - * @param {string} parameters.state Specifies the state of the policy. If state - * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. - * Possible values include: 'Enabled', 'Disabled' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.storageEndpoint] Specifies the blob storage - * endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is - * Enabled, storageEndpoint is required. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the auditing storage account. If state is Enabled and - * storageEndpoint is specified, storageAccountAccessKey is required. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {number} [parameters.retentionDays] Specifies the number of days to - * keep in the audit logs in the storage account. + * {Promise} A promise is returned. * - * @param {array} [parameters.auditActionsAndGroups] Specifies the - * Actions-Groups and Actions to audit. + * @resolve {null} - The deserialized result object. * - * The recommended set of action groups to use is the following combination - - * this will audit all the queries and stored procedures executed against the - * database, as well as successful and failed logins: + * @reject {Error|ServiceError} - The error object. * - * BATCH_COMPLETED_GROUP, - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, - * FAILED_DATABASE_AUTHENTICATION_GROUP. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * This above combination is also the set that is configured by default when - * enabling auditing from the Azure portal. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * The supported action groups to audit are (note: choose only specific groups - * that cover your auditing needs. Using unnecessary groups could lead to very - * large quantities of audit records): + * {null} [result] - The deserialized result object if an error did not occur. * - * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP - * BACKUP_RESTORE_GROUP - * DATABASE_LOGOUT_GROUP - * DATABASE_OBJECT_CHANGE_GROUP - * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP - * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP - * DATABASE_OPERATION_GROUP - * DATABASE_PERMISSION_CHANGE_GROUP - * DATABASE_PRINCIPAL_CHANGE_GROUP - * DATABASE_PRINCIPAL_IMPERSONATION_GROUP - * DATABASE_ROLE_MEMBER_CHANGE_GROUP - * FAILED_DATABASE_AUTHENTICATION_GROUP - * SCHEMA_OBJECT_ACCESS_GROUP - * SCHEMA_OBJECT_CHANGE_GROUP - * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP - * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP - * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP - * USER_CHANGE_PASSWORD_GROUP - * BATCH_STARTED_GROUP - * BATCH_COMPLETED_GROUP + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * These are groups that cover all sql statements and stored procedures - * executed against the database, and should not be used in combination with - * other groups as this will result in duplicate audit logs. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, serverName: string, virtualNetworkRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of virtual network rules in a server. * - * For more information, see [Database-Level Audit Action - * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * For Database auditing policy, specific Actions can also be specified (note - * that Actions cannot be specified for Server auditing policy). The supported - * actions to audit are: - * SELECT - * UPDATE - * INSERT - * DELETE - * EXECUTE - * RECEIVE - * REFERENCES + * @param {object} [options] Optional Parameters. * - * The general form for defining an action to be audited is: - * {action} ON {object} BY {principal} + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * Note that in the above format can refer to an object like a table, - * view, or stored procedure, or an entire database or schema. For the latter - * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, - * respectively. + * @returns {Promise} A promise is returned * - * For example: - * SELECT on dbo.myTable by public - * SELECT on DATABASE::myDatabase by public - * SELECT on SCHEMA::mySchema by public + * @resolve {HttpOperationResponse} - The deserialized result object. * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * @reject {Error|ServiceError} - The error object. + */ + listByServerNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of virtual network rules in a server. * - * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob - * storage subscription Id. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether - * storageAccountAccessKey value is the storage's secondary key. + * @param {object} [options] Optional Parameters. * - * @param {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether - * audit events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - * and 'IsAzureMonitorTargetEnabled' as true. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be - * also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * {Promise} A promise is returned. + * + * @resolve {VirtualNetworkRuleListResult} - 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. + * + * {VirtualNetworkRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualNetworkRuleListResult} 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 + * ExtendedDatabaseBlobAuditingPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ExtendedDatabaseBlobAuditingPolicies { + + + /** + * Gets an extended database's blob auditing 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 an extended database's blob auditing 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. * @@ -17183,7 +17228,7 @@ export interface ExtendedServerBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {ExtendedServerBlobAuditingPolicy} - The deserialized result object. + * @resolve {ExtendedDatabaseBlobAuditingPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17191,21 +17236,21 @@ export interface ExtendedServerBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExtendedServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ExtendedServerBlobAuditingPolicy} for more + * {ExtendedDatabaseBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ExtendedDatabaseBlobAuditingPolicy} 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.ExtendedServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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; /** - * Creates or updates an extended server's blob auditing policy. + * Creates or updates an extended database's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -17213,7 +17258,9 @@ export interface ExtendedServerBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {object} parameters Properties of extended blob auditing policy + * @param {string} databaseName The name of the database. + * + * @param {object} parameters The extended database blob auditing policy. * * @param {string} [parameters.predicateExpression] Specifies condition of * where clause when creating an audit. @@ -17340,14 +17387,14 @@ export interface ExtendedServerBlobAuditingPolicies { * * @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, parameters: models.ExtendedServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.ExtendedDatabaseBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an extended server's blob auditing policy. + * Creates or updates an extended database's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -17355,7 +17402,9 @@ export interface ExtendedServerBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {object} parameters Properties of extended blob auditing policy + * @param {string} databaseName The name of the database. + * + * @param {object} parameters The extended database blob auditing policy. * * @param {string} [parameters.predicateExpression] Specifies condition of * where clause when creating an audit. @@ -17487,7 +17536,7 @@ export interface ExtendedServerBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {ExtendedServerBlobAuditingPolicy} - The deserialized result object. + * @resolve {ExtendedDatabaseBlobAuditingPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17495,30 +17544,30 @@ export interface ExtendedServerBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExtendedServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ExtendedServerBlobAuditingPolicy} for more + * {ExtendedDatabaseBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ExtendedDatabaseBlobAuditingPolicy} 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, parameters: models.ExtendedServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.ExtendedDatabaseBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.ExtendedDatabaseBlobAuditingPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.ExtendedDatabaseBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * ServerBlobAuditingPolicies + * ExtendedServerBlobAuditingPolicies * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface ServerBlobAuditingPolicies { +export interface ExtendedServerBlobAuditingPolicies { /** - * Gets a server's blob auditing policy. + * Gets an extended server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -17533,14 +17582,14 @@ export interface ServerBlobAuditingPolicies { * * @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>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a server's blob auditing policy. + * Gets an extended server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -17560,7 +17609,7 @@ export interface ServerBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {ServerBlobAuditingPolicy} - The deserialized result object. + * @resolve {ExtendedServerBlobAuditingPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17568,21 +17617,21 @@ export interface ServerBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ServerBlobAuditingPolicy} for more + * {ExtendedServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ExtendedServerBlobAuditingPolicy} 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, 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; - - + 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 a server's blob auditing policy. + * Creates or updates an extended server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -17590,7 +17639,10 @@ export interface ServerBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {object} parameters Properties of blob auditing policy + * @param {object} parameters Properties of extended blob auditing policy + * + * @param {string} [parameters.predicateExpression] Specifies condition of + * where clause when creating an audit. * * @param {string} parameters.state Specifies the state of the policy. If state * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. @@ -17714,14 +17766,14 @@ export interface ServerBlobAuditingPolicies { * * @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.ServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a server's blob auditing policy. + * Creates or updates an extended server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -17729,7 +17781,10 @@ export interface ServerBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {object} parameters Properties of blob auditing policy + * @param {object} parameters Properties of extended blob auditing policy + * + * @param {string} [parameters.predicateExpression] Specifies condition of + * where clause when creating an audit. * * @param {string} parameters.state Specifies the state of the policy. If state * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. @@ -17858,7 +17913,7 @@ export interface ServerBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {ServerBlobAuditingPolicy} - The deserialized result object. + * @resolve {ExtendedServerBlobAuditingPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -17866,21 +17921,21 @@ export interface ServerBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ServerBlobAuditingPolicy} for more + * {ExtendedServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ExtendedServerBlobAuditingPolicy} 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.ServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerBlobAuditingPolicy, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a server's blob auditing policy. + * Creates or updates an extended server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -17888,7 +17943,10 @@ export interface ServerBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {object} parameters Properties of blob auditing policy + * @param {object} parameters Properties of extended blob auditing policy + * + * @param {string} [parameters.predicateExpression] Specifies condition of + * where clause when creating an audit. * * @param {string} parameters.state Specifies the state of the policy. If state * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. @@ -18012,14 +18070,14 @@ export interface ServerBlobAuditingPolicies { * * @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, parameters: models.ServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a server's blob auditing policy. + * Creates or updates an extended server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18027,7 +18085,10 @@ export interface ServerBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {object} parameters Properties of blob auditing policy + * @param {object} parameters Properties of extended blob auditing policy + * + * @param {string} [parameters.predicateExpression] Specifies condition of + * where clause when creating an audit. * * @param {string} parameters.state Specifies the state of the policy. If state * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. @@ -18156,7 +18217,7 @@ export interface ServerBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {ServerBlobAuditingPolicy} - The deserialized result object. + * @resolve {ExtendedServerBlobAuditingPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18164,30 +18225,30 @@ export interface ServerBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ServerBlobAuditingPolicy} for more + * {ExtendedServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ExtendedServerBlobAuditingPolicy} 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, parameters: models.ServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerBlobAuditingPolicy, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ExtendedServerBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * DatabaseBlobAuditingPolicies + * ServerBlobAuditingPolicies * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface DatabaseBlobAuditingPolicies { +export interface ServerBlobAuditingPolicies { /** - * Gets a database's blob auditing policy. + * Gets a server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18195,8 +18256,6 @@ export interface DatabaseBlobAuditingPolicies { * * @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 @@ -18204,14 +18263,14 @@ export interface DatabaseBlobAuditingPolicies { * * @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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's blob auditing policy. + * Gets a server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18219,8 +18278,6 @@ export interface DatabaseBlobAuditingPolicies { * * @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 @@ -18233,7 +18290,7 @@ export interface DatabaseBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {DatabaseBlobAuditingPolicy} - The deserialized result object. + * @resolve {ServerBlobAuditingPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18241,21 +18298,21 @@ export interface DatabaseBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseBlobAuditingPolicy} for more + * {ServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ServerBlobAuditingPolicy} 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; + 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 a database's blob auditing policy. + * Creates or updates a server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18263,9 +18320,7 @@ export interface DatabaseBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. - * - * @param {object} parameters The database blob auditing policy. + * @param {object} parameters Properties of blob auditing policy * * @param {string} parameters.state Specifies the state of the policy. If state * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. @@ -18389,14 +18444,14 @@ export interface DatabaseBlobAuditingPolicies { * * @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.DatabaseBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a database's blob auditing policy. + * Creates or updates a server's blob auditing policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18404,9 +18459,7 @@ export interface DatabaseBlobAuditingPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. - * - * @param {object} parameters The database blob auditing policy. + * @param {object} parameters Properties of blob auditing policy * * @param {string} parameters.state Specifies the state of the policy. If state * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. @@ -18493,35 +18546,3997 @@ export interface DatabaseBlobAuditingPolicies { * SELECT on DATABASE::myDatabase by public * SELECT on SCHEMA::mySchema by public * - * For more information, see [Database-Level Audit - * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * + * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob + * storage subscription Id. + * + * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether + * storageAccountAccessKey value is the storage's secondary key. + * + * @param {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether + * audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' + * and 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be + * also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * + * + * @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 {ServerBlobAuditingPolicy} - 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. + * + * {ServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ServerBlobAuditingPolicy} 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.ServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerBlobAuditingPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a server's blob auditing 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 {object} parameters Properties of blob auditing policy + * + * @param {string} parameters.state Specifies the state of the policy. If state + * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is + * Enabled, storageEndpoint is required. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the auditing storage account. If state is Enabled and + * storageEndpoint is specified, storageAccountAccessKey is required. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the audit logs in the storage account. + * + * @param {array} [parameters.auditActionsAndGroups] Specifies the + * Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination - + * this will audit all the queries and stored procedures executed against the + * database, as well as successful and failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when + * enabling auditing from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific groups + * that cover your auditing needs. Using unnecessary groups could lead to very + * large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures + * executed against the database, and should not be used in combination with + * other groups as this will result in duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified (note + * that Actions cannot be specified for Server auditing policy). The supported + * actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a table, + * view, or stored procedure, or an entire database or schema. For the latter + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, + * respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * + * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob + * storage subscription Id. + * + * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether + * storageAccountAccessKey value is the storage's secondary key. + * + * @param {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether + * audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' + * and 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be + * also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * + * + * @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, parameters: models.ServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a server's blob auditing 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 {object} parameters Properties of blob auditing policy + * + * @param {string} parameters.state Specifies the state of the policy. If state + * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is + * Enabled, storageEndpoint is required. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the auditing storage account. If state is Enabled and + * storageEndpoint is specified, storageAccountAccessKey is required. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the audit logs in the storage account. + * + * @param {array} [parameters.auditActionsAndGroups] Specifies the + * Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination - + * this will audit all the queries and stored procedures executed against the + * database, as well as successful and failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when + * enabling auditing from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific groups + * that cover your auditing needs. Using unnecessary groups could lead to very + * large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures + * executed against the database, and should not be used in combination with + * other groups as this will result in duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified (note + * that Actions cannot be specified for Server auditing policy). The supported + * actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a table, + * view, or stored procedure, or an entire database or schema. For the latter + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, + * respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * + * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob + * storage subscription Id. + * + * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether + * storageAccountAccessKey value is the storage's secondary key. + * + * @param {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether + * audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' + * and 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be + * also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * + * + * @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 {ServerBlobAuditingPolicy} - 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. + * + * {ServerBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ServerBlobAuditingPolicy} 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, parameters: models.ServerBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerBlobAuditingPolicy, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * DatabaseBlobAuditingPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface DatabaseBlobAuditingPolicies { + + + /** + * Gets a database's blob auditing 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 blob auditing 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 {DatabaseBlobAuditingPolicy} - 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. + * + * {DatabaseBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseBlobAuditingPolicy} 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; + + + /** + * Creates or updates a database's blob auditing 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 database blob auditing policy. + * + * @param {string} parameters.state Specifies the state of the policy. If state + * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is + * Enabled, storageEndpoint is required. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the auditing storage account. If state is Enabled and + * storageEndpoint is specified, storageAccountAccessKey is required. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the audit logs in the storage account. + * + * @param {array} [parameters.auditActionsAndGroups] Specifies the + * Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination - + * this will audit all the queries and stored procedures executed against the + * database, as well as successful and failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when + * enabling auditing from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific groups + * that cover your auditing needs. Using unnecessary groups could lead to very + * large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures + * executed against the database, and should not be used in combination with + * other groups as this will result in duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified (note + * that Actions cannot be specified for Server auditing policy). The supported + * actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a table, + * view, or stored procedure, or an entire database or schema. For the latter + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, + * respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * + * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob + * storage subscription Id. + * + * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether + * storageAccountAccessKey value is the storage's secondary key. + * + * @param {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether + * audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' + * and 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be + * also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * + * + * @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.DatabaseBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a database's blob auditing 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 database blob auditing policy. + * + * @param {string} parameters.state Specifies the state of the policy. If state + * is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. + * Possible values include: 'Enabled', 'Disabled' + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is + * Enabled, storageEndpoint is required. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the auditing storage account. If state is Enabled and + * storageEndpoint is specified, storageAccountAccessKey is required. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the audit logs in the storage account. + * + * @param {array} [parameters.auditActionsAndGroups] Specifies the + * Actions-Groups and Actions to audit. + * + * The recommended set of action groups to use is the following combination - + * this will audit all the queries and stored procedures executed against the + * database, as well as successful and failed logins: + * + * BATCH_COMPLETED_GROUP, + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, + * FAILED_DATABASE_AUTHENTICATION_GROUP. + * + * This above combination is also the set that is configured by default when + * enabling auditing from the Azure portal. + * + * The supported action groups to audit are (note: choose only specific groups + * that cover your auditing needs. Using unnecessary groups could lead to very + * large quantities of audit records): + * + * APPLICATION_ROLE_CHANGE_PASSWORD_GROUP + * BACKUP_RESTORE_GROUP + * DATABASE_LOGOUT_GROUP + * DATABASE_OBJECT_CHANGE_GROUP + * DATABASE_OBJECT_OWNERSHIP_CHANGE_GROUP + * DATABASE_OBJECT_PERMISSION_CHANGE_GROUP + * DATABASE_OPERATION_GROUP + * DATABASE_PERMISSION_CHANGE_GROUP + * DATABASE_PRINCIPAL_CHANGE_GROUP + * DATABASE_PRINCIPAL_IMPERSONATION_GROUP + * DATABASE_ROLE_MEMBER_CHANGE_GROUP + * FAILED_DATABASE_AUTHENTICATION_GROUP + * SCHEMA_OBJECT_ACCESS_GROUP + * SCHEMA_OBJECT_CHANGE_GROUP + * SCHEMA_OBJECT_OWNERSHIP_CHANGE_GROUP + * SCHEMA_OBJECT_PERMISSION_CHANGE_GROUP + * SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP + * USER_CHANGE_PASSWORD_GROUP + * BATCH_STARTED_GROUP + * BATCH_COMPLETED_GROUP + * + * These are groups that cover all sql statements and stored procedures + * executed against the database, and should not be used in combination with + * other groups as this will result in duplicate audit logs. + * + * For more information, see [Database-Level Audit Action + * Groups](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups). + * + * For Database auditing policy, specific Actions can also be specified (note + * that Actions cannot be specified for Server auditing policy). The supported + * actions to audit are: + * SELECT + * UPDATE + * INSERT + * DELETE + * EXECUTE + * RECEIVE + * REFERENCES + * + * The general form for defining an action to be audited is: + * {action} ON {object} BY {principal} + * + * Note that in the above format can refer to an object like a table, + * view, or stored procedure, or an entire database or schema. For the latter + * cases, the forms DATABASE::{db_name} and SCHEMA::{schema_name} are used, + * respectively. + * + * For example: + * SELECT on dbo.myTable by public + * SELECT on DATABASE::myDatabase by public + * SELECT on SCHEMA::mySchema by public + * + * For more information, see [Database-Level Audit + * Actions](https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions) + * + * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob + * storage subscription Id. + * + * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether + * storageAccountAccessKey value is the storage's secondary key. + * + * @param {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether + * audit events are sent to Azure Monitor. + * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' + * and 'IsAzureMonitorTargetEnabled' as true. + * + * When using REST API to configure auditing, Diagnostic Settings with + * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be + * also created. + * Note that for server level audit you should use the 'master' database as + * {databaseName}. + * + * Diagnostic Settings URI format: + * PUT + * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * + * For more information, see [Diagnostic Settings REST + * API](https://go.microsoft.com/fwlink/?linkid=2033207) + * or [Diagnostic Settings + * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * + * + * @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 {DatabaseBlobAuditingPolicy} - 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. + * + * {DatabaseBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link DatabaseBlobAuditingPolicy} 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.DatabaseBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.DatabaseBlobAuditingPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.DatabaseBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * DatabaseVulnerabilityAssessmentRuleBaselines + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface DatabaseVulnerabilityAssessmentRuleBaselines { + + + /** + * 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} serverName The name of the server. + * + * @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. + */ + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, options?: { 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} serverName The name of the server. + * + * @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 {DatabaseVulnerabilityAssessmentRuleBaseline} - 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. + * + * {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, serverName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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 + * Manager API or the portal. + * + * @param {string} serverName The name of the server. + * + * @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 {array} parameters.baselineResults The rule baseline result + * + * @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, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * 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 + * Manager API or the portal. + * + * @param {string} serverName The name of the server. + * + * @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 {array} parameters.baselineResults The rule baseline result + * + * @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 {DatabaseVulnerabilityAssessmentRuleBaseline} - 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. + * + * {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, serverName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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} serverName The name of the server. + * + * @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, serverName: 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} serverName The name of the server. + * + * @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, serverName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * DatabaseVulnerabilityAssessments + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface DatabaseVulnerabilityAssessments { + + + /** + * 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} serverName The name of the server. + * + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. + * + * @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 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} serverName The name of the server. + * + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. + * + * @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. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {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. + * + * {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; + + + /** + * 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} serverName The name of the server. + * + * @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. + * + * @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.DatabaseVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * 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} serverName The name of the server. + * + * @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. + * + * @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. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {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. + * + * {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.DatabaseVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * 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} serverName The name of the server. + * + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. + * + * @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, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * 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} serverName The name of the server. + * + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. + * + * @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, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param {string} resourceGroupName The name of the resource group that + * contains the resource. You can obtain this value from the Azure Resource + * Manager API or the portal. + * + * @param {string} serverName The name of the server. + * + * @param {string} databaseName The name of the database for which the + * vulnerability assessment policies are defined. + * + * @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>; + + /** + * Lists the vulnerability assessment policies associated with a database. + * + * @param {string} resourceGroupName The name of the resource group that + * contains the resource. You can obtain this value from the Azure Resource + * Manager API or the portal. + * + * @param {string} serverName The name of the server. + * + * @param {string} databaseName The name of the database for which the + * vulnerability assessment policies are defined. + * + * @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 {DatabaseVulnerabilityAssessmentListResult} - 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. + * + * {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. + */ + 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; + + + /** + * Lists the vulnerability assessment policies associated with a 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|ServiceError} - The error object. + */ + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists the vulnerability assessment policies associated with a 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 {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 {DatabaseVulnerabilityAssessmentListResult} - 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. + * + * {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. + */ + 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 + * JobAgents + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface JobAgents { + + + /** + * Gets a list of job agents in 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>; + + /** + * Gets a list of job agents in 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 {JobAgentListResult} - 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. + * + * {JobAgentListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobAgentListResult} 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; + + + /** + * Gets a job agent. + * + * @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} jobAgentName The name of the job agent to be retrieved. + * + * @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, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a job agent. + * + * @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} jobAgentName The name of the job agent to be retrieved. + * + * @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 {JobAgent} - 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. + * + * {JobAgent} [result] - The deserialized result object if an error did not occur. + * See {@link JobAgent} 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, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a job agent. + * + * @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} jobAgentName The name of the job agent to be created or + * updated. + * + * @param {object} parameters The requested job agent resource state. + * + * @param {object} [parameters.sku] The name and tier of the SKU. + * + * @param {string} parameters.sku.name The name of the SKU. Ex - P3. It is + * typically a letter+number code + * + * @param {string} [parameters.sku.tier] This field is required to be + * implemented by the Resource Provider if the service has more than one tier, + * but is not required on a PUT. + * + * @param {string} [parameters.sku.size] The SKU size. When the name field is + * the combination of tier and some other value, this would be the standalone + * code. + * + * @param {string} [parameters.sku.family] If the service has different + * generations of hardware, for the same SKU, then that can be captured here. + * + * @param {number} [parameters.sku.capacity] If the SKU supports scale out/in + * then the capacity integer should be included. If scale out/in is not + * possible for the resource this may be omitted. + * + * @param {string} parameters.databaseId Resource ID of the database to store + * job metadata in. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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, jobAgentName: string, parameters: models.JobAgent, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a job agent. + * + * @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} jobAgentName The name of the job agent to be created or + * updated. + * + * @param {object} parameters The requested job agent resource state. + * + * @param {object} [parameters.sku] The name and tier of the SKU. + * + * @param {string} parameters.sku.name The name of the SKU. Ex - P3. It is + * typically a letter+number code + * + * @param {string} [parameters.sku.tier] This field is required to be + * implemented by the Resource Provider if the service has more than one tier, + * but is not required on a PUT. + * + * @param {string} [parameters.sku.size] The SKU size. When the name field is + * the combination of tier and some other value, this would be the standalone + * code. + * + * @param {string} [parameters.sku.family] If the service has different + * generations of hardware, for the same SKU, then that can be captured here. + * + * @param {number} [parameters.sku.capacity] If the SKU supports scale out/in + * then the capacity integer should be included. If scale out/in is not + * possible for the resource this may be omitted. + * + * @param {string} parameters.databaseId Resource ID of the database to store + * job metadata in. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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 {JobAgent} - 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. + * + * {JobAgent} [result] - The deserialized result object if an error did not occur. + * See {@link JobAgent} 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, jobAgentName: string, parameters: models.JobAgent, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgent, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgent, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a job agent. + * + * @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} jobAgentName The name of the job agent to be deleted. + * + * @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, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a job agent. + * + * @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} jobAgentName The name of the job agent to be deleted. + * + * @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, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates a job agent. + * + * @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} jobAgentName The name of the job agent to be updated. + * + * @param {object} parameters The update to the job agent. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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, jobAgentName: string, parameters: models.JobAgentUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates a job agent. + * + * @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} jobAgentName The name of the job agent to be updated. + * + * @param {object} parameters The update to the job agent. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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 {JobAgent} - 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. + * + * {JobAgent} [result] - The deserialized result object if an error did not occur. + * See {@link JobAgent} 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, jobAgentName: string, parameters: models.JobAgentUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgentUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgentUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a job agent. + * + * @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} jobAgentName The name of the job agent to be created or + * updated. + * + * @param {object} parameters The requested job agent resource state. + * + * @param {object} [parameters.sku] The name and tier of the SKU. + * + * @param {string} parameters.sku.name The name of the SKU. Ex - P3. It is + * typically a letter+number code + * + * @param {string} [parameters.sku.tier] This field is required to be + * implemented by the Resource Provider if the service has more than one tier, + * but is not required on a PUT. + * + * @param {string} [parameters.sku.size] The SKU size. When the name field is + * the combination of tier and some other value, this would be the standalone + * code. + * + * @param {string} [parameters.sku.family] If the service has different + * generations of hardware, for the same SKU, then that can be captured here. + * + * @param {number} [parameters.sku.capacity] If the SKU supports scale out/in + * then the capacity integer should be included. If scale out/in is not + * possible for the resource this may be omitted. + * + * @param {string} parameters.databaseId Resource ID of the database to store + * job metadata in. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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, jobAgentName: string, parameters: models.JobAgent, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a job agent. + * + * @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} jobAgentName The name of the job agent to be created or + * updated. + * + * @param {object} parameters The requested job agent resource state. + * + * @param {object} [parameters.sku] The name and tier of the SKU. + * + * @param {string} parameters.sku.name The name of the SKU. Ex - P3. It is + * typically a letter+number code + * + * @param {string} [parameters.sku.tier] This field is required to be + * implemented by the Resource Provider if the service has more than one tier, + * but is not required on a PUT. + * + * @param {string} [parameters.sku.size] The SKU size. When the name field is + * the combination of tier and some other value, this would be the standalone + * code. + * + * @param {string} [parameters.sku.family] If the service has different + * generations of hardware, for the same SKU, then that can be captured here. + * + * @param {number} [parameters.sku.capacity] If the SKU supports scale out/in + * then the capacity integer should be included. If scale out/in is not + * possible for the resource this may be omitted. + * + * @param {string} parameters.databaseId Resource ID of the database to store + * job metadata in. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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 {JobAgent} - 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. + * + * {JobAgent} [result] - The deserialized result object if an error did not occur. + * See {@link JobAgent} 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, jobAgentName: string, parameters: models.JobAgent, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgent, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgent, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a job agent. + * + * @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} jobAgentName The name of the job agent to be deleted. + * + * @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, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a job agent. + * + * @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} jobAgentName The name of the job agent to be deleted. + * + * @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, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates a job agent. + * + * @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} jobAgentName The name of the job agent to be updated. + * + * @param {object} parameters The update to the job agent. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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, jobAgentName: string, parameters: models.JobAgentUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates a job agent. + * + * @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} jobAgentName The name of the job agent to be updated. + * + * @param {object} parameters The update to the job agent. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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 {JobAgent} - 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. + * + * {JobAgent} [result] - The deserialized result object if an error did not occur. + * See {@link JobAgent} 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, jobAgentName: string, parameters: models.JobAgentUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgentUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgentUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of job agents in 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>; + + /** + * Gets a list of job agents in 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 {JobAgentListResult} - 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. + * + * {JobAgentListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobAgentListResult} 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 + * JobCredentials + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface JobCredentials { + + + /** + * Gets a list of jobs credentials. + * + * @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} jobAgentName The name of the job agent. + * + * @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. + */ + listByAgentWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of jobs credentials. + * + * @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} jobAgentName The name of the job agent. + * + * @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 {JobCredentialListResult} - 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. + * + * {JobCredentialListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobCredentialListResult} 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. + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a jobs credential. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} credentialName The name of the credential. + * + * @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, jobAgentName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a jobs credential. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} credentialName The name of the credential. + * + * @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 {JobCredential} - 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. + * + * {JobCredential} [result] - The deserialized result object if an error did not occur. + * See {@link JobCredential} 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, jobAgentName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a job credential. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} credentialName The name of the credential. + * + * @param {object} parameters The requested job credential state. + * + * @param {string} parameters.username The credential user name. + * + * @param {string} parameters.password The credential 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. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, parameters: models.JobCredential, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a job credential. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} credentialName The name of the credential. + * + * @param {object} parameters The requested job credential state. + * + * @param {string} parameters.username The credential user name. + * + * @param {string} parameters.password The credential 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 {JobCredential} - 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. + * + * {JobCredential} [result] - The deserialized result object if an error did not occur. + * See {@link JobCredential} 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, jobAgentName: string, credentialName: string, parameters: models.JobCredential, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, parameters: models.JobCredential, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, parameters: models.JobCredential, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a job credential. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} credentialName The name of the credential. + * + * @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, serverName: string, jobAgentName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a job credential. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} credentialName The name of the credential. + * + * @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, serverName: string, jobAgentName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of jobs credentials. + * + * @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. + */ + listByAgentNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of jobs credentials. + * + * @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 {JobCredentialListResult} - 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. + * + * {JobCredentialListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobCredentialListResult} 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. + */ + listByAgentNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAgentNext(nextPageLink: string, callback: ServiceCallback): void; + listByAgentNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * JobExecutions + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface JobExecutions { + + + /** + * Lists all executions in a job agent. + * + * @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} jobAgentName The name of the job agent. + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from 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. + */ + listByAgentWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all executions in a job agent. + * + * @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} jobAgentName The name of the job agent. + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from 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 {JobExecutionListResult} - 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. + * + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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. + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Requests cancellation of a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job. + * + * @param {uuid} jobExecutionId The id of the job execution to cancel. + * + * @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. + */ + cancelWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Requests cancellation of a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job. + * + * @param {uuid} jobExecutionId The id of the job execution to cancel. + * + * @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. + */ + cancel(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + cancel(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; + cancel(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Starts an elastic job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Starts an elastic job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @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 {JobExecution} - 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. + * + * {JobExecution} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecution} 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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; + create(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists a job's executions. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from 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. + */ + listByJobWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists a job's executions. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from 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 {JobExecutionListResult} - 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. + * + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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. + */ + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job. + * + * @param {uuid} jobExecutionId The id of the job execution + * + * @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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job. + * + * @param {uuid} jobExecutionId The id of the job execution + * + * @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 {JobExecution} - 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. + * + * {JobExecution} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecution} 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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The job execution id to create the job + * execution under. + * + * @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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The job execution id to create the job + * execution under. + * + * @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 {JobExecution} - 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. + * + * {JobExecution} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecution} 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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Starts an elastic job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @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, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Starts an elastic job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @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 {JobExecution} - 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. + * + * {JobExecution} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecution} 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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The job execution id to create the job + * execution under. + * + * @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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The job execution id to create the job + * execution under. + * + * @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 {JobExecution} - 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. + * + * {JobExecution} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecution} 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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all executions in a job agent. + * + * @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. + */ + listByAgentNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists all executions in a job agent. + * + * @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 {JobExecutionListResult} - 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. + * + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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. + */ + listByAgentNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAgentNext(nextPageLink: string, callback: ServiceCallback): void; + listByAgentNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists a job's executions. + * + * @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. + */ + listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists a job's executions. + * + * @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 {JobExecutionListResult} - 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. + * + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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. + */ + listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobNext(nextPageLink: string, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * Jobs + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface Jobs { + + + /** + * Gets a list of jobs. + * + * @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} jobAgentName The name of the job agent. + * + * @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. + */ + listByAgentWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of jobs. + * + * @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} jobAgentName The name of the job agent. + * + * @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 {JobListResult} - 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. + * + * {JobListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobListResult} 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. + */ + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a job. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a job. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @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 {Job} - 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. + * + * {Job} [result] - The deserialized result object if an error did not occur. + * See {@link Job} 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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a job. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {object} parameters The requested job state. + * + * @param {string} [parameters.description] User-defined description of the + * job. + * + * @param {object} [parameters.schedule] Schedule properties of the job. + * + * @param {date} [parameters.schedule.startTime] Schedule start time. + * + * @param {date} [parameters.schedule.endTime] Schedule end time. + * + * @param {string} [parameters.schedule.type] Schedule interval type. Possible + * values include: 'Once', 'Recurring' + * + * @param {boolean} [parameters.schedule.enabled] Whether or not the schedule + * is enabled. + * + * @param {string} [parameters.schedule.interval] Value of the schedule's + * recurring interval, if the schedule type is recurring. ISO8601 duration + * format. + * + * @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, jobAgentName: string, jobName: string, parameters: models.Job, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a job. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {object} parameters The requested job state. + * + * @param {string} [parameters.description] User-defined description of the + * job. + * + * @param {object} [parameters.schedule] Schedule properties of the job. + * + * @param {date} [parameters.schedule.startTime] Schedule start time. + * + * @param {date} [parameters.schedule.endTime] Schedule end time. + * + * @param {string} [parameters.schedule.type] Schedule interval type. Possible + * values include: 'Once', 'Recurring' + * + * @param {boolean} [parameters.schedule.enabled] Whether or not the schedule + * is enabled. + * + * @param {string} [parameters.schedule.interval] Value of the schedule's + * recurring interval, if the schedule type is recurring. ISO8601 duration + * format. + * + * @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 {Job} - 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. + * + * {Job} [result] - The deserialized result object if an error did not occur. + * See {@link Job} 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, jobAgentName: string, jobName: string, parameters: models.Job, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, parameters: models.Job, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, parameters: models.Job, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes a job. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to delete. + * + * @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, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes a job. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to delete. + * + * @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, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of jobs. + * + * @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. + */ + listByAgentNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of jobs. + * + * @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 {JobListResult} - 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. + * + * {JobListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobListResult} 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. + */ + listByAgentNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAgentNext(nextPageLink: string, callback: ServiceCallback): void; + listByAgentNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * JobStepExecutions + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface JobStepExecutions { + + + /** + * Lists the step executions of a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The id of the job execution + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from 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. + */ + listByJobExecutionWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists the step executions of a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The id of the job execution + * + * @param {object} [options] Optional Parameters. + * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from 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 {JobExecutionListResult} - 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. + * + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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. + */ + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a step execution of a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The unique id of the job execution + * + * @param {string} stepName The name of the step. + * + * @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, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a step execution of a job execution. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The unique id of the job execution + * + * @param {string} stepName The name of the step. + * + * @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 {JobExecution} - 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. + * + * {JobExecution} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecution} 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, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists the step executions of a job execution. + * + * @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. + */ + listByJobExecutionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists the step executions of a job execution. + * + * @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 {JobExecutionListResult} - 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. + * + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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. + */ + listByJobExecutionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobExecutionNext(nextPageLink: string, callback: ServiceCallback): void; + listByJobExecutionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * JobSteps + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface JobSteps { + + + /** + * Gets all job steps in the specified job version. + * + * @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} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {number} jobVersion The version of the job to get. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {uuid} [parameters.storageAccountSubscriptionId] Specifies the blob - * storage subscription Id. + * @returns {Promise} A promise is returned * - * @param {boolean} [parameters.isStorageSecondaryKeyInUse] Specifies whether - * storageAccountAccessKey value is the storage's secondary key. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {boolean} [parameters.isAzureMonitorTargetEnabled] Specifies whether - * audit events are sent to Azure Monitor. - * In order to send the events to Azure Monitor, specify 'State' as 'Enabled' - * and 'IsAzureMonitorTargetEnabled' as true. + * @reject {Error|ServiceError} - The error object. + */ + listByVersionWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all job steps in the specified job version. * - * When using REST API to configure auditing, Diagnostic Settings with - * 'SQLSecurityAuditEvents' diagnostic logs category on the database should be - * also created. - * Note that for server level audit you should use the 'master' database as - * {databaseName}. + * @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. * - * Diagnostic Settings URI format: - * PUT - * https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/providers/microsoft.insights/diagnosticSettings/{settingsName}?api-version=2017-05-01-preview + * @param {string} serverName The name of the server. * - * For more information, see [Diagnostic Settings REST - * API](https://go.microsoft.com/fwlink/?linkid=2033207) - * or [Diagnostic Settings - * PowerShell](https://go.microsoft.com/fwlink/?linkid=2033043) + * @param {string} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. * + * @param {number} jobVersion The version of the job to get. * * @param {object} [options] Optional Parameters. * @@ -18535,7 +22550,7 @@ export interface DatabaseBlobAuditingPolicies { * * {Promise} A promise is returned. * - * @resolve {DatabaseBlobAuditingPolicy} - The deserialized result object. + * @resolve {JobStepListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18543,30 +22558,20 @@ export interface DatabaseBlobAuditingPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {DatabaseBlobAuditingPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseBlobAuditingPolicy} for more - * information. + * {JobStepListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobStepListResult} 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.DatabaseBlobAuditingPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.DatabaseBlobAuditingPolicy, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.DatabaseBlobAuditingPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * DatabaseVulnerabilityAssessmentRuleBaselines - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface DatabaseVulnerabilityAssessmentRuleBaselines { + listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, callback: ServiceCallback): void; + listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a database's vulnerability assessment rule baseline. + * Gets the specified version of a job step. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18574,14 +22579,13 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. + * @param {string} jobAgentName The name of the job agent. * - * @param {string} ruleId The vulnerability assessment rule ID. + * @param {string} jobName The name of the job. * - * @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 {number} jobVersion The version of the job to get. + * + * @param {string} stepName The name of the job step. * * @param {object} [options] Optional Parameters. * @@ -18590,14 +22594,14 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * @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, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getByVersionWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's vulnerability assessment rule baseline. + * Gets the specified version of a job step. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18605,14 +22609,13 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. + * @param {string} jobAgentName The name of the job agent. * - * @param {string} ruleId The vulnerability assessment rule ID. + * @param {string} jobName The name of the job. * - * @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 {number} jobVersion The version of the job to get. + * + * @param {string} stepName The name of the job step. * * @param {object} [options] Optional Parameters. * @@ -18626,7 +22629,7 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. + * @resolve {JobStep} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18634,21 +22637,20 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * {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. + * {JobStep} [result] - The deserialized result object if an error did not occur. + * See {@link JobStep} 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, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, callback: ServiceCallback): void; + getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a database's vulnerability assessment rule baseline. + * Gets all job steps for a job's current version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18656,18 +22658,9 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * @param {string} serverName The name of the server. * - * @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} jobAgentName The name of the job agent. * - * @param {array} parameters.baselineResults The rule baseline result + * @param {string} jobName The name of the job to get. * * @param {object} [options] Optional Parameters. * @@ -18676,14 +22669,14 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * @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, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a database's vulnerability assessment rule baseline. + * Gets all job steps for a job's current version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18691,18 +22684,9 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * @param {string} serverName The name of the server. * - * @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} jobAgentName The name of the job agent. * - * @param {array} parameters.baselineResults The rule baseline result + * @param {string} jobName The name of the job to get. * * @param {object} [options] Optional Parameters. * @@ -18716,7 +22700,7 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. + * @resolve {JobStepListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18724,21 +22708,20 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * {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. + * {JobStepListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobStepListResult} 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, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Removes the database's vulnerability assessment rule baseline. + * Gets a job step in a job's current version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18746,14 +22729,11 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. + * @param {string} jobAgentName The name of the job agent. * - * @param {string} ruleId The vulnerability assessment rule ID. + * @param {string} jobName The name of the job. * - * @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} stepName The name of the job step. * * @param {object} [options] Optional Parameters. * @@ -18762,14 +22742,14 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * @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, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Removes the database's vulnerability assessment rule baseline. + * Gets a job step in a job's current version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18777,14 +22757,11 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. + * @param {string} jobAgentName The name of the job agent. * - * @param {string} ruleId The vulnerability assessment rule ID. + * @param {string} jobName The name of the job. * - * @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} stepName The name of the job step. * * @param {object} [options] Optional Parameters. * @@ -18798,7 +22775,7 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {JobStep} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -18806,28 +22783,21 @@ export interface DatabaseVulnerabilityAssessmentRuleBaselines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {JobStep} [result] - The deserialized result object if an error did not occur. + * See {@link JobStep} 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, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, ruleId: string, baselineName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * DatabaseVulnerabilityAssessments - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface DatabaseVulnerabilityAssessments { + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the database's vulnerability assessment. + * Creates or updates a job step. This will implicitly create a new job + * version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18835,69 +22805,96 @@ export interface DatabaseVulnerabilityAssessments { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * @param {string} jobAgentName The name of the job agent. * - * @param {object} [options] Optional Parameters. + * @param {string} jobName The name of the job. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} stepName The name of the job step. * - * @returns {Promise} A promise is returned + * @param {object} parameters The requested state of the job step. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {number} [parameters.stepId] The job step's index within the job. If + * not specified when creating the job step, it will be created as the last + * step. If not specified when updating the job step, the step id is not + * modified. * - * @reject {Error|ServiceError} - The error object. - */ - getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets the database's vulnerability assessment. + * @param {string} parameters.targetGroup The resource ID of the target group + * that the job step will be executed on. * - * @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.credential The resource ID of the job credential + * that will be used to connect to the targets. + * + * @param {object} parameters.action The action payload of the job step. + * + * @param {string} [parameters.action.type] Type of action being executed by + * the job step. Possible values include: 'TSql' + * + * @param {string} [parameters.action.source] The source of the action to + * execute. Possible values include: 'Inline' + * + * @param {string} parameters.action.value The action value, for example the + * text of the T-SQL script to execute. + * + * @param {object} [parameters.output] Output destination properties of the job + * step. + * + * @param {string} [parameters.output.type] The output destination type. + * Possible values include: 'SqlDatabase' + * + * @param {uuid} [parameters.output.subscriptionId] The output destination + * subscription id. + * + * @param {string} [parameters.output.resourceGroupName] The output destination + * resource group. + * + * @param {string} parameters.output.serverName The output destination server + * name. + * + * @param {string} parameters.output.databaseName The output destination + * database. * - * @param {string} serverName The name of the server. + * @param {string} [parameters.output.schemaName] The output destination + * schema. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * @param {string} parameters.output.tableName The output destination table. * - * @param {object} [options] Optional Parameters. + * @param {string} parameters.output.credential The resource ID of the + * credential to use to connect to the output destination. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} [parameters.executionOptions] Execution options for the job + * step. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {number} [parameters.executionOptions.timeoutSeconds] Execution + * timeout for the job step. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {number} [parameters.executionOptions.retryAttempts] Maximum number + * of times the job step will be reattempted if the first attempt fails. * - * {Promise} A promise is returned. + * @param {number} [parameters.executionOptions.initialRetryIntervalSeconds] + * Initial delay between retries for job step execution. * - * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. + * @param {number} [parameters.executionOptions.maximumRetryIntervalSeconds] + * The maximum amount of time to wait between retries for job step execution. * - * @reject {Error|ServiceError} - The error object. + * @param {number} [parameters.executionOptions.retryIntervalBackoffMultiplier] + * The backoff multiplier for the time between retries. * - * {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 * - * {DatabaseVulnerabilityAssessment} [result] - The deserialized result object if an error did not occur. - * See {@link DatabaseVulnerabilityAssessment} 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. */ - 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; - + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: models.JobStep, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates the database's vulnerability assessment. + * Creates or updates a job step. This will implicitly create a new job + * version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -18905,91 +22902,79 @@ export interface DatabaseVulnerabilityAssessments { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * @param {string} jobAgentName The name of the job agent. * - * @param {object} parameters The requested resource. + * @param {string} jobName The name of the job. * - * @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} stepName The name of the job step. * - * @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 {object} parameters The requested state of the job step. * - * @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 {number} [parameters.stepId] The job step's index within the job. If + * not specified when creating the job step, it will be created as the last + * step. If not specified when updating the job step, the step id is not + * modified. * - * @param {object} [parameters.recurringScans] The recurring scans settings + * @param {string} parameters.targetGroup The resource ID of the target group + * that the job step will be executed on. * - * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans - * state. + * @param {string} parameters.credential The resource ID of the job credential + * that will be used to connect to the targets. * - * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] - * Specifies that the schedule scan notification will be is sent to the - * subscription administrators. + * @param {object} parameters.action The action payload of the job step. * - * @param {array} [parameters.recurringScans.emails] Specifies an array of - * e-mail addresses to which the scan notification is sent. + * @param {string} [parameters.action.type] Type of action being executed by + * the job step. Possible values include: 'TSql' * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.action.source] The source of the action to + * execute. Possible values include: 'Inline' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} parameters.action.value The action value, for example the + * text of the T-SQL script to execute. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.output] Output destination properties of the job + * step. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.output.type] The output destination type. + * Possible values include: 'SqlDatabase' * - * @reject {Error|ServiceError} - The error object. - */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Creates or updates the database's vulnerability assessment. + * @param {uuid} [parameters.output.subscriptionId] The output destination + * subscription id. * - * @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.output.resourceGroupName] The output destination + * resource group. * - * @param {string} serverName The name of the server. + * @param {string} parameters.output.serverName The output destination server + * name. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * @param {string} parameters.output.databaseName The output destination + * database. * - * @param {object} parameters The requested resource. + * @param {string} [parameters.output.schemaName] The output destination + * schema. * - * @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.output.tableName The output destination table. * - * @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.output.credential The resource ID of the + * credential to use to connect to the output destination. * - * @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.executionOptions] Execution options for the job + * step. * - * @param {object} [parameters.recurringScans] The recurring scans settings + * @param {number} [parameters.executionOptions.timeoutSeconds] Execution + * timeout for the job step. * - * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans - * state. + * @param {number} [parameters.executionOptions.retryAttempts] Maximum number + * of times the job step will be reattempted if the first attempt fails. * - * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] - * Specifies that the schedule scan notification will be is sent to the - * subscription administrators. + * @param {number} [parameters.executionOptions.initialRetryIntervalSeconds] + * Initial delay between retries for job step execution. * - * @param {array} [parameters.recurringScans.emails] Specifies an array of - * e-mail addresses to which the scan notification is sent. + * @param {number} [parameters.executionOptions.maximumRetryIntervalSeconds] + * The maximum amount of time to wait between retries for job step execution. + * + * @param {number} [parameters.executionOptions.retryIntervalBackoffMultiplier] + * The backoff multiplier for the time between retries. * * @param {object} [options] Optional Parameters. * @@ -19003,7 +22988,7 @@ export interface DatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. + * @resolve {JobStep} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19011,21 +22996,20 @@ export interface DatabaseVulnerabilityAssessments { * * {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. + * {JobStep} [result] - The deserialized result object if an error did not occur. + * See {@link JobStep} 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.DatabaseVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: models.JobStep, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: models.JobStep, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: models.JobStep, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Removes the database's vulnerability assessment. + * Deletes a job step. This will implicitly create a new job version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19033,8 +23017,11 @@ export interface DatabaseVulnerabilityAssessments { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * @param {string} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job. + * + * @param {string} stepName The name of the job step to delete. * * @param {object} [options] Optional Parameters. * @@ -19047,10 +23034,10 @@ export interface DatabaseVulnerabilityAssessments { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Removes the database's vulnerability assessment. + * Deletes a job step. This will implicitly create a new job version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19058,8 +23045,11 @@ export interface DatabaseVulnerabilityAssessments { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * @param {string} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job. + * + * @param {string} stepName The name of the job step to delete. * * @param {object} [options] Optional Parameters. * @@ -19087,22 +23077,16 @@ export interface DatabaseVulnerabilityAssessments { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the vulnerability assessment policies associated with a database. - * - * @param {string} resourceGroupName The name of the resource group that - * contains the resource. You can obtain this value from the Azure Resource - * Manager API or the portal. - * - * @param {string} serverName The name of the server. + * Gets all job steps in the specified job version. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment policies are defined. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -19111,23 +23095,17 @@ export interface DatabaseVulnerabilityAssessments { * * @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>; + listByVersionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment policies associated with a database. - * - * @param {string} resourceGroupName The name of the resource group that - * contains the resource. You can obtain this value from the Azure Resource - * Manager API or the portal. - * - * @param {string} serverName The name of the server. + * Gets all job steps in the specified job version. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment policies are defined. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -19141,7 +23119,7 @@ export interface DatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {JobStepListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19149,21 +23127,20 @@ export interface DatabaseVulnerabilityAssessments { * * {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. + * {JobStepListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobStepListResult} 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; + listByVersionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByVersionNext(nextPageLink: string, callback: ServiceCallback): void; + listByVersionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the vulnerability assessment policies associated with a database. + * Gets all job steps for a job's current version. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -19175,14 +23152,14 @@ export interface DatabaseVulnerabilityAssessments { * * @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>; + listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment policies associated with a database. + * Gets all job steps for a job's current version. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -19199,7 +23176,7 @@ export interface DatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {JobStepListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19207,30 +23184,29 @@ export interface DatabaseVulnerabilityAssessments { * * {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. - * + * {JobStepListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobStepListResult} 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; + listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobNext(nextPageLink: string, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * JobAgents + * JobTargetExecutions * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface JobAgents { +export interface JobTargetExecutions { /** - * Gets a list of job agents in a server. + * Lists target executions for all steps of a job execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19238,21 +23214,48 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * + * @param {string} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The id of the job execution + * * @param {object} [options] Optional Parameters. * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from 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. */ - listByServerWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobExecutionWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of job agents in a server. + * Lists target executions for all steps of a job execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19260,8 +23263,35 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * + * @param {string} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The id of the job execution + * * @param {object} [options] Optional Parameters. * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from the + * collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -19272,7 +23302,7 @@ export interface JobAgents { * * {Promise} A promise is returned. * - * @resolve {JobAgentListResult} - The deserialized result object. + * @resolve {JobExecutionListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19280,20 +23310,21 @@ export interface JobAgents { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobAgentListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobAgentListResult} for more information. + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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; + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; + listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a job agent. + * Lists the target executions of a job step execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19301,23 +23332,50 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be retrieved. + * @param {string} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The id of the job execution + * + * @param {string} stepName The name of the step. * * @param {object} [options] Optional Parameters. * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from 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. */ - getWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByStepWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a job agent. + * Lists the target executions of a job step execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19325,10 +23383,37 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be retrieved. + * @param {string} jobAgentName The name of the job agent. + * + * @param {string} jobName The name of the job to get. + * + * @param {uuid} jobExecutionId The id of the job execution + * + * @param {string} stepName The name of the step. * * @param {object} [options] Optional Parameters. * + * @param {date} [options.createTimeMin] If specified, only job executions + * created at or after the specified time are included. + * + * @param {date} [options.createTimeMax] If specified, only job executions + * created before the specified time are included. + * + * @param {date} [options.endTimeMin] If specified, only job executions + * completed at or after the specified time are included. + * + * @param {date} [options.endTimeMax] If specified, only job executions + * completed before the specified time are included. + * + * @param {boolean} [options.isActive] If specified, only active or only + * completed job executions are included. + * + * @param {number} [options.skip] The number of elements in the collection to + * skip. + * + * @param {number} [options.top] The number of elements to return from the + * collection. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -19339,7 +23424,7 @@ export interface JobAgents { * * {Promise} A promise is returned. * - * @resolve {JobAgent} - The deserialized result object. + * @resolve {JobExecutionListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19347,20 +23432,21 @@ export interface JobAgents { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobAgent} [result] - The deserialized result object if an error did not occur. - * See {@link JobAgent} for more information. + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; + listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, callback: ServiceCallback): void; + listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a job agent. + * Gets a target execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19368,37 +23454,15 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be created or - * updated. - * - * @param {object} parameters The requested job agent resource state. - * - * @param {object} [parameters.sku] The name and tier of the SKU. - * - * @param {string} parameters.sku.name The name of the SKU. Ex - P3. It is - * typically a letter+number code - * - * @param {string} [parameters.sku.tier] This field is required to be - * implemented by the Resource Provider if the service has more than one tier, - * but is not required on a PUT. - * - * @param {string} [parameters.sku.size] The SKU size. When the name field is - * the combination of tier and some other value, this would be the standalone - * code. - * - * @param {string} [parameters.sku.family] If the service has different - * generations of hardware, for the same SKU, then that can be captured here. + * @param {string} jobAgentName The name of the job agent. * - * @param {number} [parameters.sku.capacity] If the SKU supports scale out/in - * then the capacity integer should be included. If scale out/in is not - * possible for the resource this may be omitted. + * @param {string} jobName The name of the job to get. * - * @param {string} parameters.databaseId Resource ID of the database to store - * job metadata in. + * @param {uuid} jobExecutionId The unique id of the job execution * - * @param {string} parameters.location Resource location. + * @param {string} stepName The name of the step. * - * @param {object} [parameters.tags] Resource tags. + * @param {uuid} targetId The target id. * * @param {object} [options] Optional Parameters. * @@ -19407,14 +23471,14 @@ export interface JobAgents { * * @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, jobAgentName: string, parameters: models.JobAgent, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a job agent. + * Gets a target execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19422,37 +23486,72 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be created or - * updated. + * @param {string} jobAgentName The name of the job agent. * - * @param {object} parameters The requested job agent resource state. + * @param {string} jobName The name of the job to get. * - * @param {object} [parameters.sku] The name and tier of the SKU. + * @param {uuid} jobExecutionId The unique id of the job execution * - * @param {string} parameters.sku.name The name of the SKU. Ex - P3. It is - * typically a letter+number code + * @param {string} stepName The name of the step. * - * @param {string} [parameters.sku.tier] This field is required to be - * implemented by the Resource Provider if the service has more than one tier, - * but is not required on a PUT. + * @param {uuid} targetId The target id. + * + * @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 {JobExecution} - 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. + * + * {JobExecution} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecution} 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, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists target executions for all steps of a job execution. * - * @param {string} [parameters.sku.size] The SKU size. When the name field is - * the combination of tier and some other value, this would be the standalone - * code. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {string} [parameters.sku.family] If the service has different - * generations of hardware, for the same SKU, then that can be captured here. + * @param {object} [options] Optional Parameters. * - * @param {number} [parameters.sku.capacity] If the SKU supports scale out/in - * then the capacity integer should be included. If scale out/in is not - * possible for the resource this may be omitted. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} parameters.databaseId Resource ID of the database to store - * job metadata in. + * @returns {Promise} A promise is returned * - * @param {string} parameters.location Resource location. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.tags] Resource tags. + * @reject {Error|ServiceError} - The error object. + */ + listByJobExecutionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Lists target executions for all steps of a job execution. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -19466,7 +23565,7 @@ export interface JobAgents { * * {Promise} A promise is returned. * - * @resolve {JobAgent} - The deserialized result object. + * @resolve {JobExecutionListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19474,28 +23573,24 @@ export interface JobAgents { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobAgent} [result] - The deserialized result object if an error did not occur. - * See {@link JobAgent} for more information. + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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, jobAgentName: string, parameters: models.JobAgent, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgent, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgent, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJobExecutionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobExecutionNext(nextPageLink: string, callback: ServiceCallback): void; + listByJobExecutionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a job agent. - * - * @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. + * Lists the target executions of a job step execution. * - * @param {string} jobAgentName The name of the job agent to be deleted. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -19504,22 +23599,17 @@ export interface JobAgents { * * @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, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByStepNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a job agent. - * - * @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. + * Lists the target executions of a job step execution. * - * @param {string} jobAgentName The name of the job agent to be deleted. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -19533,7 +23623,7 @@ export interface JobAgents { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {JobExecutionListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19541,19 +23631,30 @@ export interface JobAgents { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobExecutionListResult} 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, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByStepNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByStepNext(nextPageLink: string, callback: ServiceCallback): void; + listByStepNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * JobTargetGroups + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface JobTargetGroups { /** - * Updates a job agent. + * Gets all target groups in an agent. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19561,11 +23662,7 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be updated. - * - * @param {object} parameters The update to the job agent. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} jobAgentName The name of the job agent. * * @param {object} [options] Optional Parameters. * @@ -19574,14 +23671,14 @@ export interface JobAgents { * * @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, jobAgentName: string, parameters: models.JobAgentUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByAgentWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a job agent. + * Gets all target groups in an agent. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19589,11 +23686,7 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be updated. - * - * @param {object} parameters The update to the job agent. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} jobAgentName The name of the job agent. * * @param {object} [options] Optional Parameters. * @@ -19607,7 +23700,7 @@ export interface JobAgents { * * {Promise} A promise is returned. * - * @resolve {JobAgent} - The deserialized result object. + * @resolve {JobTargetGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19615,20 +23708,21 @@ export interface JobAgents { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobAgent} [result] - The deserialized result object if an error did not occur. - * See {@link JobAgent} for more information. + * {JobTargetGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobTargetGroupListResult} 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, jobAgentName: string, parameters: models.JobAgentUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgentUpdate, callback: ServiceCallback): void; - update(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgentUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; + listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a job agent. + * Gets a target group. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19636,37 +23730,9 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be created or - * updated. - * - * @param {object} parameters The requested job agent resource state. - * - * @param {object} [parameters.sku] The name and tier of the SKU. - * - * @param {string} parameters.sku.name The name of the SKU. Ex - P3. It is - * typically a letter+number code - * - * @param {string} [parameters.sku.tier] This field is required to be - * implemented by the Resource Provider if the service has more than one tier, - * but is not required on a PUT. - * - * @param {string} [parameters.sku.size] The SKU size. When the name field is - * the combination of tier and some other value, this would be the standalone - * code. - * - * @param {string} [parameters.sku.family] If the service has different - * generations of hardware, for the same SKU, then that can be captured here. - * - * @param {number} [parameters.sku.capacity] If the SKU supports scale out/in - * then the capacity integer should be included. If scale out/in is not - * possible for the resource this may be omitted. - * - * @param {string} parameters.databaseId Resource ID of the database to store - * job metadata in. - * - * @param {string} parameters.location Resource location. + * @param {string} jobAgentName The name of the job agent. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} targetGroupName The name of the target group. * * @param {object} [options] Optional Parameters. * @@ -19675,14 +23741,14 @@ export interface JobAgents { * * @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, jobAgentName: string, parameters: models.JobAgent, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a job agent. + * Gets a target group. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19690,37 +23756,9 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be created or - * updated. - * - * @param {object} parameters The requested job agent resource state. - * - * @param {object} [parameters.sku] The name and tier of the SKU. - * - * @param {string} parameters.sku.name The name of the SKU. Ex - P3. It is - * typically a letter+number code - * - * @param {string} [parameters.sku.tier] This field is required to be - * implemented by the Resource Provider if the service has more than one tier, - * but is not required on a PUT. - * - * @param {string} [parameters.sku.size] The SKU size. When the name field is - * the combination of tier and some other value, this would be the standalone - * code. - * - * @param {string} [parameters.sku.family] If the service has different - * generations of hardware, for the same SKU, then that can be captured here. - * - * @param {number} [parameters.sku.capacity] If the SKU supports scale out/in - * then the capacity integer should be included. If scale out/in is not - * possible for the resource this may be omitted. - * - * @param {string} parameters.databaseId Resource ID of the database to store - * job metadata in. - * - * @param {string} parameters.location Resource location. + * @param {string} jobAgentName The name of the job agent. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} targetGroupName The name of the target group. * * @param {object} [options] Optional Parameters. * @@ -19734,7 +23772,7 @@ export interface JobAgents { * * {Promise} A promise is returned. * - * @resolve {JobAgent} - The deserialized result object. + * @resolve {JobTargetGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19742,20 +23780,20 @@ export interface JobAgents { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobAgent} [result] - The deserialized result object if an error did not occur. - * See {@link JobAgent} for more information. + * {JobTargetGroup} [result] - The deserialized result object if an error did not occur. + * See {@link JobTargetGroup} 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, jobAgentName: string, parameters: models.JobAgent, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgent, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgent, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a job agent. + * Creates or updates a target group. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19763,7 +23801,13 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be deleted. + * @param {string} jobAgentName The name of the job agent. + * + * @param {string} targetGroupName The name of the target group. + * + * @param {object} parameters The requested state of the target group. + * + * @param {array} parameters.members Members of the target group. * * @param {object} [options] Optional Parameters. * @@ -19772,14 +23816,14 @@ export interface JobAgents { * * @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, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: models.JobTargetGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a job agent. + * Creates or updates a target group. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19787,7 +23831,13 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be deleted. + * @param {string} jobAgentName The name of the job agent. + * + * @param {string} targetGroupName The name of the target group. + * + * @param {object} parameters The requested state of the target group. + * + * @param {array} parameters.members Members of the target group. * * @param {object} [options] Optional Parameters. * @@ -19801,7 +23851,7 @@ export interface JobAgents { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {JobTargetGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19809,19 +23859,20 @@ export interface JobAgents { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {JobTargetGroup} [result] - The deserialized result object if an error did not occur. + * See {@link JobTargetGroup} 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, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: models.JobTargetGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: models.JobTargetGroup, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: models.JobTargetGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a job agent. + * Deletes a target group. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19829,11 +23880,9 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be updated. - * - * @param {object} parameters The update to the job agent. + * @param {string} jobAgentName The name of the job agent. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} targetGroupName The name of the target group. * * @param {object} [options] Optional Parameters. * @@ -19842,14 +23891,14 @@ export interface JobAgents { * * @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, jobAgentName: string, parameters: models.JobAgentUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a job agent. + * Deletes a target group. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19857,11 +23906,9 @@ export interface JobAgents { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent to be updated. - * - * @param {object} parameters The update to the job agent. + * @param {string} jobAgentName The name of the job agent. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} targetGroupName The name of the target group. * * @param {object} [options] Optional Parameters. * @@ -19875,7 +23922,7 @@ export interface JobAgents { * * {Promise} A promise is returned. * - * @resolve {JobAgent} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19883,20 +23930,19 @@ export interface JobAgents { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobAgent} [result] - The deserialized result object if an error did not occur. - * See {@link JobAgent} 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, jobAgentName: string, parameters: models.JobAgentUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgentUpdate, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, parameters: models.JobAgentUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of job agents in a server. + * Gets all target groups in an agent. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -19908,14 +23954,14 @@ export interface JobAgents { * * @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>; + listByAgentNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of job agents in a server. + * Gets all target groups in an agent. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -19932,7 +23978,7 @@ export interface JobAgents { * * {Promise} A promise is returned. * - * @resolve {JobAgentListResult} - The deserialized result object. + * @resolve {JobTargetGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -19940,29 +23986,30 @@ export interface JobAgents { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobAgentListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobAgentListResult} for more information. + * {JobTargetGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobTargetGroupListResult} 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; + listByAgentNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByAgentNext(nextPageLink: string, callback: ServiceCallback): void; + listByAgentNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * JobCredentials + * JobVersions * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface JobCredentials { +export interface JobVersions { /** - * Gets a list of jobs credentials. + * Gets all versions of a job. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19972,6 +24019,8 @@ export interface JobCredentials { * * @param {string} jobAgentName The name of the job agent. * + * @param {string} jobName The name of the job to get. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -19979,14 +24028,14 @@ export interface JobCredentials { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAgentWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of jobs credentials. + * Gets all versions of a job. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -19996,6 +24045,8 @@ export interface JobCredentials { * * @param {string} jobAgentName The name of the job agent. * + * @param {string} jobName The name of the job to get. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -20008,7 +24059,7 @@ export interface JobCredentials { * * {Promise} A promise is returned. * - * @resolve {JobCredentialListResult} - The deserialized result object. + * @resolve {JobVersionListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20016,21 +24067,20 @@ export interface JobCredentials { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobCredentialListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobCredentialListResult} for more - * information. + * {JobVersionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobVersionListResult} 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. */ - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; + listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a jobs credential. + * Gets a job version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -20040,7 +24090,9 @@ export interface JobCredentials { * * @param {string} jobAgentName The name of the job agent. * - * @param {string} credentialName The name of the credential. + * @param {string} jobName The name of the job. + * + * @param {number} jobVersion The version of the job to get. * * @param {object} [options] Optional Parameters. * @@ -20049,14 +24101,14 @@ export interface JobCredentials { * * @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, jobAgentName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a jobs credential. + * Gets a job version. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -20066,7 +24118,9 @@ export interface JobCredentials { * * @param {string} jobAgentName The name of the job agent. * - * @param {string} credentialName The name of the credential. + * @param {string} jobName The name of the job. + * + * @param {number} jobVersion The version of the job to get. * * @param {object} [options] Optional Parameters. * @@ -20080,7 +24134,7 @@ export interface JobCredentials { * * {Promise} A promise is returned. * - * @resolve {JobCredential} - The deserialized result object. + * @resolve {JobVersion} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20088,36 +24142,23 @@ export interface JobCredentials { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobCredential} [result] - The deserialized result object if an error did not occur. - * See {@link JobCredential} for more information. + * {JobVersion} [result] - The deserialized result object if an error did not occur. + * See {@link JobVersion} 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, jobAgentName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a job credential. - * - * @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} jobAgentName The name of the job agent. - * - * @param {string} credentialName The name of the credential. - * - * @param {object} parameters The requested job credential state. - * - * @param {string} parameters.username The credential user name. + * Gets all versions of a job. * - * @param {string} parameters.password The credential password. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -20126,30 +24167,17 @@ export interface JobCredentials { * * @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, jobAgentName: string, credentialName: string, parameters: models.JobCredential, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a job credential. - * - * @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} jobAgentName The name of the job agent. - * - * @param {string} credentialName The name of the credential. - * - * @param {object} parameters The requested job credential state. - * - * @param {string} parameters.username The credential user name. + * Gets all versions of a job. * - * @param {string} parameters.password The credential password. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -20163,7 +24191,7 @@ export interface JobCredentials { * * {Promise} A promise is returned. * - * @resolve {JobCredential} - The deserialized result object. + * @resolve {JobVersionListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20171,30 +24199,37 @@ export interface JobCredentials { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobCredential} [result] - The deserialized result object if an error did not occur. - * See {@link JobCredential} for more information. + * {JobVersionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link JobVersionListResult} 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, jobAgentName: string, credentialName: string, parameters: models.JobCredential, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, parameters: models.JobCredential, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, parameters: models.JobCredential, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByJobNext(nextPageLink: string, callback: ServiceCallback): void; + listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * LongTermRetentionBackups + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface LongTermRetentionBackups { /** - * Deletes a job credential. + * Gets a long term retention backup. * - * @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 location of the database. * - * @param {string} serverName The name of the server. + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} jobAgentName The name of the job agent. + * @param {string} longTermRetentionDatabaseName The name of the database * - * @param {string} credentialName The name of the credential. + * @param {string} backupName The backup name. * * @param {object} [options] Optional Parameters. * @@ -20203,24 +24238,22 @@ export interface JobCredentials { * * @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, jobAgentName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a job credential. + * Gets a long term retention backup. * - * @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 location of the database. * - * @param {string} serverName The name of the server. + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} jobAgentName The name of the job agent. + * @param {string} longTermRetentionDatabaseName The name of the database * - * @param {string} credentialName The name of the credential. + * @param {string} backupName The backup name. * * @param {object} [options] Optional Parameters. * @@ -20234,7 +24267,7 @@ export interface JobCredentials { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {LongTermRetentionBackup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20242,22 +24275,29 @@ export interface JobCredentials { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {LongTermRetentionBackup} [result] - The deserialized result object if an error did not occur. + * See {@link LongTermRetentionBackup} 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, jobAgentName: string, credentialName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, credentialName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, callback: ServiceCallback): void; + get(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of jobs credentials. + * Deletes a long term retention backup. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} locationName The location of the database + * + * @param {string} longTermRetentionServerName The name of the server + * + * @param {string} longTermRetentionDatabaseName The name of the database + * + * @param {string} backupName The backup name. * * @param {object} [options] Optional Parameters. * @@ -20266,17 +24306,22 @@ export interface JobCredentials { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAgentNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of jobs credentials. + * Deletes a long term retention backup. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} locationName The location of the database + * + * @param {string} longTermRetentionServerName The name of the server + * + * @param {string} longTermRetentionDatabaseName The name of the database + * + * @param {string} backupName The backup name. * * @param {object} [options] Optional Parameters. * @@ -20290,7 +24335,7 @@ export interface JobCredentials { * * {Promise} A promise is returned. * - * @resolve {JobCredentialListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20298,106 +24343,63 @@ export interface JobCredentials { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobCredentialListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobCredentialListResult} 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. */ - listByAgentNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAgentNext(nextPageLink: string, callback: ServiceCallback): void; - listByAgentNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * JobExecutions - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface JobExecutions { + deleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, callback: ServiceCallback): void; + deleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all executions in a job agent. - * - * @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} jobAgentName The name of the job agent. - * - * @param {object} [options] Optional Parameters. - * - * @param {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. - * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. + * Lists all long term retention backups for a database. * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. + * @param {string} locationName The location of the database * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. + * @param {string} longTermRetentionServerName The name of the server * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. + * @param {string} longTermRetentionDatabaseName The name of the database * - * @param {number} [options.skip] The number of elements in the collection to - * skip. + * @param {object} [options] Optional Parameters. * - * @param {number} [options.top] The number of elements to return from the - * collection. + * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get + * the latest backup for each database. + * + * @param {string} [options.databaseState] Whether to query against just live + * databases, just deleted databases, or all databases. Possible values + * include: 'All', 'Live', 'Deleted' * * @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. */ - listByAgentWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all executions in a job agent. + * Lists all long term retention backups for 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} locationName The location of the database * - * @param {string} serverName The name of the server. + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} jobAgentName The name of the job agent. + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {object} [options] Optional Parameters. * - * @param {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. - * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. - * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. - * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. - * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. - * - * @param {number} [options.skip] The number of elements in the collection to - * skip. + * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get + * the latest backup for each database. * - * @param {number} [options.top] The number of elements to return from the - * collection. + * @param {string} [options.databaseState] Whether to query against just live + * databases, just deleted databases, or all databases. Possible values + * include: 'All', 'Live', 'Deleted' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20409,7 +24411,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20417,63 +24419,57 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} for more + * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LongTermRetentionBackupListResult} 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. */ - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByDatabase(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByDatabase(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, callback: ServiceCallback): void; + listByDatabase(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, options: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Requests cancellation of a job execution. - * - * @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. + * Lists the long term retention backups for a given location. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} locationName The location of the database * - * @param {string} jobName The name of the job. + * @param {object} [options] Optional Parameters. * - * @param {uuid} jobExecutionId The id of the job execution to cancel. + * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get + * the latest backup for each database. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.databaseState] Whether to query against just live + * databases, just deleted databases, or all databases. Possible values + * include: 'All', 'Live', 'Deleted' * * @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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByLocationWithHttpOperationResponse(locationName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Requests cancellation of a job execution. - * - * @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. + * Lists the long term retention backups for a given location. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} locationName The location of the database * - * @param {string} jobName The name of the job. + * @param {object} [options] Optional Parameters. * - * @param {uuid} jobExecutionId The id of the job execution to cancel. + * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get + * the latest backup for each database. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.databaseState] Whether to query against just live + * databases, just deleted databases, or all databases. Possible values + * include: 'All', 'Live', 'Deleted' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20485,7 +24481,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20493,57 +24489,61 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LongTermRetentionBackupListResult} 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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - cancel(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; - cancel(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByLocation(locationName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByLocation(locationName: string, callback: ServiceCallback): void; + listByLocation(locationName: string, options: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Starts an elastic job execution. + * Lists the long term retention backups 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} locationName The location of the database * - * @param {string} serverName The name of the server. + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} jobAgentName The name of the job agent. + * @param {object} [options] Optional Parameters. * - * @param {string} jobName The name of the job to get. + * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get + * the latest backup for each database. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.databaseState] Whether to query against just live + * databases, just deleted databases, or all databases. Possible values + * include: 'All', 'Live', 'Deleted' * * @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. */ - createWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByServerWithHttpOperationResponse(locationName: string, longTermRetentionServerName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Starts an elastic job execution. + * Lists the long term retention backups 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} locationName The location of the database * - * @param {string} serverName The name of the server. + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} jobAgentName The name of the job agent. + * @param {object} [options] Optional Parameters. * - * @param {string} jobName The name of the job to get. + * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get + * the latest backup for each database. * - * @param {object} [options] Optional Parameters. + * @param {string} [options.databaseState] Whether to query against just live + * databases, just deleted databases, or all databases. Possible values + * include: 'All', 'Live', 'Deleted' * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -20555,7 +24555,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecution} - The deserialized result object. + * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20563,101 +24563,56 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecution} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecution} for more information. + * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LongTermRetentionBackupListResult} 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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; - create(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByServer(locationName: string, longTermRetentionServerName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listByServer(locationName: string, longTermRetentionServerName: string, callback: ServiceCallback): void; + listByServer(locationName: string, longTermRetentionServerName: string, options: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists a job's executions. + * Deletes a long term retention backup. * - * @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 location of the database * - * @param {string} serverName The name of the server. + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} jobAgentName The name of the job agent. + * @param {string} longTermRetentionDatabaseName The name of the database * - * @param {string} jobName The name of the job to get. + * @param {string} backupName The backup name. * * @param {object} [options] Optional Parameters. * - * @param {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. - * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. - * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. - * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. - * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. - * - * @param {number} [options.skip] The number of elements in the collection to - * skip. - * - * @param {number} [options.top] The number of elements to return from 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. */ - listByJobWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists a job's executions. + * Deletes a long term retention backup. * - * @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 location of the database * - * @param {string} serverName The name of the server. + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} jobAgentName The name of the job agent. + * @param {string} longTermRetentionDatabaseName The name of the database * - * @param {string} jobName The name of the job to get. + * @param {string} backupName The backup name. * * @param {object} [options] Optional Parameters. * - * @param {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. - * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. - * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. - * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. - * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. - * - * @param {number} [options.skip] The number of elements in the collection to - * skip. - * - * @param {number} [options.top] The number of elements to return from the - * collection. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -20668,7 +24623,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20676,33 +24631,22 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} 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. */ - listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; - listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets a job execution. - * - * @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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job. + beginDeleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, callback: ServiceCallback): void; + beginDeleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Lists all long term retention backups for a database. * - * @param {uuid} jobExecutionId The id of the job execution + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -20711,26 +24655,17 @@ export interface JobExecutions { * * @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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a job execution. - * - * @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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job. + * Lists all long term retention backups for a database. * - * @param {uuid} jobExecutionId The id of the job execution + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -20744,7 +24679,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecution} - The deserialized result object. + * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20752,33 +24687,24 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecution} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecution} for more information. + * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LongTermRetentionBackupListResult} 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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: 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; /** - * Creates or updatess a job execution. - * - * @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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. + * Lists the long term retention backups for a given location. * - * @param {uuid} jobExecutionId The job execution id to create the job - * execution under. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -20787,27 +24713,17 @@ export interface JobExecutions { * * @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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByLocationNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updatess a job execution. - * - * @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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. + * Lists the long term retention backups for a given location. * - * @param {uuid} jobExecutionId The job execution id to create the job - * execution under. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -20821,7 +24737,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecution} - The deserialized result object. + * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20829,30 +24745,24 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecution} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecution} for more information. + * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LongTermRetentionBackupListResult} 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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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; /** - * Starts an elastic job execution. - * - * @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} jobAgentName The name of the job agent. + * Lists the long term retention backups for a given server. * - * @param {string} jobName The name of the job to get. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -20861,24 +24771,17 @@ export interface JobExecutions { * * @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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByServerNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Starts an elastic job execution. - * - * @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} jobAgentName The name of the job agent. + * Lists the long term retention backups for a given server. * - * @param {string} jobName The name of the job to get. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -20892,7 +24795,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecution} - The deserialized result object. + * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20900,20 +24803,30 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecution} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecution} for more information. + * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LongTermRetentionBackupListResult} 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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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 + * BackupLongTermRetentionPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface BackupLongTermRetentionPolicies { /** - * Creates or updatess a job execution. + * Gets a database's long 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 @@ -20921,12 +24834,7 @@ export interface JobExecutions { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * - * @param {uuid} jobExecutionId The job execution id to create the job - * execution under. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -20935,14 +24843,14 @@ export interface JobExecutions { * * @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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updatess a job execution. + * Gets a database's long 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 @@ -20950,12 +24858,7 @@ export interface JobExecutions { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * - * @param {uuid} jobExecutionId The job execution id to create the job - * execution under. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -20969,7 +24872,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecution} - The deserialized result object. + * @resolve {BackupLongTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -20977,23 +24880,43 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecution} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecution} for more information. + * {BackupLongTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link BackupLongTermRetentionPolicy} 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, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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; /** - * Lists all executions in a job agent. + * Sets a database's long term retention policy. * - * @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 {object} parameters The long term retention policy info. + * + * @param {string} [parameters.weeklyRetention] The weekly retention policy for + * an LTR backup in an ISO 8601 format. + * + * @param {string} [parameters.monthlyRetention] The monthly retention policy + * for an LTR backup in an ISO 8601 format. + * + * @param {string} [parameters.yearlyRetention] The yearly retention policy for + * an LTR backup in an ISO 8601 format. + * + * @param {number} [parameters.weekOfYear] The week of year to take the yearly + * backup in an ISO 8601 format. * * @param {object} [options] Optional Parameters. * @@ -21002,17 +24925,36 @@ export interface JobExecutions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAgentNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all executions in a job agent. + * Sets a database's long term retention policy. * - * @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 {object} parameters The long term retention policy info. + * + * @param {string} [parameters.weeklyRetention] The weekly retention policy for + * an LTR backup in an ISO 8601 format. + * + * @param {string} [parameters.monthlyRetention] The monthly retention policy + * for an LTR backup in an ISO 8601 format. + * + * @param {string} [parameters.yearlyRetention] The yearly retention policy for + * an LTR backup in an ISO 8601 format. + * + * @param {number} [parameters.weekOfYear] The week of year to take the yearly + * backup in an ISO 8601 format. * * @param {object} [options] Optional Parameters. * @@ -21026,7 +24968,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {BackupLongTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21034,24 +24976,29 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} for more + * {BackupLongTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link BackupLongTermRetentionPolicy} 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. */ - listByAgentNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAgentNext(nextPageLink: string, callback: ServiceCallback): void; - listByAgentNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists a job's executions. + * Gets a database's long term retention policy. * - * @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 {object} [options] Optional Parameters. * @@ -21060,17 +25007,22 @@ export interface JobExecutions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists a job's executions. + * Gets a database's long term retention policy. * - * @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 {object} [options] Optional Parameters. * @@ -21084,7 +25036,7 @@ export interface JobExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {BackupLongTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21092,30 +25044,21 @@ export interface JobExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} for more + * {BackupLongTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link BackupLongTermRetentionPolicy} 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. */ - listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJobNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * Jobs - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface Jobs { + 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; /** - * Gets a list of jobs. + * Sets a database's long 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 @@ -21123,7 +25066,21 @@ export interface Jobs { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. + * + * @param {object} parameters The long term retention policy info. + * + * @param {string} [parameters.weeklyRetention] The weekly retention policy for + * an LTR backup in an ISO 8601 format. + * + * @param {string} [parameters.monthlyRetention] The monthly retention policy + * for an LTR backup in an ISO 8601 format. + * + * @param {string} [parameters.yearlyRetention] The yearly retention policy for + * an LTR backup in an ISO 8601 format. + * + * @param {number} [parameters.weekOfYear] The week of year to take the yearly + * backup in an ISO 8601 format. * * @param {object} [options] Optional Parameters. * @@ -21132,14 +25089,14 @@ export interface Jobs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAgentWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of jobs. + * Sets a database's long 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 @@ -21147,7 +25104,21 @@ export interface Jobs { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. + * + * @param {object} parameters The long term retention policy info. + * + * @param {string} [parameters.weeklyRetention] The weekly retention policy for + * an LTR backup in an ISO 8601 format. + * + * @param {string} [parameters.monthlyRetention] The monthly retention policy + * for an LTR backup in an ISO 8601 format. + * + * @param {string} [parameters.yearlyRetention] The yearly retention policy for + * an LTR backup in an ISO 8601 format. + * + * @param {number} [parameters.weekOfYear] The week of year to take the yearly + * backup in an ISO 8601 format. * * @param {object} [options] Optional Parameters. * @@ -21161,7 +25132,7 @@ export interface Jobs { * * {Promise} A promise is returned. * - * @resolve {JobListResult} - The deserialized result object. + * @resolve {BackupLongTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21169,30 +25140,38 @@ export interface Jobs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobListResult} for more information. + * {BackupLongTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link BackupLongTermRetentionPolicy} 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. */ - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ManagedBackupShortTermRetentionPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedBackupShortTermRetentionPolicies { /** - * Gets a job. + * Gets a managed 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} jobAgentName The name of the job agent. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} jobName The name of the job to get. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -21201,24 +25180,22 @@ export interface Jobs { * * @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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a job. + * Gets a managed 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} jobAgentName The name of the job agent. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} jobName The name of the job to get. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -21232,7 +25209,7 @@ export interface Jobs { * * {Promise} A promise is returned. * - * @resolve {Job} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21240,51 +25217,34 @@ export interface Jobs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Job} [result] - The deserialized result object if an error did not occur. - * See {@link Job} for more information. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: 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; /** - * Creates or updates a job. + * Updates a managed 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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * - * @param {object} parameters The requested job state. - * - * @param {string} [parameters.description] User-defined description of the - * job. - * - * @param {object} [parameters.schedule] Schedule properties of the job. - * - * @param {date} [parameters.schedule.startTime] Schedule start time. - * - * @param {date} [parameters.schedule.endTime] Schedule end time. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} [parameters.schedule.type] Schedule interval type. Possible - * values include: 'Once', 'Recurring' + * @param {string} databaseName The name of the database. * - * @param {boolean} [parameters.schedule.enabled] Whether or not the schedule - * is enabled. + * @param {object} parameters The short term retention policy info. * - * @param {string} [parameters.schedule.interval] Value of the schedule's - * recurring interval, if the scheduletype is recurring. ISO8601 duration - * format. + * @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. * @@ -21293,45 +25253,27 @@ export interface Jobs { * * @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, jobAgentName: string, jobName: string, parameters: models.Job, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a job. + * Updates a managed 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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * - * @param {object} parameters The requested job state. - * - * @param {string} [parameters.description] User-defined description of the - * job. - * - * @param {object} [parameters.schedule] Schedule properties of the job. - * - * @param {date} [parameters.schedule.startTime] Schedule start time. - * - * @param {date} [parameters.schedule.endTime] Schedule end time. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} [parameters.schedule.type] Schedule interval type. Possible - * values include: 'Once', 'Recurring' + * @param {string} databaseName The name of the database. * - * @param {boolean} [parameters.schedule.enabled] Whether or not the schedule - * is enabled. + * @param {object} parameters The short term retention policy info. * - * @param {string} [parameters.schedule.interval] Value of the schedule's - * recurring interval, if the scheduletype is recurring. ISO8601 duration - * format. + * @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. * @@ -21345,7 +25287,7 @@ export interface Jobs { * * {Promise} A promise is returned. * - * @resolve {Job} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21353,30 +25295,34 @@ export interface Jobs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Job} [result] - The deserialized result object if an error did not occur. - * See {@link Job} for more information. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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, jobAgentName: string, jobName: string, parameters: models.Job, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, parameters: models.Job, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, parameters: models.Job, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a job. + * Updates a managed 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. * - * @param {string} jobName The name of the job to delete. + * @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. * @@ -21385,24 +25331,27 @@ export interface Jobs { * * @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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a job. + * Updates a managed 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. * - * @param {string} jobName The name of the job to delete. + * @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. * @@ -21416,7 +25365,7 @@ export interface Jobs { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21424,22 +25373,29 @@ export interface Jobs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; + update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a list of jobs. + * Gets a managed database's short term retention policy list. * - * @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 {object} [options] Optional Parameters. * @@ -21448,17 +25404,22 @@ export interface Jobs { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAgentNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of jobs. + * Gets a managed database's short term retention policy list. + * + * @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} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -21472,7 +25433,7 @@ export interface Jobs { * * {Promise} A promise is returned. * - * @resolve {JobListResult} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21480,114 +25441,67 @@ export interface Jobs { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobListResult} for more information. + * {ManagedBackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ManagedBackupShortTermRetentionPolicyListResult} 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. */ - listByAgentNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAgentNext(nextPageLink: string, callback: ServiceCallback): void; - listByAgentNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * JobStepExecutions - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface JobStepExecutions { + 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 step executions of a job execution. + * Updates a managed 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. * - * @param {string} jobName The name of the job to get. + * @param {object} parameters The short term retention policy info. * - * @param {uuid} jobExecutionId The id of the job execution + * @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 {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. - * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. - * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. - * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. - * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. - * - * @param {number} [options.skip] The number of elements in the collection to - * skip. - * - * @param {number} [options.top] The number of elements to return from 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. */ - listByJobExecutionWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the step executions of a job execution. + * Updates a managed 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. * - * @param {string} jobName The name of the job to get. + * @param {object} parameters The short term retention policy info. * - * @param {uuid} jobExecutionId The id of the job execution + * @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 {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. - * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. - * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. - * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. - * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. - * - * @param {number} [options.skip] The number of elements in the collection to - * skip. - * - * @param {number} [options.top] The number of elements to return from the - * collection. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -21598,7 +25512,7 @@ export interface JobStepExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21606,35 +25520,34 @@ export interface JobStepExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} for more - * information. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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. */ - listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; - listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a step execution of a job execution. + * Updates a managed 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} jobAgentName The name of the job agent. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} jobName The name of the job to get. + * @param {string} databaseName The name of the database. * - * @param {uuid} jobExecutionId The unique id of the job execution + * @param {object} parameters The short term retention policy info. * - * @param {string} stepName The name of the step. + * @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. * @@ -21643,28 +25556,27 @@ export interface JobStepExecutions { * * @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, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a step execution of a job execution. + * Updates a managed 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} jobAgentName The name of the job agent. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} jobName The name of the job to get. + * @param {string} databaseName The name of the database. * - * @param {uuid} jobExecutionId The unique id of the job execution + * @param {object} parameters The short term retention policy info. * - * @param {string} stepName The name of the step. + * @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. * @@ -21678,7 +25590,7 @@ export interface JobStepExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecution} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21686,20 +25598,21 @@ export interface JobStepExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecution} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecution} for more information. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the step executions of a job execution. + * Gets a managed database's short term retention policy list. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21711,14 +25624,14 @@ export interface JobStepExecutions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByJobExecutionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the step executions of a job execution. + * Gets a managed database's short term retention policy list. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -21735,7 +25648,7 @@ export interface JobStepExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21743,42 +25656,109 @@ export interface JobStepExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} for more - * information. + * {ManagedBackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ManagedBackupShortTermRetentionPolicyListResult} 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. */ - listByJobExecutionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJobExecutionNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobExecutionNext(nextPageLink: 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 - * JobSteps + * ManagedDatabases * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface JobSteps { +export interface ManagedDatabases { /** - * Gets all job steps in the specified job version. + * Completes the restore operation on a managed database. + * + * @param {string} locationName The name of the region where the resource is + * located. + * + * @param {uuid} operationId Management operation id that this request tries to + * complete. + * + * @param {object} parameters The definition for completing the restore of this + * managed database. + * + * @param {string} parameters.lastBackupName The last backup name to apply + * + * @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. + */ + completeRestoreWithHttpOperationResponse(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Completes the restore operation on a managed database. + * + * @param {string} locationName The name of the region where the resource is + * located. + * + * @param {uuid} operationId Management operation id that this request tries to + * complete. + * + * @param {object} parameters The definition for completing the restore of this + * managed database. + * + * @param {string} parameters.lastBackupName The last backup name to apply + * + * @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. + */ + completeRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + completeRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, callback: ServiceCallback): void; + completeRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets a list of managed databases. * * @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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * - * @param {number} jobVersion The version of the job to get. + * @param {string} managedInstanceName The name of the managed instance. * * @param {object} [options] Optional Parameters. * @@ -21787,26 +25767,20 @@ export interface JobSteps { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByVersionWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all job steps in the specified job version. + * Gets a list of managed databases. * * @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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * - * @param {number} jobVersion The version of the job to get. + * @param {string} managedInstanceName The name of the managed instance. * * @param {object} [options] Optional Parameters. * @@ -21820,7 +25794,7 @@ export interface JobSteps { * * {Promise} A promise is returned. * - * @resolve {JobStepListResult} - The deserialized result object. + * @resolve {ManagedDatabaseListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21828,34 +25802,29 @@ export interface JobSteps { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStepListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobStepListResult} for more information. + * {ManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedDatabaseListResult} 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. */ - listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, callback: ServiceCallback): void; - listByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, 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 the specified version of a job step. + * Gets 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} serverName The name of the server. - * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job. - * - * @param {number} jobVersion The version of the job to get. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} stepName The name of the job step. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -21864,28 +25833,22 @@ export interface JobSteps { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getByVersionWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified version of a job step. + * Gets 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} serverName The name of the server. - * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job. - * - * @param {number} jobVersion The version of the job to get. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} stepName The name of the job step. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -21899,7 +25862,7 @@ export interface JobSteps { * * {Promise} A promise is returned. * - * @resolve {JobStep} - The deserialized result object. + * @resolve {ManagedDatabase} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21907,30 +25870,73 @@ export interface JobSteps { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStep} [result] - The deserialized result object if an error did not occur. - * See {@link JobStep} for more information. + * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedDatabase} 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. */ - getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: string, callback: ServiceCallback): void; - getByVersion(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, stepName: 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; /** - * Gets all job steps for a job's current version. + * Creates a new database or updates an existing 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. * - * @param {string} jobName The name of the job to get. + * @param {object} parameters The requested database resource state. + * + * @param {string} [parameters.collation] Collation of the managed database. + * + * @param {date} [parameters.restorePointInTime] Conditional. If createMode is + * PointInTimeRestore, this value is required. Specifies the point in time + * (ISO8601 format) of the source database that will be restored to create the + * new database. + * + * @param {string} [parameters.catalogCollation] Collation of the metadata + * catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + * + * @param {string} [parameters.createMode] Managed database create mode. + * PointInTimeRestore: Create a database by restoring a point in time backup of + * an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by + * restoring from external backup files. Collation, StorageContainerUri and + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' + * + * @param {string} [parameters.storageContainerUri] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. + * + * @param {string} [parameters.sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. + * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * + * @param {string} [parameters.storageContainerSasToken] Conditional. If + * createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. + * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -21939,24 +25945,67 @@ export interface JobSteps { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all job steps for a job's current version. + * Creates a new database or updates an existing 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. * - * @param {string} jobName The name of the job to get. + * @param {object} parameters The requested database resource state. + * + * @param {string} [parameters.collation] Collation of the managed database. + * + * @param {date} [parameters.restorePointInTime] Conditional. If createMode is + * PointInTimeRestore, this value is required. Specifies the point in time + * (ISO8601 format) of the source database that will be restored to create the + * new database. + * + * @param {string} [parameters.catalogCollation] Collation of the metadata + * catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + * + * @param {string} [parameters.createMode] Managed database create mode. + * PointInTimeRestore: Create a database by restoring a point in time backup of + * an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by + * restoring from external backup files. Collation, StorageContainerUri and + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' + * + * @param {string} [parameters.storageContainerUri] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. + * + * @param {string} [parameters.sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. + * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * + * @param {string} [parameters.storageContainerSasToken] Conditional. If + * createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. + * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * + * @param {string} parameters.location Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -21970,7 +26019,7 @@ export interface JobSteps { * * {Promise} A promise is returned. * - * @resolve {JobStepListResult} - The deserialized result object. + * @resolve {ManagedDatabase} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -21978,32 +26027,28 @@ export interface JobSteps { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStepListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobStepListResult} for more information. + * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedDatabase} 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. */ - listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; - listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a job step in a job's current version. + * Deletes 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} serverName The name of the server. - * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} stepName The name of the job step. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -22012,26 +26057,22 @@ export interface JobSteps { * * @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, jobAgentName: string, jobName: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a job step in a job's current version. + * Deletes 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} serverName The name of the server. - * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} stepName The name of the job step. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -22045,7 +26086,7 @@ export interface JobSteps { * * {Promise} A promise is returned. * - * @resolve {JobStep} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22053,101 +26094,70 @@ export interface JobSteps { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStep} [result] - The deserialized result object if an error did not occur. - * See {@link JobStep} 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, jobAgentName: string, jobName: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, 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; /** - * Creates or updates a job step. This will implicitly create a new job - * version. - * - * @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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job. - * - * @param {string} stepName The name of the job step. - * - * @param {object} parameters The requested state of the job step. - * - * @param {number} [parameters.stepId] The job step's index within the job. If - * not specified when creating the job step, it will be created as the last - * step. If not specified when updating the job step, the step id is not - * modified. - * - * @param {string} parameters.targetGroup The resource ID of the target group - * that the job step will be executed on. - * - * @param {string} parameters.credential The resource ID of the job credential - * that will be used to connect to the targets. - * - * @param {object} parameters.action The action payload of the job step. - * - * @param {string} [parameters.action.type] Type of action being executed by - * the job step. Possible values include: 'TSql' - * - * @param {string} [parameters.action.source] The source of the action to - * execute. Possible values include: 'Inline' - * - * @param {string} parameters.action.value The action value, for example the - * text of the T-SQL script to execute. - * - * @param {object} [parameters.output] Output destination properties of the job - * step. + * Updates an existing database. * - * @param {string} [parameters.output.type] The output destination type. - * Possible values include: 'SqlDatabase' + * @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 {uuid} [parameters.output.subscriptionId] The output destination - * subscription id. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} [parameters.output.resourceGroupName] The output destination - * resource group. + * @param {string} databaseName The name of the database. * - * @param {string} parameters.output.serverName The output destination server - * name. + * @param {object} parameters The requested database resource state. * - * @param {string} parameters.output.databaseName The output destination - * database. + * @param {string} [parameters.collation] Collation of the managed database. * - * @param {string} [parameters.output.schemaName] The output destination - * schema. + * @param {date} [parameters.restorePointInTime] Conditional. If createMode is + * PointInTimeRestore, this value is required. Specifies the point in time + * (ISO8601 format) of the source database that will be restored to create the + * new database. * - * @param {string} parameters.output.tableName The output destination table. + * @param {string} [parameters.catalogCollation] Collation of the metadata + * catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' * - * @param {string} parameters.output.credential The resource ID of the - * credential to use to connect to the output destination. + * @param {string} [parameters.createMode] Managed database create mode. + * PointInTimeRestore: Create a database by restoring a point in time backup of + * an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by + * restoring from external backup files. Collation, StorageContainerUri and + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * - * @param {object} [parameters.executionOptions] Execution options for the job - * step. + * @param {string} [parameters.storageContainerUri] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. * - * @param {number} [parameters.executionOptions.timeoutSeconds] Execution - * timeout for the job step. + * @param {string} [parameters.sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. * - * @param {number} [parameters.executionOptions.retryAttempts] Maximum number - * of times the job step will be reattempted if the first attempt fails. + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. * - * @param {number} [parameters.executionOptions.initialRetryIntervalSeconds] - * Initial delay between retries for job step execution. + * @param {string} [parameters.storageContainerSasToken] Conditional. If + * createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. * - * @param {number} [parameters.executionOptions.maximumRetryIntervalSeconds] - * The maximum amount of time to wait between retries for job step execution. + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. * - * @param {number} [parameters.executionOptions.retryIntervalBackoffMultiplier] - * The backoff multiplier for the time between retries. + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -22156,95 +26166,65 @@ export interface JobSteps { * * @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, jobAgentName: string, jobName: string, stepName: string, parameters: models.JobStep, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a job step. This will implicitly create a new job - * version. + * Updates an existing 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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job. - * - * @param {string} stepName The name of the job step. - * - * @param {object} parameters The requested state of the job step. - * - * @param {number} [parameters.stepId] The job step's index within the job. If - * not specified when creating the job step, it will be created as the last - * step. If not specified when updating the job step, the step id is not - * modified. - * - * @param {string} parameters.targetGroup The resource ID of the target group - * that the job step will be executed on. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} parameters.credential The resource ID of the job credential - * that will be used to connect to the targets. + * @param {string} databaseName The name of the database. * - * @param {object} parameters.action The action payload of the job step. + * @param {object} parameters The requested database resource state. * - * @param {string} [parameters.action.type] Type of action being executed by - * the job step. Possible values include: 'TSql' + * @param {string} [parameters.collation] Collation of the managed database. * - * @param {string} [parameters.action.source] The source of the action to - * execute. Possible values include: 'Inline' + * @param {date} [parameters.restorePointInTime] Conditional. If createMode is + * PointInTimeRestore, this value is required. Specifies the point in time + * (ISO8601 format) of the source database that will be restored to create the + * new database. * - * @param {string} parameters.action.value The action value, for example the - * text of the T-SQL script to execute. + * @param {string} [parameters.catalogCollation] Collation of the metadata + * catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' * - * @param {object} [parameters.output] Output destination properties of the job - * step. + * @param {string} [parameters.createMode] Managed database create mode. + * PointInTimeRestore: Create a database by restoring a point in time backup of + * an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by + * restoring from external backup files. Collation, StorageContainerUri and + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * - * @param {string} [parameters.output.type] The output destination type. - * Possible values include: 'SqlDatabase' + * @param {string} [parameters.storageContainerUri] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. * - * @param {uuid} [parameters.output.subscriptionId] The output destination - * subscription id. + * @param {string} [parameters.sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. * - * @param {string} [parameters.output.resourceGroupName] The output destination - * resource group. + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. * - * @param {string} parameters.output.serverName The output destination server - * name. + * @param {string} [parameters.storageContainerSasToken] Conditional. If + * createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. * - * @param {string} parameters.output.databaseName The output destination + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this * database. * - * @param {string} [parameters.output.schemaName] The output destination - * schema. - * - * @param {string} parameters.output.tableName The output destination table. - * - * @param {string} parameters.output.credential The resource ID of the - * credential to use to connect to the output destination. - * - * @param {object} [parameters.executionOptions] Execution options for the job - * step. - * - * @param {number} [parameters.executionOptions.timeoutSeconds] Execution - * timeout for the job step. - * - * @param {number} [parameters.executionOptions.retryAttempts] Maximum number - * of times the job step will be reattempted if the first attempt fails. - * - * @param {number} [parameters.executionOptions.initialRetryIntervalSeconds] - * Initial delay between retries for job step execution. - * - * @param {number} [parameters.executionOptions.maximumRetryIntervalSeconds] - * The maximum amount of time to wait between retries for job step execution. - * - * @param {number} [parameters.executionOptions.retryIntervalBackoffMultiplier] - * The backoff multiplier for the time between retries. + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -22258,7 +26238,7 @@ export interface JobSteps { * * {Promise} A promise is returned. * - * @resolve {JobStep} - The deserialized result object. + * @resolve {ManagedDatabase} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22266,32 +26246,31 @@ export interface JobSteps { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStep} [result] - The deserialized result object if an error did not occur. - * See {@link JobStep} for more information. + * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedDatabase} 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, jobAgentName: string, jobName: string, stepName: string, parameters: models.JobStep, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: models.JobStep, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, parameters: models.JobStep, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, callback: ServiceCallback): void; + update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a job step. This will implicitly create a new job version. - * - * @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. + * Completes the restore operation on a managed database. * - * @param {string} serverName The name of the server. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} jobAgentName The name of the job agent. + * @param {uuid} operationId Management operation id that this request tries to + * complete. * - * @param {string} jobName The name of the job. + * @param {object} parameters The definition for completing the restore of this + * managed database. * - * @param {string} stepName The name of the job step to delete. + * @param {string} parameters.lastBackupName The last backup name to apply * * @param {object} [options] Optional Parameters. * @@ -22304,22 +26283,21 @@ export interface JobSteps { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCompleteRestoreWithHttpOperationResponse(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a job step. This will implicitly create a new job version. - * - * @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. + * Completes the restore operation on a managed database. * - * @param {string} serverName The name of the server. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} jobAgentName The name of the job agent. + * @param {uuid} operationId Management operation id that this request tries to + * complete. * - * @param {string} jobName The name of the job. + * @param {object} parameters The definition for completing the restore of this + * managed database. * - * @param {string} stepName The name of the job step to delete. + * @param {string} parameters.lastBackupName The last backup name to apply * * @param {object} [options] Optional Parameters. * @@ -22347,16 +26325,66 @@ export interface JobSteps { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, stepName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCompleteRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCompleteRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, callback: ServiceCallback): void; + beginCompleteRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all job steps in the specified job version. + * Creates a new database or updates an existing 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} parameters The requested database resource state. + * + * @param {string} [parameters.collation] Collation of the managed database. + * + * @param {date} [parameters.restorePointInTime] Conditional. If createMode is + * PointInTimeRestore, this value is required. Specifies the point in time + * (ISO8601 format) of the source database that will be restored to create the + * new database. + * + * @param {string} [parameters.catalogCollation] Collation of the metadata + * catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' + * + * @param {string} [parameters.createMode] Managed database create mode. + * PointInTimeRestore: Create a database by restoring a point in time backup of + * an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by + * restoring from external backup files. Collation, StorageContainerUri and + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' + * + * @param {string} [parameters.storageContainerUri] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. + * + * @param {string} [parameters.sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. + * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * + * @param {string} [parameters.storageContainerSasToken] Conditional. If + * createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. + * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * + * @param {string} parameters.location Resource location. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -22365,74 +26393,67 @@ export interface JobSteps { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByVersionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all job steps in the specified job version. - * - * @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. + * Creates a new database or updates an existing database. * - * {Promise} A promise is returned. + * @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. * - * @resolve {JobStepListResult} - The deserialized result object. + * @param {string} managedInstanceName The name of the managed instance. * - * @reject {Error|ServiceError} - The error object. + * @param {string} databaseName The name of the database. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} parameters The requested database resource state. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [parameters.collation] Collation of the managed database. * - * {JobStepListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobStepListResult} for more information. + * @param {date} [parameters.restorePointInTime] Conditional. If createMode is + * PointInTimeRestore, this value is required. Specifies the point in time + * (ISO8601 format) of the source database that will be restored to create the + * new database. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} [parameters.catalogCollation] Collation of the metadata + * catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listByVersionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByVersionNext(nextPageLink: string, callback: ServiceCallback): void; - listByVersionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets all job steps for a job's current version. + * @param {string} [parameters.createMode] Managed database create mode. + * PointInTimeRestore: Create a database by restoring a point in time backup of + * an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by + * restoring from external backup files. Collation, StorageContainerUri and + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} [parameters.storageContainerUri] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. * - * @returns {Promise} A promise is returned + * @param {string} [parameters.storageContainerSasToken] Conditional. If + * createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. * - * @reject {Error|ServiceError} - The error object. - */ - listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets all job steps for a job's current version. + * @param {string} parameters.location Resource location. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -22446,7 +26467,7 @@ export interface JobSteps { * * {Promise} A promise is returned. * - * @resolve {JobStepListResult} - The deserialized result object. + * @resolve {ManagedDatabase} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22454,114 +26475,55 @@ export interface JobSteps { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobStepListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobStepListResult} for more information. + * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedDatabase} 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. */ - listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJobNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * JobTargetExecutions - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface JobTargetExecutions { + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists target executions for all steps of a job execution. + * Deletes 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} serverName The name of the server. - * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {uuid} jobExecutionId The id of the job execution + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * - * @param {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. - * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. - * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. - * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. - * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. - * - * @param {number} [options.skip] The number of elements in the collection to - * skip. - * - * @param {number} [options.top] The number of elements to return from 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. */ - listByJobExecutionWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists target executions for all steps of a job execution. + * Deletes 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} serverName The name of the server. - * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {uuid} jobExecutionId The id of the job execution + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * - * @param {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. - * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. - * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. - * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. - * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. - * - * @param {number} [options.skip] The number of elements in the collection to - * skip. - * - * @param {number} [options.top] The number of elements to return from the - * collection. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -22572,7 +26534,7 @@ export interface JobTargetExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22580,109 +26542,139 @@ export interface JobTargetExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} 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. */ - listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, callback: ServiceCallback): void; - listByJobExecution(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the target executions of a job step execution. + * Updates an existing 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. * - * @param {string} jobName The name of the job to get. + * @param {object} parameters The requested database resource state. * - * @param {uuid} jobExecutionId The id of the job execution + * @param {string} [parameters.collation] Collation of the managed database. * - * @param {string} stepName The name of the step. + * @param {date} [parameters.restorePointInTime] Conditional. If createMode is + * PointInTimeRestore, this value is required. Specifies the point in time + * (ISO8601 format) of the source database that will be restored to create the + * new database. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.catalogCollation] Collation of the metadata + * catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' * - * @param {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. + * @param {string} [parameters.createMode] Managed database create mode. + * PointInTimeRestore: Create a database by restoring a point in time backup of + * an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by + * restoring from external backup files. Collation, StorageContainerUri and + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. + * @param {string} [parameters.storageContainerUri] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. + * @param {string} [parameters.sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. + * @param {string} [parameters.storageContainerSasToken] Conditional. If + * createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. * - * @param {number} [options.skip] The number of elements in the collection to - * skip. + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. * - * @param {number} [options.top] The number of elements to return from the - * collection. + * @param {object} [parameters.tags] Resource tags. + * + * @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. */ - listByStepWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the target executions of a job step execution. + * Updates an existing 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} databaseName The name of the database. * - * @param {string} jobName The name of the job to get. + * @param {object} parameters The requested database resource state. * - * @param {uuid} jobExecutionId The id of the job execution + * @param {string} [parameters.collation] Collation of the managed database. * - * @param {string} stepName The name of the step. + * @param {date} [parameters.restorePointInTime] Conditional. If createMode is + * PointInTimeRestore, this value is required. Specifies the point in time + * (ISO8601 format) of the source database that will be restored to create the + * new database. + * + * @param {string} [parameters.catalogCollation] Collation of the metadata + * catalog. Possible values include: 'DATABASE_DEFAULT', + * 'SQL_Latin1_General_CP1_CI_AS' * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.createMode] Managed database create mode. + * PointInTimeRestore: Create a database by restoring a point in time backup of + * an existing database. SourceDatabaseName, SourceManagedInstanceName and + * PointInTime must be specified. RestoreExternalBackup: Create a database by + * restoring from external backup files. Collation, StorageContainerUri and + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * - * @param {date} [options.createTimeMin] If specified, only job executions - * created at or after the specified time are included. + * @param {string} [parameters.storageContainerUri] Conditional. If createMode + * is RestoreExternalBackup, this value is required. Specifies the uri of the + * storage container where backups for this restore are stored. * - * @param {date} [options.createTimeMax] If specified, only job executions - * created before the specified time are included. + * @param {string} [parameters.sourceDatabaseId] The resource identifier of the + * source database associated with create operation of this database. * - * @param {date} [options.endTimeMin] If specified, only job executions - * completed at or after the specified time are included. + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. * - * @param {date} [options.endTimeMax] If specified, only job executions - * completed before the specified time are included. + * @param {string} [parameters.storageContainerSasToken] Conditional. If + * createMode is RestoreExternalBackup, this value is required. Specifies the + * storage container sas token. * - * @param {boolean} [options.isActive] If specified, only active or only - * completed job executions are included. + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. * - * @param {number} [options.skip] The number of elements in the collection to - * skip. + * @param {object} [parameters.tags] Resource tags. * - * @param {number} [options.top] The number of elements to return from the - * collection. + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -22694,7 +26686,7 @@ export interface JobTargetExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {ManagedDatabase} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22702,37 +26694,23 @@ export interface JobTargetExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} for more - * information. + * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedDatabase} 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. */ - listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options?: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }): Promise; - listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, callback: ServiceCallback): void; - listByStep(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, options: { createTimeMin? : Date, createTimeMax? : Date, endTimeMin? : Date, endTimeMax? : Date, isActive? : boolean, skip? : number, top? : number, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a target execution. - * - * @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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * - * @param {uuid} jobExecutionId The unique id of the job execution - * - * @param {string} stepName The name of the step. + * Gets a list of managed databases. * - * @param {uuid} targetId The target id. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -22741,30 +26719,17 @@ export interface JobTargetExecutions { * * @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, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a target execution. - * - * @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} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * - * @param {uuid} jobExecutionId The unique id of the job execution - * - * @param {string} stepName The name of the step. + * Gets a list of managed databases. * - * @param {uuid} targetId The target id. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -22778,7 +26743,7 @@ export interface JobTargetExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecution} - The deserialized result object. + * @resolve {ManagedDatabaseListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22786,23 +26751,38 @@ export interface JobTargetExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecution} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecution} for more information. + * {ManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedDatabaseListResult} 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, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobExecutionId: string, stepName: string, targetId: 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 + * ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies { /** - * Lists target executions for all steps of a job execution. + * Gets a dropped database's short term retention policy. * - * @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} restorableDroppedDatabaseId * * @param {object} [options] Optional Parameters. * @@ -22811,17 +26791,22 @@ export interface JobTargetExecutions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByJobExecutionNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists target executions for all steps of a job execution. + * Gets a dropped database's short term retention policy. * - * @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} restorableDroppedDatabaseId * * @param {object} [options] Optional Parameters. * @@ -22835,7 +26820,7 @@ export interface JobTargetExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22843,24 +26828,34 @@ export interface JobTargetExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} for more - * information. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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. */ - listByJobExecutionNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJobExecutionNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobExecutionNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the target executions of a job step execution. + * Sets a database's long term retention policy. * - * @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} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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. * @@ -22869,17 +26864,27 @@ export interface JobTargetExecutions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByStepNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the target executions of a job step execution. + * Sets a database's long term retention policy. * - * @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} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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. * @@ -22893,7 +26898,7 @@ export interface JobTargetExecutions { * * {Promise} A promise is returned. * - * @resolve {JobExecutionListResult} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22901,38 +26906,34 @@ export interface JobTargetExecutions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobExecutionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobExecutionListResult} for more - * information. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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. */ - listByStepNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByStepNext(nextPageLink: string, callback: ServiceCallback): void; - listByStepNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * JobTargetGroups - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface JobTargetGroups { + createOrUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all target groups in an agent. + * Sets a database's long 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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. * @@ -22941,22 +26942,27 @@ export interface JobTargetGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAgentWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all target groups in an agent. + * Sets a database's long 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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. * @@ -22970,7 +26976,7 @@ export interface JobTargetGroups { * * {Promise} A promise is returned. * - * @resolve {JobTargetGroupListResult} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -22978,31 +26984,29 @@ export interface JobTargetGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobTargetGroupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobTargetGroupListResult} for more - * information. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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. */ - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, callback: ServiceCallback): void; - listByAgent(resourceGroupName: string, serverName: string, jobAgentName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; + update(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a target group. + * Gets a dropped database's short term retention policy list. * * @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} jobAgentName The name of the job agent. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} targetGroupName The name of the target group. + * @param {string} restorableDroppedDatabaseId * * @param {object} [options] Optional Parameters. * @@ -23011,24 +27015,22 @@ export interface JobTargetGroups { * * @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, jobAgentName: string, targetGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByRestorableDroppedDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a target group. + * Gets a dropped database's short term retention policy list. * * @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} jobAgentName The name of the job agent. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} targetGroupName The name of the target group. + * @param {string} restorableDroppedDatabaseId * * @param {object} [options] Optional Parameters. * @@ -23042,7 +27044,7 @@ export interface JobTargetGroups { * * {Promise} A promise is returned. * - * @resolve {JobTargetGroup} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23050,34 +27052,35 @@ export interface JobTargetGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobTargetGroup} [result] - The deserialized result object if an error did not occur. - * See {@link JobTargetGroup} for more information. + * {ManagedBackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ManagedBackupShortTermRetentionPolicyListResult} 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, jobAgentName: string, targetGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + */ + listByRestorableDroppedDatabase(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByRestorableDroppedDatabase(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, callback: ServiceCallback): void; + listByRestorableDroppedDatabase(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a target group. + * Sets a database's long 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} jobAgentName The name of the job agent. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} targetGroupName The name of the target group. + * @param {string} restorableDroppedDatabaseId * - * @param {object} parameters The requested state of the target group. + * @param {object} parameters The long term retention policy info. * - * @param {array} parameters.members Members of the target group. + * @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. * @@ -23086,28 +27089,27 @@ export interface JobTargetGroups { * * @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, jobAgentName: string, targetGroupName: string, parameters: models.JobTargetGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a target group. + * Sets a database's long 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} jobAgentName The name of the job agent. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} targetGroupName The name of the target group. + * @param {string} restorableDroppedDatabaseId * - * @param {object} parameters The requested state of the target group. + * @param {object} parameters The long term retention policy info. * - * @param {array} parameters.members Members of the target group. + * @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. * @@ -23121,7 +27123,7 @@ export interface JobTargetGroups { * * {Promise} A promise is returned. * - * @resolve {JobTargetGroup} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23129,30 +27131,34 @@ export interface JobTargetGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobTargetGroup} [result] - The deserialized result object if an error did not occur. - * See {@link JobTargetGroup} for more information. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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, jobAgentName: string, targetGroupName: string, parameters: models.JobTargetGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: models.JobTargetGroup, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, parameters: models.JobTargetGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a target group. + * Sets a database's long 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} restorableDroppedDatabaseId * - * @param {string} targetGroupName The name of the target group. + * @param {object} parameters The long 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. * @@ -23161,24 +27167,27 @@ export interface JobTargetGroups { * * @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, jobAgentName: string, targetGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a target group. + * Sets a database's long 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} managedInstanceName The name of the managed instance. * - * @param {string} jobAgentName The name of the job agent. + * @param {string} restorableDroppedDatabaseId * - * @param {string} targetGroupName The name of the target group. + * @param {object} parameters The long 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. * @@ -23192,7 +27201,7 @@ export interface JobTargetGroups { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23200,19 +27209,21 @@ export interface JobTargetGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedBackupShortTermRetentionPolicy} 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, jobAgentName: string, targetGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, jobAgentName: string, targetGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; + beginUpdate(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all target groups in an agent. + * Gets a dropped database's short term retention policy list. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -23224,14 +27235,14 @@ export interface JobTargetGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByAgentNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByRestorableDroppedDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all target groups in an agent. + * Gets a dropped database's short term retention policy list. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -23248,7 +27259,7 @@ export interface JobTargetGroups { * * {Promise} A promise is returned. * - * @resolve {JobTargetGroupListResult} - The deserialized result object. + * @resolve {ManagedBackupShortTermRetentionPolicyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23256,30 +27267,31 @@ export interface JobTargetGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobTargetGroupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobTargetGroupListResult} for more - * information. + * {ManagedBackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ManagedBackupShortTermRetentionPolicyListResult} 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. */ - listByAgentNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByAgentNext(nextPageLink: string, callback: ServiceCallback): void; - listByAgentNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByRestorableDroppedDatabaseNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByRestorableDroppedDatabaseNext(nextPageLink: string, callback: ServiceCallback): void; + listByRestorableDroppedDatabaseNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * JobVersions + * ServerAutomaticTuningOperations * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface JobVersions { +export interface ServerAutomaticTuningOperations { /** - * Gets all versions of a job. + * Retrieves server automatic tuning options. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -23287,10 +27299,6 @@ export interface JobVersions { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -23298,14 +27306,14 @@ export interface JobVersions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByJobWithHttpOperationResponse(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all versions of a job. + * Retrieves server automatic tuning options. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -23313,10 +27321,6 @@ export interface JobVersions { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent. - * - * @param {string} jobName The name of the job to get. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -23329,7 +27333,7 @@ export interface JobVersions { * * {Promise} A promise is returned. * - * @resolve {JobVersionListResult} - The deserialized result object. + * @resolve {ServerAutomaticTuning} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23337,20 +27341,20 @@ export interface JobVersions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobVersionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobVersionListResult} for more information. + * {ServerAutomaticTuning} [result] - The deserialized result object if an error did not occur. + * See {@link ServerAutomaticTuning} 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. */ - listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, callback: ServiceCallback): void; - listByJob(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: 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; /** - * Gets a job version. + * Update automatic tuning options on server. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -23358,11 +27362,12 @@ export interface JobVersions { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent. + * @param {object} parameters The requested automatic tuning resource state. * - * @param {string} jobName The name of the job. + * @param {string} [parameters.desiredState] Automatic tuning desired state. + * Possible values include: 'Custom', 'Auto', 'Unspecified' * - * @param {number} jobVersion The version of the job to get. + * @param {object} [parameters.options] Automatic tuning options definition. * * @param {object} [options] Optional Parameters. * @@ -23371,14 +27376,14 @@ export interface JobVersions { * * @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, jobAgentName: string, jobName: string, jobVersion: number, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ServerAutomaticTuning, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a job version. + * Update automatic tuning options on server. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -23386,11 +27391,12 @@ export interface JobVersions { * * @param {string} serverName The name of the server. * - * @param {string} jobAgentName The name of the job agent. + * @param {object} parameters The requested automatic tuning resource state. * - * @param {string} jobName The name of the job. + * @param {string} [parameters.desiredState] Automatic tuning desired state. + * Possible values include: 'Custom', 'Auto', 'Unspecified' * - * @param {number} jobVersion The version of the job to get. + * @param {object} [parameters.options] Automatic tuning options definition. * * @param {object} [options] Optional Parameters. * @@ -23404,7 +27410,7 @@ export interface JobVersions { * * {Promise} A promise is returned. * - * @resolve {JobVersion} - The deserialized result object. + * @resolve {ServerAutomaticTuning} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23412,23 +27418,38 @@ export interface JobVersions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobVersion} [result] - The deserialized result object if an error did not occur. - * See {@link JobVersion} for more information. + * {ServerAutomaticTuning} [result] - The deserialized result object if an error did not occur. + * See {@link ServerAutomaticTuning} 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, jobAgentName: string, jobName: string, jobVersion: number, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, jobAgentName: string, jobName: string, jobVersion: number, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + update(resourceGroupName: string, serverName: string, parameters: models.ServerAutomaticTuning, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + update(resourceGroupName: string, serverName: string, parameters: models.ServerAutomaticTuning, callback: ServiceCallback): void; + update(resourceGroupName: string, serverName: string, parameters: models.ServerAutomaticTuning, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ServerDnsAliases + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ServerDnsAliases { /** - * Gets all versions of a job. + * Gets a server DNS alias. * - * @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 that the alias is pointing + * to. + * + * @param {string} dnsAliasName The name of the server DNS alias. * * @param {object} [options] Optional Parameters. * @@ -23437,17 +27458,23 @@ export interface JobVersions { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByJobNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all versions of a job. + * Gets a server DNS alias. * - * @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 that the alias is pointing + * to. + * + * @param {string} dnsAliasName The name of the server DNS alias. * * @param {object} [options] Optional Parameters. * @@ -23461,7 +27488,7 @@ export interface JobVersions { * * {Promise} A promise is returned. * - * @resolve {JobVersionListResult} - The deserialized result object. + * @resolve {ServerDnsAlias} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23469,37 +27496,29 @@ export interface JobVersions { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {JobVersionListResult} [result] - The deserialized result object if an error did not occur. - * See {@link JobVersionListResult} for more information. + * {ServerDnsAlias} [result] - The deserialized result object if an error did not occur. + * See {@link ServerDnsAlias} 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. */ - listByJobNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listByJobNext(nextPageLink: string, callback: ServiceCallback): void; - listByJobNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * LongTermRetentionBackups - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface LongTermRetentionBackups { + get(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, dnsAliasName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a long term retention backup. - * - * @param {string} locationName The location of the database. + * Creates a server dns alias. * - * @param {string} longTermRetentionServerName + * @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} longTermRetentionDatabaseName + * @param {string} serverName The name of the server that the alias is pointing + * to. * - * @param {string} backupName The backup name. + * @param {string} dnsAliasName The name of the server DNS alias. * * @param {object} [options] Optional Parameters. * @@ -23508,22 +27527,23 @@ export interface LongTermRetentionBackups { * * @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(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a long term retention backup. - * - * @param {string} locationName The location of the database. + * Creates a server dns alias. * - * @param {string} longTermRetentionServerName + * @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} longTermRetentionDatabaseName + * @param {string} serverName The name of the server that the alias is pointing + * to. * - * @param {string} backupName The backup name. + * @param {string} dnsAliasName The name of the server DNS alias. * * @param {object} [options] Optional Parameters. * @@ -23537,7 +27557,7 @@ export interface LongTermRetentionBackups { * * {Promise} A promise is returned. * - * @resolve {LongTermRetentionBackup} - The deserialized result object. + * @resolve {ServerDnsAlias} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23545,29 +27565,29 @@ export interface LongTermRetentionBackups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LongTermRetentionBackup} [result] - The deserialized result object if an error did not occur. - * See {@link LongTermRetentionBackup} for more - * information. + * {ServerDnsAlias} [result] - The deserialized result object if an error did not occur. + * See {@link ServerDnsAlias} 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(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, callback: ServiceCallback): void; - get(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a long term retention backup. - * - * @param {string} locationName The location of the database + * Deletes the server DNS alias with the given name. * - * @param {string} longTermRetentionServerName + * @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} longTermRetentionDatabaseName + * @param {string} serverName The name of the server that the alias is pointing + * to. * - * @param {string} backupName The backup name. + * @param {string} dnsAliasName The name of the server DNS alias. * * @param {object} [options] Optional Parameters. * @@ -23580,18 +27600,19 @@ export interface LongTermRetentionBackups { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a long term retention backup. - * - * @param {string} locationName The location of the database + * Deletes the server DNS alias with the given name. * - * @param {string} longTermRetentionServerName + * @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} longTermRetentionDatabaseName + * @param {string} serverName The name of the server that the alias is pointing + * to. * - * @param {string} backupName The backup name. + * @param {string} dnsAliasName The name of the server DNS alias. * * @param {object} [options] Optional Parameters. * @@ -23619,58 +27640,46 @@ export interface LongTermRetentionBackups { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, callback: ServiceCallback): void; - deleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all long term retention backups for a database. - * - * @param {string} locationName The location of the database + * Gets a list of server DNS aliases for a server. * - * @param {string} longTermRetentionServerName + * @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} longTermRetentionDatabaseName + * @param {string} serverName The name of the server that the alias is pointing + * to. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get - * the latest backup for each database. - * - * @param {string} [options.databaseState] Whether to query against just live - * databases, just deleted databases, or all databases. Possible values - * include: 'All', 'Live', 'Deleted' - * * @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(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByServerWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all long term retention backups for a database. - * - * @param {string} locationName The location of the database + * Gets a list of server DNS aliases for a server. * - * @param {string} longTermRetentionServerName + * @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} longTermRetentionDatabaseName + * @param {string} serverName The name of the server that the alias is pointing + * to. * * @param {object} [options] Optional Parameters. * - * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get - * the latest backup for each database. - * - * @param {string} [options.databaseState] Whether to query against just live - * databases, just deleted databases, or all databases. Possible values - * include: 'All', 'Live', 'Deleted' - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -23681,7 +27690,7 @@ export interface LongTermRetentionBackups { * * {Promise} A promise is returned. * - * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. + * @resolve {ServerDnsAliasListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23689,57 +27698,67 @@ export interface LongTermRetentionBackups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LongTermRetentionBackupListResult} for more + * {ServerDnsAliasListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ServerDnsAliasListResult} 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(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByDatabase(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, callback: ServiceCallback): void; - listByDatabase(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, options: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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 long term retention backups for a given location. + * Acquires server DNS alias from another server. * - * @param {string} locationName The location 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 {object} [options] Optional Parameters. + * @param {string} serverName The name of the server that the alias is pointing + * to. * - * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get - * the latest backup for each database. + * @param {string} dnsAliasName The name of the server dns alias. * - * @param {string} [options.databaseState] Whether to query against just live - * databases, just deleted databases, or all databases. Possible values - * include: 'All', 'Live', 'Deleted' + * @param {object} parameters + * + * @param {string} [parameters.oldServerDnsAliasId] The id of the server alias + * that will be acquired to point to this server instead. + * + * @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. */ - listByLocationWithHttpOperationResponse(locationName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + acquireWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the long term retention backups for a given location. + * Acquires server DNS alias from another server. * - * @param {string} locationName The location 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 {object} [options] Optional Parameters. + * @param {string} serverName The name of the server that the alias is pointing + * to. * - * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get - * the latest backup for each database. + * @param {string} dnsAliasName The name of the server dns alias. * - * @param {string} [options.databaseState] Whether to query against just live - * databases, just deleted databases, or all databases. Possible values - * include: 'All', 'Live', 'Deleted' + * @param {object} parameters + * + * @param {string} [parameters.oldServerDnsAliasId] The id of the server alias + * that will be acquired to point to this server instead. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -23751,7 +27770,7 @@ export interface LongTermRetentionBackups { * * {Promise} A promise is returned. * - * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23759,61 +27778,55 @@ export interface LongTermRetentionBackups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LongTermRetentionBackupListResult} 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. */ - listByLocation(locationName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByLocation(locationName: string, callback: ServiceCallback): void; - listByLocation(locationName: string, options: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + acquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + acquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, callback: ServiceCallback): void; + acquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the long term retention backups for a given server. - * - * @param {string} locationName The location of the database + * Creates a server dns alias. * - * @param {string} longTermRetentionServerName + * @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} serverName The name of the server that the alias is pointing + * to. * - * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get - * the latest backup for each database. + * @param {string} dnsAliasName The name of the server DNS alias. * - * @param {string} [options.databaseState] Whether to query against just live - * databases, just deleted databases, or all databases. Possible values - * include: 'All', 'Live', 'Deleted' + * @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. */ - listByServerWithHttpOperationResponse(locationName: string, longTermRetentionServerName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the long term retention backups for a given server. - * - * @param {string} locationName The location of the database + * Creates a server dns alias. * - * @param {string} longTermRetentionServerName + * @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} serverName The name of the server that the alias is pointing + * to. * - * @param {boolean} [options.onlyLatestPerDatabase] Whether or not to only get - * the latest backup for each database. + * @param {string} dnsAliasName The name of the server DNS alias. * - * @param {string} [options.databaseState] Whether to query against just live - * databases, just deleted databases, or all databases. Possible values - * include: 'All', 'Live', 'Deleted' + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -23825,7 +27838,7 @@ export interface LongTermRetentionBackups { * * {Promise} A promise is returned. * - * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. + * @resolve {ServerDnsAlias} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -23833,29 +27846,29 @@ export interface LongTermRetentionBackups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LongTermRetentionBackupListResult} for more - * information. + * {ServerDnsAlias} [result] - The deserialized result object if an error did not occur. + * See {@link ServerDnsAlias} 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(locationName: string, longTermRetentionServerName: string, options?: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listByServer(locationName: string, longTermRetentionServerName: string, callback: ServiceCallback): void; - listByServer(locationName: string, longTermRetentionServerName: string, options: { onlyLatestPerDatabase? : boolean, databaseState? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes a long term retention backup. - * - * @param {string} locationName The location of the database + * Deletes the server DNS alias with the given name. * - * @param {string} longTermRetentionServerName + * @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} longTermRetentionDatabaseName + * @param {string} serverName The name of the server that the alias is pointing + * to. * - * @param {string} backupName The backup name. + * @param {string} dnsAliasName The name of the server DNS alias. * * @param {object} [options] Optional Parameters. * @@ -23868,18 +27881,19 @@ export interface LongTermRetentionBackups { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a long term retention backup. - * - * @param {string} locationName The location of the database + * Deletes the server DNS alias with the given name. * - * @param {string} longTermRetentionServerName + * @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} longTermRetentionDatabaseName + * @param {string} serverName The name of the server that the alias is pointing + * to. * - * @param {string} backupName The backup name. + * @param {string} dnsAliasName The name of the server DNS alias. * * @param {object} [options] Optional Parameters. * @@ -23907,16 +27921,27 @@ export interface LongTermRetentionBackups { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, callback: ServiceCallback): void; - beginDeleteMethod(locationName: string, longTermRetentionServerName: string, longTermRetentionDatabaseName: string, backupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all long term retention backups for a database. + * Acquires server DNS alias from another 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} serverName The name of the server that the alias is pointing + * to. + * + * @param {string} dnsAliasName The name of the server dns alias. + * + * @param {object} parameters + * + * @param {string} [parameters.oldServerDnsAliasId] The id of the server alias + * that will be acquired to point to this server instead. * * @param {object} [options] Optional Parameters. * @@ -23925,17 +27950,28 @@ export interface LongTermRetentionBackups { * * @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>; + beginAcquireWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all long term retention backups for a database. + * Acquires server DNS alias from another 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} serverName The name of the server that the alias is pointing + * to. + * + * @param {string} dnsAliasName The name of the server dns alias. + * + * @param {object} parameters + * + * @param {string} [parameters.oldServerDnsAliasId] The id of the server alias + * that will be acquired to point to this server instead. * * @param {object} [options] Optional Parameters. * @@ -23949,29 +27985,27 @@ export interface LongTermRetentionBackups { * * {Promise} A promise is returned. * - * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. + * @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. - * - * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LongTermRetentionBackupListResult} for more - * information. + * {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. */ - 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; + beginAcquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginAcquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, callback: ServiceCallback): void; + beginAcquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists the long term retention backups for a given location. + * Gets a list of server DNS aliases for a server. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -23983,14 +28017,14 @@ export interface LongTermRetentionBackups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByLocationNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByServerNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the long term retention backups for a given location. + * Gets a list of server DNS aliases for a server. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -24007,7 +28041,7 @@ export interface LongTermRetentionBackups { * * {Promise} A promise is returned. * - * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. + * @resolve {ServerDnsAliasListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24015,24 +28049,36 @@ export interface LongTermRetentionBackups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LongTermRetentionBackupListResult} for more + * {ServerDnsAliasListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ServerDnsAliasListResult} 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; + 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 + * ServerSecurityAlertPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ServerSecurityAlertPolicies { /** - * Lists the long term retention backups for a given server. + * Get a server's security alert policy. * - * @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 {object} [options] Optional Parameters. * @@ -24041,17 +28087,20 @@ export interface LongTermRetentionBackups { * * @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>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the long term retention backups for a given server. + * Get a server's security alert policy. * - * @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 {object} [options] Optional Parameters. * @@ -24065,7 +28114,7 @@ export interface LongTermRetentionBackups { * * {Promise} A promise is returned. * - * @resolve {LongTermRetentionBackupListResult} - The deserialized result object. + * @resolve {ServerSecurityAlertPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24073,30 +28122,21 @@ export interface LongTermRetentionBackups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LongTermRetentionBackupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LongTermRetentionBackupListResult} for more + * {ServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ServerSecurityAlertPolicy} 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 - * BackupLongTermRetentionPolicies - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface BackupLongTermRetentionPolicies { + 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; /** - * Gets a database's long term retention policy. + * Creates or updates a threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -24104,7 +28144,32 @@ export interface BackupLongTermRetentionPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -24113,14 +28178,14 @@ export interface BackupLongTermRetentionPolicies { * * @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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's long term retention policy. + * Creates or updates a threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -24128,7 +28193,32 @@ export interface BackupLongTermRetentionPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -24142,7 +28232,7 @@ export interface BackupLongTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupLongTermRetentionPolicy} - The deserialized result object. + * @resolve {ServerSecurityAlertPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24150,21 +28240,21 @@ export interface BackupLongTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupLongTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link BackupLongTermRetentionPolicy} for more + * {ServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ServerSecurityAlertPolicy} 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, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Sets a database's long term retention policy. + * Creates or updates a threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -24172,21 +28262,32 @@ export interface BackupLongTermRetentionPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The server security alert policy. * - * @param {object} parameters The long term retention policy info. + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' * - * @param {string} [parameters.weeklyRetention] The weekly retention policy for - * an LTR backup in an ISO 8601 format. + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action * - * @param {string} [parameters.monthlyRetention] The monthly retention policy - * for an LTR backup in an ISO 8601 format. + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. * - * @param {string} [parameters.yearlyRetention] The yearly retention policy for - * an LTR backup in an ISO 8601 format. + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. * - * @param {number} [parameters.weekOfYear] The week of year to take the yearly - * backup in an ISO 8601 format. + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -24195,14 +28296,14 @@ export interface BackupLongTermRetentionPolicies { * * @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.BackupLongTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Sets a database's long term retention policy. + * Creates or updates a threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -24210,21 +28311,32 @@ export interface BackupLongTermRetentionPolicies { * * @param {string} serverName The name of the server. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The server security alert policy. * - * @param {object} parameters The long term retention policy info. + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' * - * @param {string} [parameters.weeklyRetention] The weekly retention policy for - * an LTR backup in an ISO 8601 format. + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action * - * @param {string} [parameters.monthlyRetention] The monthly retention policy - * for an LTR backup in an ISO 8601 format. + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. * - * @param {string} [parameters.yearlyRetention] The yearly retention policy for - * an LTR backup in an ISO 8601 format. + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. * - * @param {number} [parameters.weekOfYear] The week of year to take the yearly - * backup in an ISO 8601 format. + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -24238,7 +28350,7 @@ export interface BackupLongTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupLongTermRetentionPolicy} - The deserialized result object. + * @resolve {ServerSecurityAlertPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24246,29 +28358,36 @@ export interface BackupLongTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupLongTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link BackupLongTermRetentionPolicy} for more + * {ServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ServerSecurityAlertPolicy} 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.BackupLongTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * RestorableDroppedManagedDatabases + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface RestorableDroppedManagedDatabases { /** - * Gets a database's long term retention policy. + * Gets a list of restorable dropped managed databases. * * @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} managedInstanceName The name of the managed instance. * * @param {object} [options] Optional Parameters. * @@ -24277,22 +28396,20 @@ export interface BackupLongTermRetentionPolicies { * * @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>; + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's long term retention policy. + * Gets a list of restorable dropped managed databases. * * @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} managedInstanceName The name of the managed instance. * * @param {object} [options] Optional Parameters. * @@ -24306,7 +28423,7 @@ export interface BackupLongTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupLongTermRetentionPolicy} - The deserialized result object. + * @resolve {RestorableDroppedManagedDatabaseListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24314,43 +28431,29 @@ export interface BackupLongTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupLongTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link BackupLongTermRetentionPolicy} for more - * information. + * {RestorableDroppedManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RestorableDroppedManagedDatabaseListResult} + * 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; + 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; /** - * Sets a database's long term retention policy. + * Gets a restorable dropped 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} serverName The name of the server. - * - * @param {string} databaseName The name of the database. - * - * @param {object} parameters The long term retention policy info. - * - * @param {string} [parameters.weeklyRetention] The weekly retention policy for - * an LTR backup in an ISO 8601 format. - * - * @param {string} [parameters.monthlyRetention] The monthly retention policy - * for an LTR backup in an ISO 8601 format. - * - * @param {string} [parameters.yearlyRetention] The yearly retention policy for - * an LTR backup in an ISO 8601 format. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {number} [parameters.weekOfYear] The week of year to take the yearly - * backup in an ISO 8601 format. + * @param {string} restorableDroppedDatabaseId * * @param {object} [options] Optional Parameters. * @@ -24359,36 +28462,22 @@ export interface BackupLongTermRetentionPolicies { * * @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.BackupLongTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Sets a database's long term retention policy. + * Gets a restorable dropped 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} serverName The name of the server. - * - * @param {string} databaseName The name of the database. - * - * @param {object} parameters The long term retention policy info. - * - * @param {string} [parameters.weeklyRetention] The weekly retention policy for - * an LTR backup in an ISO 8601 format. - * - * @param {string} [parameters.monthlyRetention] The monthly retention policy - * for an LTR backup in an ISO 8601 format. - * - * @param {string} [parameters.yearlyRetention] The yearly retention policy for - * an LTR backup in an ISO 8601 format. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {number} [parameters.weekOfYear] The week of year to take the yearly - * backup in an ISO 8601 format. + * @param {string} restorableDroppedDatabaseId * * @param {object} [options] Optional Parameters. * @@ -24402,7 +28491,7 @@ export interface BackupLongTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupLongTermRetentionPolicy} - The deserialized result object. + * @resolve {RestorableDroppedManagedDatabase} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24410,38 +28499,24 @@ export interface BackupLongTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {BackupLongTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link BackupLongTermRetentionPolicy} for more + * {RestorableDroppedManagedDatabase} [result] - The deserialized result object if an error did not occur. + * See {@link RestorableDroppedManagedDatabase} 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.BackupLongTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupLongTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ManagedBackupShortTermRetentionPolicies - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ManagedBackupShortTermRetentionPolicies { + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, callback: ServiceCallback): void; + get(resourceGroupName: string, managedInstanceName: string, restorableDroppedDatabaseId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a managed 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} managedInstanceName The name of the managed instance. + * Gets a list of restorable dropped managed databases. * - * @param {string} databaseName The name of the database. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -24450,22 +28525,17 @@ export interface ManagedBackupShortTermRetentionPolicies { * * @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>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a managed 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} managedInstanceName The name of the managed instance. + * Gets a list of restorable dropped managed databases. * - * @param {string} databaseName The name of the database. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -24479,7 +28549,7 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {RestorableDroppedManagedDatabaseListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24487,35 +28557,39 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedBackupShortTermRetentionPolicy} for - * more information. + * {RestorableDroppedManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RestorableDroppedManagedDatabaseListResult} + * 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; + 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 + * RestorePoints + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface RestorePoints { /** - * Updates a managed database's short term retention policy. + * Gets a list of database restore points. * * @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. * - * @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 @@ -24523,28 +28597,23 @@ export interface ManagedBackupShortTermRetentionPolicies { * * @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.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a managed database's short term retention policy. + * Gets a list of database restore points. * * @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. * - * @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 @@ -24557,7 +28626,7 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {RestorePointListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24565,34 +28634,35 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedBackupShortTermRetentionPolicy} for - * more information. + * {RestorePointListResult} [result] - The deserialized result object if an error did not occur. + * See {@link RestorePointListResult} 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.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, 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; /** - * Updates a managed database's short term retention policy. + * Creates a restore point for a data warehouse. * * @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. * - * @param {object} parameters The short term retention policy info. + * @param {object} parameters The definition for creating the restore point of + * this database. * - * @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.restorePointLabel The restore point label to + * apply * * @param {object} [options] Optional Parameters. * @@ -24601,27 +28671,28 @@ export interface ManagedBackupShortTermRetentionPolicies { * * @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, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a managed database's short term retention policy. + * Creates a restore point for a data warehouse. * * @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. * - * @param {object} parameters The short term retention policy info. + * @param {object} parameters The definition for creating the restore point of + * this database. * - * @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.restorePointLabel The restore point label to + * apply * * @param {object} [options] Optional Parameters. * @@ -24635,7 +28706,7 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {RestorePoint} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24643,30 +28714,31 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedBackupShortTermRetentionPolicy} for - * more information. + * {RestorePoint} [result] - The deserialized result object if an error did not occur. + * See {@link RestorePoint} 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, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; - update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, callback: ServiceCallback): void; + create(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a managed database's short term retention policy list. + * Gets a restore point. * * @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. * + * @param {string} restorePointName The name of the restore point. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -24674,23 +28746,25 @@ export interface ManagedBackupShortTermRetentionPolicies { * * @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>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a managed database's short term retention policy list. + * Gets a restore point. * * @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. * + * @param {string} restorePointName The name of the restore point. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -24703,7 +28777,7 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {ManagedBackupShortTermRetentionPolicyListResult} - The deserialized result object. + * @resolve {RestorePoint} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24711,35 +28785,30 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedBackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * ManagedBackupShortTermRetentionPolicyListResult} for - * more information. + * {RestorePoint} [result] - The deserialized result object if an error did not occur. + * See {@link RestorePoint} 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; + get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a managed database's short term retention policy. + * Deletes a restore point. * * @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. * - * @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} restorePointName The name of the restore point. * * @param {object} [options] Optional Parameters. * @@ -24748,27 +28817,24 @@ export interface ManagedBackupShortTermRetentionPolicies { * * @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, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a managed database's short term retention policy. + * Deletes a restore point. * * @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. * - * @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} restorePointName The name of the restore point. * * @param {object} [options] Optional Parameters. * @@ -24782,7 +28848,7 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24790,34 +28856,33 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedBackupShortTermRetentionPolicy} 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, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a managed database's short term retention policy. + * Creates a restore point for a data warehouse. * * @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. * - * @param {object} parameters The short term retention policy info. + * @param {object} parameters The definition for creating the restore point of + * this database. * - * @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.restorePointLabel The restore point label to + * apply * * @param {object} [options] Optional Parameters. * @@ -24826,27 +28891,28 @@ export interface ManagedBackupShortTermRetentionPolicies { * * @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, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a managed database's short term retention policy. + * Creates a restore point for a data warehouse. * * @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. * - * @param {object} parameters The short term retention policy info. + * @param {object} parameters The definition for creating the restore point of + * this database. * - * @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.restorePointLabel The restore point label to + * apply * * @param {object} [options] Optional Parameters. * @@ -24860,7 +28926,7 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {ManagedBackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {RestorePoint} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24868,24 +28934,38 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedBackupShortTermRetentionPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedBackupShortTermRetentionPolicy} for - * more information. + * {RestorePoint} [result] - The deserialized result object if an error did not occur. + * See {@link RestorePoint} 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, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedBackupShortTermRetentionPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ManagedDatabaseSecurityAlertPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedDatabaseSecurityAlertPolicies { /** - * Gets a managed database's short term retention policy list. + * Gets a managed database's security alert policy. * - * @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 managed database for which the + * security alert policy is defined. * * @param {object} [options] Optional Parameters. * @@ -24894,17 +28974,23 @@ export interface ManagedBackupShortTermRetentionPolicies { * * @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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a managed database's short term retention policy list. + * Gets a managed database's security alert policy. * - * @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 managed database for which the + * security alert policy is defined. * * @param {object} [options] Optional Parameters. * @@ -24918,7 +29004,7 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {ManagedBackupShortTermRetentionPolicyListResult} - The deserialized result object. + * @resolve {ManagedDatabaseSecurityAlertPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -24926,42 +29012,57 @@ export interface ManagedBackupShortTermRetentionPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedBackupShortTermRetentionPolicyListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * ManagedBackupShortTermRetentionPolicyListResult} for - * more information. + * {ManagedDatabaseSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedDatabaseSecurityAlertPolicy} 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 - * ManagedDatabases - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ManagedDatabases { + 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; /** - * Completes the restore operation on a managed database. + * Creates or updates a database's security alert policy. * - * @param {string} locationName The name of the region where the resource is - * located. + * @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 {uuid} operationId Management operation id that this request tries to - * complete. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} parameters The definition for completing the restore of this - * managed database. + * @param {string} databaseName The name of the managed database for which the + * security alert policy is defined. * - * @param {string} parameters.lastBackupName The last backup name to apply + * @param {object} parameters The database security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -24970,25 +29071,50 @@ export interface ManagedDatabases { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - completeRestoreWithHttpOperationResponse(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Completes the restore operation on a managed database. + * Creates or updates a database's security alert policy. * - * @param {string} locationName The name of the region where the resource is - * located. + * @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 {uuid} operationId Management operation id that this request tries to - * complete. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} parameters The definition for completing the restore of this - * managed database. + * @param {string} databaseName The name of the managed database for which the + * security alert policy is defined. * - * @param {string} parameters.lastBackupName The last backup name to apply + * @param {object} parameters The database security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -25002,7 +29128,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedDatabaseSecurityAlertPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25010,19 +29136,30 @@ export interface ManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {ManagedDatabaseSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedDatabaseSecurityAlertPolicy} 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. */ - completeRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - completeRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, callback: ServiceCallback): void; - completeRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseSecurityAlertPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseSecurityAlertPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ManagedServerSecurityAlertPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedServerSecurityAlertPolicies { /** - * Gets a list of managed databases. + * Get a managed server's threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -25037,14 +29174,14 @@ export interface ManagedDatabases { * * @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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of managed databases. + * Get a managed server's threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -25064,7 +29201,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {ManagedDatabaseListResult} - The deserialized result object. + * @resolve {ManagedServerSecurityAlertPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25072,21 +29209,21 @@ export interface ManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedDatabaseListResult} for more + * {ManagedServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedServerSecurityAlertPolicy} 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, 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 managed database. + * Creates or updates a threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -25094,7 +29231,32 @@ export interface ManagedDatabases { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The managed server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -25103,14 +29265,14 @@ export interface ManagedDatabases { * * @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>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a managed database. + * Creates or updates a threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -25118,7 +29280,32 @@ export interface ManagedDatabases { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The managed server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -25132,7 +29319,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {ManagedDatabase} - The deserialized result object. + * @resolve {ManagedServerSecurityAlertPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25140,20 +29327,21 @@ export interface ManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedDatabase} for more information. + * {ManagedServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedServerSecurityAlertPolicy} 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; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedServerSecurityAlertPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedServerSecurityAlertPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates a new database or updates an existing database. + * Creates or updates a threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -25161,43 +29349,32 @@ export interface ManagedDatabases { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. - * - * @param {object} parameters The requested database resource state. - * - * @param {string} [parameters.collation] Collation of the managed database. - * - * @param {date} [parameters.restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. + * @param {object} parameters The managed server security alert policy. * - * @param {string} [parameters.catalogCollation] Collation of the metadata - * catalog. Possible values include: 'DATABASE_DEFAULT', - * 'SQL_Latin1_General_CP1_CI_AS' + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' * - * @param {string} [parameters.createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action * - * @param {string} [parameters.storageContainerUri] Conditional. If createMode - * is RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. * - * @param {string} [parameters.sourceDatabaseId] The resource identifier of the - * source database associated with create operation of this database. + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. * - * @param {string} [parameters.storageContainerSasToken] Conditional. If - * createMode is RestoreExternalBackup, this value is required. Specifies the - * storage container sas token. + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. * - * @param {string} parameters.location Resource location. + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. * - * @param {object} [parameters.tags] Resource tags. + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -25206,14 +29383,14 @@ export interface ManagedDatabases { * * @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.ManagedDatabase, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a new database or updates an existing database. + * Creates or updates a threat detection policy. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -25221,43 +29398,32 @@ export interface ManagedDatabases { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. - * - * @param {object} parameters The requested database resource state. - * - * @param {string} [parameters.collation] Collation of the managed database. - * - * @param {date} [parameters.restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. + * @param {object} parameters The managed server security alert policy. * - * @param {string} [parameters.catalogCollation] Collation of the metadata - * catalog. Possible values include: 'DATABASE_DEFAULT', - * 'SQL_Latin1_General_CP1_CI_AS' + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' * - * @param {string} [parameters.createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action * - * @param {string} [parameters.storageContainerUri] Conditional. If createMode - * is RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. * - * @param {string} [parameters.sourceDatabaseId] The resource identifier of the - * source database associated with create operation of this database. + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. * - * @param {string} [parameters.storageContainerSasToken] Conditional. If - * createMode is RestoreExternalBackup, this value is required. Specifies the - * storage container sas token. + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. * - * @param {string} parameters.location Resource location. + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. * - * @param {object} [parameters.tags] Resource tags. + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. * * @param {object} [options] Optional Parameters. * @@ -25271,7 +29437,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {ManagedDatabase} - The deserialized result object. + * @resolve {ManagedServerSecurityAlertPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25279,55 +29445,71 @@ export interface ManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedDatabase} for more information. + * {ManagedServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link ManagedServerSecurityAlertPolicy} 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.ManagedDatabase, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedServerSecurityAlertPolicy, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedServerSecurityAlertPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * SensitivityLabels + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface SensitivityLabels { /** - * Deletes the managed 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 * 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. * * @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. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listCurrentByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the managed 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 * 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. * * @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 * @@ -25338,7 +29520,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25346,121 +29528,65 @@ export interface ManagedDatabases { * * {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, 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; + 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; /** - * Updates an existing 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 * 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. * - * @param {object} parameters The requested database resource state. - * - * @param {string} [parameters.collation] Collation of the managed database. - * - * @param {date} [parameters.restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. - * - * @param {string} [parameters.catalogCollation] Collation of the metadata - * catalog. Possible values include: 'DATABASE_DEFAULT', - * 'SQL_Latin1_General_CP1_CI_AS' - * - * @param {string} [parameters.createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - * - * @param {string} [parameters.storageContainerUri] Conditional. If createMode - * is RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. - * - * @param {string} [parameters.sourceDatabaseId] The resource identifier of the - * source database associated with create operation of this database. - * - * @param {string} [parameters.storageContainerSasToken] Conditional. If - * createMode is RestoreExternalBackup, this value is required. Specifies the - * storage container sas token. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [options.skipToken] * - * @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. */ - updateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listRecommendedByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { skipToken? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates an existing 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 * 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. * - * @param {object} parameters The requested database resource state. - * - * @param {string} [parameters.collation] Collation of the managed database. - * - * @param {date} [parameters.restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. - * - * @param {string} [parameters.catalogCollation] Collation of the metadata - * catalog. Possible values include: 'DATABASE_DEFAULT', - * 'SQL_Latin1_General_CP1_CI_AS' - * - * @param {string} [parameters.createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - * - * @param {string} [parameters.storageContainerUri] Conditional. If createMode - * is RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. - * - * @param {string} [parameters.sourceDatabaseId] The resource identifier of the - * source database associated with create operation of this database. - * - * @param {string} [parameters.storageContainerSasToken] Conditional. If - * createMode is RestoreExternalBackup, this value is required. Specifies the - * storage container sas token. + * @param {object} [options] Optional Parameters. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [options.skipToken] * - * @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 @@ -25472,7 +29598,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {ManagedDatabase} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25480,31 +29606,38 @@ export interface ManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedDatabase} 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. */ - update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, callback: ServiceCallback): void; - update(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, 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; /** - * Completes the restore operation on a managed database. + * Gets the sensitivity label of a given column * - * @param {string} locationName The name of the region where the resource is - * located. + * @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 {uuid} operationId Management operation id that this request tries to - * complete. + * @param {string} serverName The name of the server. * - * @param {object} parameters The definition for completing the restore of this - * managed database. + * @param {string} databaseName The name of the database. * - * @param {string} parameters.lastBackupName The last backup name to apply + * @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. * @@ -25513,25 +29646,31 @@ export interface ManagedDatabases { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCompleteRestoreWithHttpOperationResponse(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, 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>; /** - * Completes the restore operation on a managed database. + * Gets the sensitivity label of a given column * - * @param {string} locationName The name of the region where the resource is - * located. + * @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 {uuid} operationId Management operation id that this request tries to - * complete. + * @param {string} serverName The name of the server. * - * @param {object} parameters The definition for completing the restore of this - * managed database. + * @param {string} databaseName The name of the database. * - * @param {string} parameters.lastBackupName The last backup name to apply + * @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. * @@ -25545,7 +29684,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SensitivityLabel} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25553,63 +29692,44 @@ export interface ManagedDatabases { * * {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. */ - beginCompleteRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCompleteRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, callback: ServiceCallback): void; - beginCompleteRestore(locationName: string, operationId: string, parameters: models.CompleteDatabaseRestoreDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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; /** - * Creates a new database or updates an existing database. + * 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} serverName The name of the server. * * @param {string} databaseName The name of the database. * - * @param {object} parameters The requested database resource state. - * - * @param {string} [parameters.collation] Collation of the managed database. - * - * @param {date} [parameters.restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. + * @param {string} schemaName The name of the schema. * - * @param {string} [parameters.catalogCollation] Collation of the metadata - * catalog. Possible values include: 'DATABASE_DEFAULT', - * 'SQL_Latin1_General_CP1_CI_AS' + * @param {string} tableName The name of the table. * - * @param {string} [parameters.createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * @param {string} columnName The name of the column. * - * @param {string} [parameters.storageContainerUri] Conditional. If createMode - * is RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. + * @param {object} parameters The column sensitivity label resource. * - * @param {string} [parameters.sourceDatabaseId] The resource identifier of the - * source database associated with create operation of this database. + * @param {string} [parameters.labelName] The label name. * - * @param {string} [parameters.storageContainerSasToken] Conditional. If - * createMode is RestoreExternalBackup, this value is required. Specifies the - * storage container sas token. + * @param {string} [parameters.labelId] The label ID. * - * @param {string} parameters.location Resource location. + * @param {string} [parameters.informationType] The information type. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [parameters.informationTypeId] The information type ID. * * @param {object} [options] Optional Parameters. * @@ -25618,58 +29738,38 @@ export interface ManagedDatabases { * * @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, databaseName: string, parameters: models.ManagedDatabase, 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>; /** - * Creates a new database or updates an existing database. + * 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} serverName The name of the server. * * @param {string} databaseName The name of the database. * - * @param {object} parameters The requested database resource state. - * - * @param {string} [parameters.collation] Collation of the managed database. - * - * @param {date} [parameters.restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. + * @param {string} schemaName The name of the schema. * - * @param {string} [parameters.catalogCollation] Collation of the metadata - * catalog. Possible values include: 'DATABASE_DEFAULT', - * 'SQL_Latin1_General_CP1_CI_AS' + * @param {string} tableName The name of the table. * - * @param {string} [parameters.createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * @param {string} columnName The name of the column. * - * @param {string} [parameters.storageContainerUri] Conditional. If createMode - * is RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. + * @param {object} parameters The column sensitivity label resource. * - * @param {string} [parameters.sourceDatabaseId] The resource identifier of the - * source database associated with create operation of this database. + * @param {string} [parameters.labelName] The label name. * - * @param {string} [parameters.storageContainerSasToken] Conditional. If - * createMode is RestoreExternalBackup, this value is required. Specifies the - * storage container sas token. + * @param {string} [parameters.labelId] The label ID. * - * @param {string} parameters.location Resource location. + * @param {string} [parameters.informationType] The information type. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [parameters.informationTypeId] The information type ID. * * @param {object} [options] Optional Parameters. * @@ -25683,7 +29783,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {ManagedDatabase} - The deserialized result object. + * @resolve {SensitivityLabel} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25691,29 +29791,35 @@ export interface ManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedDatabase} 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. */ - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabase, 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; /** - * Deletes the managed database. + * 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} 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 {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -25725,19 +29831,25 @@ export interface ManagedDatabases { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: 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>; /** - * Deletes the managed database. + * 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} 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 {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -25764,55 +29876,16 @@ export interface ManagedDatabases { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, managedInstanceName: string, databaseName: 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; /** - * Updates an existing 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} parameters The requested database resource state. - * - * @param {string} [parameters.collation] Collation of the managed database. + * Gets the sensitivity labels of a given database * - * @param {date} [parameters.restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. - * - * @param {string} [parameters.catalogCollation] Collation of the metadata - * catalog. Possible values include: 'DATABASE_DEFAULT', - * 'SQL_Latin1_General_CP1_CI_AS' - * - * @param {string} [parameters.createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - * - * @param {string} [parameters.storageContainerUri] Conditional. If createMode - * is RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. - * - * @param {string} [parameters.sourceDatabaseId] The resource identifier of the - * source database associated with create operation of this database. - * - * @param {string} [parameters.storageContainerSasToken] Conditional. If - * createMode is RestoreExternalBackup, this value is required. Specifies the - * storage container sas token. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -25821,56 +29894,17 @@ export interface ManagedDatabases { * * @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, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listCurrentByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates an existing 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} parameters The requested database resource state. - * - * @param {string} [parameters.collation] Collation of the managed database. - * - * @param {date} [parameters.restorePointInTime] Conditional. If createMode is - * PointInTimeRestore, this value is required. Specifies the point in time - * (ISO8601 format) of the source database that will be restored to create the - * new database. - * - * @param {string} [parameters.catalogCollation] Collation of the metadata - * catalog. Possible values include: 'DATABASE_DEFAULT', - * 'SQL_Latin1_General_CP1_CI_AS' - * - * @param {string} [parameters.createMode] Managed database create mode. - * PointInTimeRestore: Create a database by restoring a point in time backup of - * an existing database. SourceDatabaseName, SourceManagedInstanceName and - * PointInTime must be specified. RestoreExternalBackup: Create a database by - * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' - * - * @param {string} [parameters.storageContainerUri] Conditional. If createMode - * is RestoreExternalBackup, this value is required. Specifies the uri of the - * storage container where backups for this restore are stored. - * - * @param {string} [parameters.sourceDatabaseId] The resource identifier of the - * source database associated with create operation of this database. - * - * @param {string} [parameters.storageContainerSasToken] Conditional. If - * createMode is RestoreExternalBackup, this value is required. Specifies the - * storage container sas token. + * Gets the sensitivity labels of a given database * - * @param {object} [parameters.tags] Resource tags. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -25884,7 +29918,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {ManagedDatabase} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25892,20 +29926,21 @@ export interface ManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedDatabase} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedDatabase} 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. */ - beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, callback: ServiceCallback): void; - beginUpdate(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.ManagedDatabaseUpdate, 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; /** - * Gets a list of managed databases. + * Gets the sensitivity labels of a given database * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -25917,14 +29952,14 @@ export interface ManagedDatabases { * * @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>; + listRecommendedByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of managed databases. + * Gets the sensitivity labels of a given database * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -25941,7 +29976,7 @@ export interface ManagedDatabases { * * {Promise} A promise is returned. * - * @resolve {ManagedDatabaseListResult} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -25949,30 +29984,30 @@ export interface ManagedDatabases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ManagedDatabaseListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ManagedDatabaseListResult} 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. */ - 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; + 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 - * ServerAutomaticTuningOperations + * DatabaseOperations * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface ServerAutomaticTuningOperations { +export interface DatabaseOperations { /** - * Retrieves server automatic tuning options. + * 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 @@ -25980,6 +30015,10 @@ export interface ServerAutomaticTuningOperations { * * @param {string} serverName The name of the server. * + * @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 @@ -25987,14 +30026,14 @@ export interface ServerAutomaticTuningOperations { * * @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>; + cancelWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieves server automatic tuning options. + * 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 @@ -26002,6 +30041,10 @@ export interface ServerAutomaticTuningOperations { * * @param {string} serverName The name of the server. * + * @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 @@ -26014,7 +30057,7 @@ export interface ServerAutomaticTuningOperations { * * {Promise} A promise is returned. * - * @resolve {ServerAutomaticTuning} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26022,20 +30065,19 @@ export interface ServerAutomaticTuningOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerAutomaticTuning} [result] - The deserialized result object if an error did not occur. - * See {@link ServerAutomaticTuning} 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; + 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; /** - * Update automatic tuning options on server. + * 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 @@ -26043,12 +30085,7 @@ export interface ServerAutomaticTuningOperations { * * @param {string} serverName The name of the server. * - * @param {object} parameters The requested automatic tuning resource state. - * - * @param {string} [parameters.desiredState] Automatic tuning desired state. - * Possible values include: 'Custom', 'Auto', 'Unspecified' - * - * @param {object} [parameters.options] Automatic tuning options definition. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -26057,14 +30094,14 @@ export interface ServerAutomaticTuningOperations { * * @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, parameters: models.ServerAutomaticTuning, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Update automatic tuning options on server. + * 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 @@ -26072,12 +30109,7 @@ export interface ServerAutomaticTuningOperations { * * @param {string} serverName The name of the server. * - * @param {object} parameters The requested automatic tuning resource state. - * - * @param {string} [parameters.desiredState] Automatic tuning desired state. - * Possible values include: 'Custom', 'Auto', 'Unspecified' - * - * @param {object} [parameters.options] Automatic tuning options definition. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -26091,7 +30123,7 @@ export interface ServerAutomaticTuningOperations { * * {Promise} A promise is returned. * - * @resolve {ServerAutomaticTuning} - The deserialized result object. + * @resolve {DatabaseOperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26099,38 +30131,24 @@ export interface ServerAutomaticTuningOperations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerAutomaticTuning} [result] - The deserialized result object if an error did not occur. - * See {@link ServerAutomaticTuning} for more information. + * {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. */ - update(resourceGroupName: string, serverName: string, parameters: models.ServerAutomaticTuning, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - update(resourceGroupName: string, serverName: string, parameters: models.ServerAutomaticTuning, callback: ServiceCallback): void; - update(resourceGroupName: string, serverName: string, parameters: models.ServerAutomaticTuning, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ServerDnsAliases - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ServerDnsAliases { + 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; /** - * Gets a server DNS alias. - * - * @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 that the alias is pointing - * to. + * Gets a list of operations performed on the database. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -26139,23 +30157,17 @@ export interface ServerDnsAliases { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a server DNS alias. - * - * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} serverName The name of the server that the alias is pointing - * to. + * @reject {Error|ServiceError} - The error object. + */ + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets a list of operations performed on the database. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -26169,7 +30181,7 @@ export interface ServerDnsAliases { * * {Promise} A promise is returned. * - * @resolve {ServerDnsAlias} - The deserialized result object. + * @resolve {DatabaseOperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26177,29 +30189,40 @@ export interface ServerDnsAliases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerDnsAlias} [result] - The deserialized result object if an error did not occur. - * See {@link ServerDnsAlias} for more information. + * {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, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, dnsAliasName: 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 { /** - * Creates a server dns alias. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server that the alias is pointing - * to. + * @param {string} serverName The name of the server. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @param {string} elasticPoolName + * + * @param {uuid} operationId The operation identifier. * * @param {object} [options] Optional Parameters. * @@ -26208,23 +30231,24 @@ export interface ServerDnsAliases { * * @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, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + cancelWithHttpOperationResponse(resourceGroupName: string, serverName: string, elasticPoolName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a server dns alias. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server that the alias is pointing - * to. + * @param {string} serverName The name of the server. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @param {string} elasticPoolName + * + * @param {uuid} operationId The operation identifier. * * @param {object} [options] Optional Parameters. * @@ -26238,7 +30262,7 @@ export interface ServerDnsAliases { * * {Promise} A promise is returned. * - * @resolve {ServerDnsAlias} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26246,29 +30270,27 @@ export interface ServerDnsAliases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerDnsAlias} [result] - The deserialized result object if an error did not occur. - * See {@link ServerDnsAlias} 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, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: 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; /** - * Deletes the server DNS alias with the given name. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server that the alias is pointing - * to. + * @param {string} serverName The name of the server. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @param {string} elasticPoolName * * @param {object} [options] Optional Parameters. * @@ -26277,23 +30299,22 @@ export interface ServerDnsAliases { * * @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, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByElasticPoolWithHttpOperationResponse(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the server DNS alias with the given name. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server that the alias is pointing - * to. + * @param {string} serverName The name of the server. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @param {string} elasticPoolName * * @param {object} [options] Optional Parameters. * @@ -26307,7 +30328,7 @@ export interface ServerDnsAliases { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ElasticPoolOperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26315,26 +30336,24 @@ export interface ServerDnsAliases { * * {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. */ - deleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: 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; /** - * Gets a list of server DNS aliases for 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 a list of operations performed on the elastic pool. * - * @param {string} serverName The name of the server that the alias is pointing - * to. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -26343,21 +30362,17 @@ export interface ServerDnsAliases { * * @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>; + listByElasticPoolNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of server DNS aliases for 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 a list of operations performed on the elastic pool. * - * @param {string} serverName The name of the server that the alias is pointing - * to. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -26371,7 +30386,7 @@ export interface ServerDnsAliases { * * {Promise} A promise is returned. * - * @resolve {ServerDnsAliasListResult} - The deserialized result object. + * @resolve {ElasticPoolOperationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26379,68 +30394,65 @@ export interface ServerDnsAliases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerDnsAliasListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ServerDnsAliasListResult} for more + * {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. */ - 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; + 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 { /** - * Acquires server DNS alias from another 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 that the alias is pointing - * to. - * - * @param {string} dnsAliasName The name of the server dns alias. - * - * @param {object} parameters + * Gets the subscription capabilities available for the specified location. * - * @param {string} [parameters.oldServerDnsAliasId] The id of the server alias - * that will be acquired to point to this server instead. + * @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. */ - acquireWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByLocationWithHttpOperationResponse(locationName: string, options?: { include? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Acquires server DNS alias from another 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 that the alias is pointing - * to. - * - * @param {string} dnsAliasName The name of the server dns alias. - * - * @param {object} parameters + * Gets the subscription capabilities available for the specified location. * - * @param {string} [parameters.oldServerDnsAliasId] The id of the server alias - * that will be acquired to point to this server instead. + * @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 * @@ -26451,7 +30463,7 @@ export interface ServerDnsAliases { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {LocationCapabilities} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26459,28 +30471,37 @@ export interface ServerDnsAliases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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. */ - acquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - acquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, callback: ServiceCallback): void; - acquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, 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 a server dns alias. + * Lists the vulnerability assessment scans of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} serverName The name of the server that the alias is pointing - * to. + * @param {string} serverName The name of the server. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -26489,23 +30510,22 @@ export interface ServerDnsAliases { * * @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, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a server dns alias. + * Lists the vulnerability assessment scans of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} serverName The name of the server that the alias is pointing - * to. + * @param {string} serverName The name of the server. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @param {string} databaseName The name of the database. * * @param {object} [options] Optional Parameters. * @@ -26519,7 +30539,7 @@ export interface ServerDnsAliases { * * {Promise} A promise is returned. * - * @resolve {ServerDnsAlias} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26527,29 +30547,32 @@ export interface ServerDnsAliases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerDnsAlias} [result] - The deserialized result object if an error did not occur. - * See {@link ServerDnsAlias} 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. */ - beginCreateOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, dnsAliasName: 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; /** - * Deletes the server DNS alias with the given name. + * 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} serverName The name of the server that the alias is pointing - * to. + * @param {string} serverName The name of the server. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @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. * @@ -26558,23 +30581,25 @@ export interface ServerDnsAliases { * * @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, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the server DNS alias with the given name. + * 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} serverName The name of the server that the alias is pointing - * to. + * @param {string} serverName The name of the server. + * + * @param {string} databaseName The name of the database. * - * @param {string} dnsAliasName The name of the server DNS alias. + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -26588,7 +30613,7 @@ export interface ServerDnsAliases { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26596,33 +30621,32 @@ export interface ServerDnsAliases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {VulnerabilityAssessmentScanRecord} [result] - The deserialized result object if an error did not occur. + * See {@link VulnerabilityAssessmentScanRecord} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, serverName: string, dnsAliasName: 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; /** - * Acquires server DNS alias from another server. + * 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 that the alias is pointing - * to. - * - * @param {string} dnsAliasName The name of the server dns alias. + * @param {string} serverName The name of the server. * - * @param {object} parameters + * @param {string} databaseName The name of the database. * - * @param {string} [parameters.oldServerDnsAliasId] The id of the server alias - * that will be acquired to point to this server instead. + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -26635,24 +30659,21 @@ export interface ServerDnsAliases { * * @reject {Error|ServiceError} - The error object. */ - beginAcquireWithHttpOperationResponse(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + initiateScanWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Acquires server DNS alias from another server. + * 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 that the alias is pointing - * to. - * - * @param {string} dnsAliasName The name of the server dns alias. + * @param {string} serverName The name of the server. * - * @param {object} parameters + * @param {string} databaseName The name of the database. * - * @param {string} [parameters.oldServerDnsAliasId] The id of the server alias - * that will be acquired to point to this server instead. + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -26680,16 +30701,24 @@ export interface ServerDnsAliases { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginAcquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginAcquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, callback: ServiceCallback): void; - beginAcquire(resourceGroupName: string, serverName: string, dnsAliasName: string, parameters: models.ServerDnsAliasAcquisition, 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; /** - * Gets a list of server DNS aliases for a server. + * Convert an existing scan result to a human readable format. If already + * exists nothing happens * - * @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 scanned database. + * + * @param {string} scanId The vulnerability assessment scan Id. * * @param {object} [options] Optional Parameters. * @@ -26698,17 +30727,25 @@ export interface ServerDnsAliases { * * @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>; + exportMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of server DNS aliases for a server. + * Convert an existing scan result to a human readable format. If already + * exists nothing happens * - * @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 scanned database. + * + * @param {string} scanId The vulnerability assessment scan Id. * * @param {object} [options] Optional Parameters. * @@ -26722,7 +30759,7 @@ export interface ServerDnsAliases { * * {Promise} A promise is returned. * - * @resolve {ServerDnsAliasListResult} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentScansExport} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26730,30 +30767,21 @@ export interface ServerDnsAliases { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerDnsAliasListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ServerDnsAliasListResult} 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. */ - 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 - * ServerSecurityAlertPolicies - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ServerSecurityAlertPolicies { + 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; /** - * Get a server's security alert policy. + * 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 @@ -26761,6 +30789,11 @@ export interface ServerSecurityAlertPolicies { * * @param {string} serverName The name of the server. * + * @param {string} databaseName The name of the database. + * + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -26768,14 +30801,14 @@ export interface ServerSecurityAlertPolicies { * * @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>; + beginInitiateScanWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get a server's security alert policy. + * 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 @@ -26783,6 +30816,11 @@ export interface ServerSecurityAlertPolicies { * * @param {string} serverName The name of the server. * + * @param {string} databaseName The name of the database. + * + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -26795,7 +30833,7 @@ export interface ServerSecurityAlertPolicies { * * {Promise} A promise is returned. * - * @resolve {ServerSecurityAlertPolicy} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26803,54 +30841,22 @@ export interface ServerSecurityAlertPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ServerSecurityAlertPolicy} 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; + 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; /** - * Creates or updates a threat detection 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 {object} parameters The server security alert policy. - * - * @param {string} parameters.state Specifies the state of the policy, whether - * it is enabled or disabled. Possible values include: 'New', 'Enabled', - * 'Disabled' - * - * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that - * are disabled. Allowed values are: Sql_Injection, - * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, - * Unsafe_Action - * - * @param {array} [parameters.emailAddresses] Specifies an array of e-mail - * addresses to which the alert is sent. - * - * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is - * sent to the account administrators. - * - * @param {string} [parameters.storageEndpoint] Specifies the blob storage - * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage - * will hold all Threat Detection audit logs. - * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the Threat Detection audit storage account. + * Lists the vulnerability assessment scans of a database. * - * @param {number} [parameters.retentionDays] Specifies the number of days to - * keep in the Threat Detection audit logs. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -26859,47 +30865,17 @@ export interface ServerSecurityAlertPolicies { * * @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.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a threat detection 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 {object} parameters The server security alert policy. - * - * @param {string} parameters.state Specifies the state of the policy, whether - * it is enabled or disabled. Possible values include: 'New', 'Enabled', - * 'Disabled' - * - * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that - * are disabled. Allowed values are: Sql_Injection, - * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, - * Unsafe_Action - * - * @param {array} [parameters.emailAddresses] Specifies an array of e-mail - * addresses to which the alert is sent. - * - * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is - * sent to the account administrators. - * - * @param {string} [parameters.storageEndpoint] Specifies the blob storage - * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage - * will hold all Threat Detection audit logs. - * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the Threat Detection audit storage account. + * Lists the vulnerability assessment scans of a database. * - * @param {number} [parameters.retentionDays] Specifies the number of days to - * keep in the Threat Detection audit logs. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -26913,7 +30889,7 @@ export interface ServerSecurityAlertPolicies { * * {Promise} A promise is returned. * - * @resolve {ServerSecurityAlertPolicy} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -26921,54 +30897,45 @@ export interface ServerSecurityAlertPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ServerSecurityAlertPolicy} 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. */ - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, 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 + * ManagedDatabaseVulnerabilityAssessmentRuleBaselines + * __NOTE__: An instance of this class is automatically created for an + * instance of the SqlManagementClient. + */ +export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { /** - * Creates or updates a threat detection policy. + * 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} serverName The name of the server. - * - * @param {object} parameters The server security alert policy. - * - * @param {string} parameters.state Specifies the state of the policy, whether - * it is enabled or disabled. Possible values include: 'New', 'Enabled', - * 'Disabled' - * - * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that - * are disabled. Allowed values are: Sql_Injection, - * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, - * Unsafe_Action - * - * @param {array} [parameters.emailAddresses] Specifies an array of e-mail - * addresses to which the alert is sent. - * - * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is - * sent to the account administrators. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} [parameters.storageEndpoint] Specifies the blob storage - * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage - * will hold all Threat Detection audit logs. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment rule baseline is defined. * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the Threat Detection audit storage account. + * @param {string} ruleId The vulnerability assessment rule ID. * - * @param {number} [parameters.retentionDays] Specifies the number of days to - * keep in the Threat Detection audit logs. + * @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. * @@ -26977,47 +30944,29 @@ export interface ServerSecurityAlertPolicies { * * @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, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a threat detection policy. + * 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} serverName The name of the server. - * - * @param {object} parameters The server security alert policy. - * - * @param {string} parameters.state Specifies the state of the policy, whether - * it is enabled or disabled. Possible values include: 'New', 'Enabled', - * 'Disabled' - * - * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that - * are disabled. Allowed values are: Sql_Injection, - * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, - * Unsafe_Action - * - * @param {array} [parameters.emailAddresses] Specifies an array of e-mail - * addresses to which the alert is sent. - * - * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is - * sent to the account administrators. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} [parameters.storageEndpoint] Specifies the blob storage - * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage - * will hold all Threat Detection audit logs. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment rule baseline is defined. * - * @param {string} [parameters.storageAccountAccessKey] Specifies the - * identifier key of the Threat Detection audit storage account. + * @param {string} ruleId The vulnerability assessment rule ID. * - * @param {number} [parameters.retentionDays] Specifies the number of days to - * keep in the Threat Detection audit logs. + * @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. * @@ -27031,7 +30980,7 @@ export interface ServerSecurityAlertPolicies { * * {Promise} A promise is returned. * - * @resolve {ServerSecurityAlertPolicy} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27039,38 +30988,40 @@ export interface ServerSecurityAlertPolicies { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ServerSecurityAlertPolicy} [result] - The deserialized result object if an error did not occur. - * See {@link ServerSecurityAlertPolicy} 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. */ - beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, serverName: string, parameters: models.ServerSecurityAlertPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * RestorePoints - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface RestorePoints { + 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; /** - * Gets a list of database restore points. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @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 {array} parameters.baselineResults The rule baseline result * * @param {object} [options] Optional Parameters. * @@ -27079,22 +31030,33 @@ export interface RestorePoints { * * @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>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, parameters: models.DatabaseVulnerabilityAssessmentRuleBaseline, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of database restore points. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @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 {array} parameters.baselineResults The rule baseline result * * @param {object} [options] Optional Parameters. * @@ -27108,7 +31070,7 @@ export interface RestorePoints { * * {Promise} A promise is returned. * - * @resolve {RestorePointListResult} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27116,35 +31078,36 @@ export interface RestorePoints { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RestorePointListResult} [result] - The deserialized result object if an error did not occur. - * See {@link RestorePointListResult} 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. */ - 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; + 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; /** - * Creates a restore point for a data warehouse. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment rule baseline is defined. * - * @param {object} parameters The definition for creating the restore point of - * this database. + * @param {string} ruleId The vulnerability assessment rule ID. * - * @param {string} parameters.restorePointLabel The restore point label to - * apply + * @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. * @@ -27153,28 +31116,29 @@ export interface RestorePoints { * * @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, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a restore point for a data warehouse. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment rule baseline is defined. * - * @param {object} parameters The definition for creating the restore point of - * this database. + * @param {string} ruleId The vulnerability assessment rule ID. * - * @param {string} parameters.restorePointLabel The restore point label to - * apply + * @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. * @@ -27188,7 +31152,7 @@ export interface RestorePoints { * * {Promise} A promise is returned. * - * @resolve {RestorePoint} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27196,31 +31160,37 @@ export interface RestorePoints { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RestorePoint} [result] - The deserialized result object if an error did not occur. - * See {@link RestorePoint} 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. */ - create(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, callback: ServiceCallback): void; - create(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, 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 { /** - * Gets a restore point. + * Lists the vulnerability assessment scans of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database. * - * @param {string} restorePointName The name of the restore point. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -27228,25 +31198,23 @@ export interface RestorePoints { * * @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, restorePointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a restore point. + * Lists the vulnerability assessment scans of a database. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database. * - * @param {string} restorePointName The name of the restore point. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -27259,7 +31227,7 @@ export interface RestorePoints { * * {Promise} A promise is returned. * - * @resolve {RestorePoint} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27267,30 +31235,32 @@ export interface RestorePoints { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RestorePoint} [result] - The deserialized result object if an error did not occur. - * See {@link RestorePoint} for more information. + * {VulnerabilityAssessmentScanRecordListResult} [result] - The deserialized result object if an error did not occur. + * See {@link VulnerabilityAssessmentScanRecordListResult} + * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: 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; /** - * Deletes a restore point. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database. * - * @param {string} restorePointName The name of the restore point. + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -27299,24 +31269,25 @@ export interface RestorePoints { * * @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, databaseName: string, restorePointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a restore point. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database. * - * @param {string} restorePointName The name of the restore point. + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -27330,7 +31301,7 @@ export interface RestorePoints { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27338,33 +31309,32 @@ export interface RestorePoints { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {VulnerabilityAssessmentScanRecord} [result] - The deserialized result object if an error did not occur. + * See {@link VulnerabilityAssessmentScanRecord} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, serverName: string, databaseName: string, restorePointName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + 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; /** - * Creates a restore point for a data warehouse. + * 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} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database. * - * @param {object} parameters The definition for creating the restore point of - * this database. - * - * @param {string} parameters.restorePointLabel The restore point label to - * apply + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -27373,28 +31343,25 @@ export interface RestorePoints { * * @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, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + initiateScanWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a restore point for a data warehouse. + * 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} managedInstanceName The name of the managed instance. * * @param {string} databaseName The name of the database. * - * @param {object} parameters The definition for creating the restore point of - * this database. - * - * @param {string} parameters.restorePointLabel The restore point label to - * apply + * @param {string} scanId The vulnerability assessment scan Id of the scan to + * retrieve. * * @param {object} [options] Optional Parameters. * @@ -27408,7 +31375,7 @@ export interface RestorePoints { * * {Promise} A promise is returned. * - * @resolve {RestorePoint} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27416,39 +31383,30 @@ export interface RestorePoints { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {RestorePoint} [result] - The deserialized result object if an error did not occur. - * See {@link RestorePoint} 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. */ - beginCreate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.CreateDatabaseRestorePointDefinition, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * DatabaseOperations - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface DatabaseOperations { + 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; /** - * Cancels the asynchronous operation on the database. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {string} databaseName The name of the scanned database. * - * @param {uuid} operationId The operation identifier. + * @param {string} scanId The vulnerability assessment scan Id. * * @param {object} [options] Optional Parameters. * @@ -27457,24 +31415,25 @@ 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. */ - cancelWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, operationId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + exportMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Cancels the asynchronous operation on the database. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {string} databaseName The name of the scanned database. * - * @param {uuid} operationId The operation identifier. + * @param {string} scanId The vulnerability assessment scan Id. * * @param {object} [options] Optional Parameters. * @@ -27488,7 +31447,7 @@ export interface DatabaseOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentScansExport} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27496,28 +31455,33 @@ 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. + * {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. */ - 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; + 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; /** - * Gets a list of operations performed on the database. + * Executes a Vulnerability Assessment database scan. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} serverName The name of the server. + * @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. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -27525,23 +31489,26 @@ 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. */ - listByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginInitiateScanWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of operations performed on the database. + * Executes a Vulnerability Assessment database scan. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource * Manager API or the portal. * - * @param {string} serverName The name of the server. + * @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. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -27554,7 +31521,7 @@ export interface DatabaseOperations { * * {Promise} A promise is returned. * - * @resolve {DatabaseOperationListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27562,21 +31529,19 @@ 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. + * {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; + 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; /** - * Gets a list of operations performed on the database. + * Lists the vulnerability assessment scans of a database. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -27588,14 +31553,14 @@ 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>; + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of operations performed on the database. + * Lists the vulnerability assessment scans of a database. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -27612,7 +31577,7 @@ export interface DatabaseOperations { * * {Promise} A promise is returned. * - * @resolve {DatabaseOperationListResult} - The deserialized result object. + * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27620,40 +31585,39 @@ 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. + * {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. */ - 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; + 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 + * ManagedDatabaseVulnerabilityAssessments * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface ElasticPoolOperations { +export interface ManagedDatabaseVulnerabilityAssessments { /** - * Cancels the asynchronous operation on the elastic pool. + * 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} serverName The name of the server. - * - * @param {string} elasticPoolName + * @param {string} managedInstanceName The name of the managed instance. * - * @param {uuid} operationId The operation identifier. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -27662,24 +31626,23 @@ 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>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Cancels the asynchronous operation on the elastic pool. + * 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} serverName The name of the server. - * - * @param {string} elasticPoolName + * @param {string} managedInstanceName The name of the managed instance. * - * @param {uuid} operationId The operation identifier. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -27693,7 +31656,7 @@ export interface ElasticPoolOperations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27701,109 +31664,113 @@ 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. + * {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. */ - 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; + 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; /** - * Gets a list of operations performed on the elastic pool. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} elasticPoolName + * @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 * - * @returns {Promise} A promise is returned + * @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. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @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. * - * @reject {Error|ServiceError} - The error object. - */ - listByElasticPoolWithHttpOperationResponse(resourceGroupName: string, serverName: string, elasticPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a list of operations performed on the elastic pool. + * @param {object} [parameters.recurringScans] The recurring scans settings * - * @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 {boolean} [parameters.recurringScans.isEnabled] Recurring scans + * state. * - * @param {string} serverName The name of the server. + * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] + * Specifies that the schedule scan notification will be is sent to the + * subscription administrators. * - * @param {string} elasticPoolName + * @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 {ElasticPoolOperationListResult} - The deserialized result object. + * @returns {Promise} A promise is returned * - * @reject {Error|ServiceError} - The error object. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, parameters: models.DatabaseVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates the database's vulnerability assessment. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @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. * - * {ElasticPoolOperationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ElasticPoolOperationListResult} for more - * information. + * @param {string} managedInstanceName The name of the managed instance. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * - * {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; - - - /** - * Gets a list of operations performed on the elastic pool. + * @param {object} parameters The requested resource. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @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 {object} [options] Optional Parameters. + * @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 {object} [options.customHeaders] Headers that will be added to the - * request + * @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. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.recurringScans] The recurring scans settings * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {boolean} [parameters.recurringScans.isEnabled] Recurring scans + * state. * - * @reject {Error|ServiceError} - The error object. - */ - listByElasticPoolNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets a list of operations performed on the elastic pool. + * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] + * Specifies that the schedule scan notification will be is sent to the + * subscription administrators. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {array} [parameters.recurringScans.emails] Specifies an array of + * e-mail addresses to which the scan notification is sent. * * @param {object} [options] Optional Parameters. * @@ -27817,7 +31784,7 @@ export interface ElasticPoolOperations { * * {Promise} A promise is returned. * - * @resolve {ElasticPoolOperationListResult} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27825,64 +31792,57 @@ 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 + * {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. */ - 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 { + 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; /** - * Gets the subscription capabilities available for the specified location. + * Removes the database's vulnerability assessment. * - * @param {string} locationName The location name whose capabilities are - * retrieved. + * @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} managedInstanceName The name of the managed instance. * - * @param {string} [options.include] If specified, restricts the response to - * only include the selected item. Possible values include: - * 'supportedEditions', 'supportedElasticPoolEditions', - * 'supportedManagedInstanceVersions' + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. + * + * @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. */ - listByLocationWithHttpOperationResponse(locationName: string, options?: { include? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the subscription capabilities available for the specified location. + * Removes the database's vulnerability assessment. * - * @param {string} locationName The location name whose capabilities are - * retrieved. + * @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} managedInstanceName The name of the managed instance. * - * @param {string} [options.include] If specified, restricts the response to - * only include the selected item. Possible values include: - * 'supportedEditions', 'supportedElasticPoolEditions', - * 'supportedManagedInstanceVersions' + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -27894,7 +31854,7 @@ export interface Capabilities { * * {Promise} A promise is returned. * - * @resolve {LocationCapabilities} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27902,37 +31862,28 @@ 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. + * {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. */ - 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 { + 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; /** - * Lists the vulnerability assessment scans of a database. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -27941,22 +31892,23 @@ 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>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment scans of a database. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {string} databaseName The name of the database for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -27970,7 +31922,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -27978,32 +31930,24 @@ 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} + * {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. */ - 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; + 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} serverName The name of the server. - * - * @param {string} databaseName The name of the database. + * Lists the vulnerability assessments of a managed 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. * @@ -28012,25 +31956,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. */ - getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * 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} serverName The name of the server. - * - * @param {string} databaseName The name of the database. + * Lists the vulnerability assessments of a managed 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. * @@ -28044,7 +31980,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. + * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28052,32 +31988,39 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VulnerabilityAssessmentScanRecord} [result] - The deserialized result object if an error did not occur. - * See {@link VulnerabilityAssessmentScanRecord} for more - * information. + * {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. */ - 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; + 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 { /** - * Executes a Vulnerability Assessment database scan. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server. - * - * @param {string} databaseName The name of the database. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28086,25 +32029,23 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - initiateScanWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Executes a Vulnerability Assessment database scan. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server. - * - * @param {string} databaseName The name of the database. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28118,7 +32059,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28126,30 +32067,58 @@ 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. + * {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. */ - initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, callback: ServiceCallback): void; - initiateScan(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, 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; /** - * Convert an existing scan result to a human readable format. If already - * exists nothing happens + * 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 scanned database. + * @param {string} failoverGroupName The name of the failover group. * - * @param {string} scanId The vulnerability assessment scan Id. + * @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. * @@ -28158,25 +32127,52 @@ 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>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Convert an existing scan result to a human readable format. If already - * exists nothing happens + * 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 scanned database. + * @param {string} failoverGroupName The name of the failover group. * - * @param {string} scanId The vulnerability assessment scan Id. + * @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. * @@ -28190,7 +32186,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentScansExport} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28198,32 +32194,29 @@ 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. + * {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. */ - 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; + 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; /** - * Executes a Vulnerability Assessment database scan. + * 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 {string} locationName The name of the region where the resource is + * located. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28236,21 +32229,19 @@ export interface DatabaseVulnerabilityAssessmentScans { * * @reject {Error|ServiceError} - The error object. */ - beginInitiateScanWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Executes a Vulnerability Assessment database scan. + * 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 {string} locationName The name of the region where the resource is + * located. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28278,16 +32269,20 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {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; + 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; /** - * Lists the vulnerability assessment scans of a database. + * Lists the failover groups in a location. * - * @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} locationName The name of the region where the resource is + * located. * * @param {object} [options] Optional Parameters. * @@ -28296,17 +32291,21 @@ 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>; + listByLocationWithHttpOperationResponse(resourceGroupName: string, locationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment scans of a database. + * Lists the failover groups in a location. * - * @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} locationName The name of the region where the resource is + * located. * * @param {object} [options] Optional Parameters. * @@ -28320,7 +32319,7 @@ export interface DatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. + * @resolve {InstanceFailoverGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28328,45 +32327,31 @@ 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. + * {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. */ - 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 - * ManagedDatabaseVulnerabilityAssessmentRuleBaselines - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { + 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 vulnerability assessment rule baseline. + * 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} 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} locationName The name of the region where the resource is + * located. * - * @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} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28375,29 +32360,24 @@ 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. */ - getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + failoverWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's vulnerability assessment rule baseline. + * 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} 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} locationName The name of the region where the resource is + * located. * - * @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} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28411,7 +32391,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28419,40 +32399,30 @@ 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. + * {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, 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; + 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; /** - * Creates or updates a database's vulnerability assessment rule baseline. + * 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} 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} locationName The name of the region where the resource is + * located. * - * @param {array} parameters.baselineResults The rule baseline result + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28461,33 +32431,24 @@ 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>; + forceFailoverAllowDataLossWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a database's vulnerability assessment rule baseline. + * 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} 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} locationName The name of the region where the resource is + * located. * - * @param {array} parameters.baselineResults The rule baseline result + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28501,7 +32462,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentRuleBaseline} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28509,36 +32470,58 @@ 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. + * {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. */ - 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; + 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; /** - * Removes the database's vulnerability assessment rule baseline. + * 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} managedInstanceName The name of the managed instance. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. + * @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} ruleId The vulnerability assessment rule ID. + * @param {array} parameters.partnerRegions Partner region information for the + * failover group. * - * @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 {array} parameters.managedInstancePairs List of managed instance + * pairs in the failover group. * * @param {object} [options] Optional Parameters. * @@ -28547,29 +32530,52 @@ 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. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, ruleId: string, baselineName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Removes the database's vulnerability assessment rule baseline. + * 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} managedInstanceName The name of the managed instance. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment rule baseline is defined. + * @param {string} failoverGroupName The name of the failover group. * - * @param {string} ruleId The vulnerability assessment rule ID. + * @param {object} parameters The failover group parameters. * - * @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.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. * @@ -28583,7 +32589,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28591,36 +32597,29 @@ export interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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. */ - 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 { + 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; /** - * Lists the vulnerability assessment scans of a database. + * 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} managedInstanceName The name of the managed instance. + * @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. * @@ -28629,22 +32628,23 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @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>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment scans of a database. + * 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} managedInstanceName The name of the managed instance. + * @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. * @@ -28658,7 +32658,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28666,32 +32666,29 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {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, 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; + 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; /** - * Gets a vulnerability assessment scan record of a database. + * 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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28700,25 +32697,24 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @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, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginFailoverWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a vulnerability assessment scan record of a database. + * 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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28732,7 +32728,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecord} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28740,32 +32736,30 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VulnerabilityAssessmentScanRecord} [result] - The deserialized result object if an error did not occur. - * See {@link VulnerabilityAssessmentScanRecord} for more - * information. + * {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, 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; + 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; /** - * Executes a Vulnerability Assessment database scan. + * 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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28774,25 +32768,24 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @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, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginForceFailoverAllowDataLossWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Executes a Vulnerability Assessment database scan. + * 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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the database. + * @param {string} locationName The name of the region where the resource is + * located. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. + * @param {string} failoverGroupName The name of the failover group. * * @param {object} [options] Optional Parameters. * @@ -28806,7 +32799,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {InstanceFailoverGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28814,30 +32807,23 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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. */ - 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; + 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; /** - * 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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the scanned database. + * Lists the failover groups in a location. * - * @param {string} scanId The vulnerability assessment scan Id. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -28846,25 +32832,17 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @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, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByLocationNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * 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} managedInstanceName The name of the managed instance. - * - * @param {string} databaseName The name of the scanned database. + * Lists the failover groups in a location. * - * @param {string} scanId The vulnerability assessment scan Id. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -28878,7 +32856,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentScansExport} - The deserialized result object. + * @resolve {InstanceFailoverGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28886,33 +32864,39 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {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. + * {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. */ - 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; + 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 { /** - * Executes a Vulnerability Assessment database scan. + * 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} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the database. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -28920,26 +32904,23 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @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, managedInstanceName: string, databaseName: string, scanId: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Executes a Vulnerability Assessment database scan. + * 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} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * * @param {string} databaseName The name of the database. * - * @param {string} scanId The vulnerability assessment scan Id of the scan to - * retrieve. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -28952,7 +32933,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -28960,22 +32941,34 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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. */ - 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; + 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; /** - * Lists the vulnerability assessment scans of a database. + * Updates a database's short term retention policy. * - * @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 {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. * @@ -28984,17 +32977,27 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * @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>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessment scans of a database. + * Updates a database's short term retention policy. * - * @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 {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. * @@ -29008,7 +33011,7 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {Promise} A promise is returned. * - * @resolve {VulnerabilityAssessmentScanRecordListResult} - The deserialized result object. + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29016,39 +33019,34 @@ export interface ManagedDatabaseVulnerabilityAssessmentScans { * * {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. + * {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. */ - 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 { + 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; /** - * Gets the database's vulnerability assessment. + * 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} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * - * @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} 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. * @@ -29057,23 +33055,27 @@ 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>; + updateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the database's vulnerability assessment. + * 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} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * - * @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} 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. * @@ -29087,7 +33089,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29095,59 +33097,29 @@ 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 + * {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, 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; + 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; /** - * Creates or updates the database's vulnerability assessment. + * 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} 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. - * - * @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} serverName The name of the server. * - * @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. * @@ -29156,52 +33128,22 @@ 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>; + listByDatabaseWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates the database's vulnerability assessment. + * 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} 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. - * - * @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} serverName The name of the server. * - * @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. * @@ -29215,7 +33157,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessment} - The deserialized result object. + * @resolve {BackupShortTermRetentionPolicyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29223,30 +33165,34 @@ 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. + * {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. */ - 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; + 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. + * 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} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * - * @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} 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. * @@ -29255,23 +33201,27 @@ 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. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Removes the database's vulnerability assessment. + * 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} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * - * @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} 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. * @@ -29285,7 +33235,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29293,28 +33243,34 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {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. */ - 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; + 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; /** - * Lists the vulnerability assessments of a managed database. + * 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} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * - * @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} 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. * @@ -29323,23 +33279,27 @@ 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>; + beginUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, parameters: models.BackupShortTermRetentionPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessments of a managed database. + * 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} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. + * + * @param {string} databaseName The name of the database. * - * @param {string} databaseName The name of the database for which the - * vulnerability assessment is defined. + * @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. * @@ -29353,7 +33313,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29361,21 +33321,21 @@ 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. + * {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. */ - 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; + 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; /** - * Lists the vulnerability assessments of a managed database. + * Gets a database's short term retention policy. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -29387,14 +33347,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. */ - listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the vulnerability assessments of a managed database. + * Gets a database's short term retention policy. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -29411,7 +33371,7 @@ export interface ManagedDatabaseVulnerabilityAssessments { * * {Promise} A promise is returned. * - * @resolve {DatabaseVulnerabilityAssessmentListResult} - The deserialized result object. + * @resolve {BackupShortTermRetentionPolicyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29419,39 +33379,44 @@ 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} + * {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; + 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 + * TdeCertificates * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface InstanceFailoverGroups { +export interface TdeCertificates { /** - * Gets a failover group. + * 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} locationName The name of the region where the resource is - * located. + * @param {string} serverName The name of the server. * - * @param {string} failoverGroupName The name of the failover group. + * @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. * @@ -29460,23 +33425,28 @@ 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>; + createWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a failover group. + * 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} locationName The name of the region where the resource is - * located. + * @param {string} serverName The name of the server. * - * @param {string} failoverGroupName The name of the failover group. + * @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. * @@ -29490,7 +33460,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. * @@ -29498,112 +33468,150 @@ 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; + 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 or updates a failover group. + * 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} locationName The name of the region where the resource is - * located. + * @param {string} serverName The name of the server. * - * @param {string} failoverGroupName The name of the failover group. + * @param {object} parameters The requested TDE certificate to be created or + * updated. * - * @param {object} parameters The failover group parameters. + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. * - * @param {object} parameters.readWriteEndpoint Read-write endpoint of the - * failover group instance. + * @param {string} [parameters.certPassword] The certificate password. * - * @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 {object} [options] Optional Parameters. * - * @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.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the - * failover group instance. + * @returns {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 {HttpOperationResponse} - The deserialized result object. * - * @param {array} parameters.partnerRegions Partner region information for the - * failover group. + * @reject {Error|ServiceError} - The error object. + */ + beginCreateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a TDE certificate for a given server. * - * @param {array} parameters.managedInstancePairs List of managed instance - * pairs in the 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 {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 + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @reject {Error|ServiceError} - The error object. + * {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. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, parameters: models.InstanceFailoverGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + 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 { + /** - * Creates or updates a failover group. + * 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} 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 {object} parameters The requested TDE certificate to be created or + * updated. * - * @param {object} parameters The failover group parameters. + * @param {string} parameters.privateBlob The base64 encoded certificate + * private blob. * - * @param {object} parameters.readWriteEndpoint Read-write endpoint of the - * failover group instance. + * @param {string} [parameters.certPassword] The certificate password. * - * @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 {object} [options] Optional Parameters. * - * @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.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.readOnlyEndpoint] Read-only endpoint of the - * failover group instance. + * @returns {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 {HttpOperationResponse} - The deserialized result object. * - * @param {array} parameters.partnerRegions Partner region information for the - * failover group. + * @reject {Error|ServiceError} - The error object. + */ + createWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates a TDE certificate for a given server. * - * @param {array} parameters.managedInstancePairs List of managed instance - * pairs in the 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} 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. * @@ -29617,7 +33625,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. * @@ -29625,29 +33633,33 @@ 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. */ - 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; + 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; /** - * Deletes a failover group. + * 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} locationName The name of the region where the resource is - * located. + * @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} failoverGroupName The name of the failover group. + * @param {string} [parameters.certPassword] The certificate password. * * @param {object} [options] Optional Parameters. * @@ -29660,19 +33672,24 @@ export interface InstanceFailoverGroups { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.TdeCertificate, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a failover group. + * 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} 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 {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. * @@ -29700,46 +33717,59 @@ 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; + 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 { /** - * Lists the failover groups in a location. + * 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} locationName The name of the region where the resource is - * located. + * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listByLocationWithHttpOperationResponse(resourceGroupName: string, locationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the failover groups in a location. + * 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} locationName The name of the region where the resource is - * located. + * @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 * @@ -29750,7 +33780,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroupListResult} - The deserialized result object. + * @resolve {ManagedInstanceKeyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29758,31 +33788,30 @@ 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 + * {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. */ - 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; + 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; /** - * Fails over from the current primary managed instance to this managed - * instance. + * 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} 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} keyName The name of the managed instance key to be + * retrieved. * * @param {object} [options] Optional Parameters. * @@ -29791,24 +33820,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, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Fails over from the current primary managed instance to this managed - * instance. + * 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} 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} keyName The name of the managed instance key to be + * retrieved. * * @param {object} [options] Optional Parameters. * @@ -29822,7 +33850,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroup} - The deserialized result object. + * @resolve {ManagedInstanceKey} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29830,30 +33858,38 @@ 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. + * {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. */ - 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, 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; /** - * Fails over from the current primary managed instance to this managed - * instance. This operation might result in data loss. + * 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} 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} 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. * @@ -29862,24 +33898,32 @@ 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, keyName: string, parameters: models.ManagedInstanceKey, 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 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} 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} 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. * @@ -29893,7 +33937,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroup} - The deserialized result object. + * @resolve {ManagedInstanceKey} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -29901,58 +33945,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. + * {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. */ - 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, 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 or updates a failover group. + * 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 * 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} keyName The name of the managed instance key to be deleted. * * @param {object} [options] Optional Parameters. * @@ -29961,52 +33975,22 @@ 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, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a failover group. + * 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 * 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} keyName The name of the managed instance key to be deleted. * * @param {object} [options] Optional Parameters. * @@ -30020,7 +34004,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. * @@ -30028,29 +34012,37 @@ 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, 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; /** - * Deletes a failover group. + * 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} 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} 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. * @@ -30059,23 +34051,32 @@ 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>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes a failover group. + * 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} 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} 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. * @@ -30089,7 +34090,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedInstanceKey} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30097,29 +34098,28 @@ 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. + * {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. */ - 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; + 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; /** - * Fails over from the current primary managed instance to this managed - * instance. + * 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 * 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} keyName The name of the managed instance key to be deleted. * * @param {object} [options] Optional Parameters. * @@ -30128,24 +34128,22 @@ 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>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Fails over from the current primary managed instance to this managed - * instance. + * 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 * 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} keyName The name of the managed instance key to be deleted. * * @param {object} [options] Optional Parameters. * @@ -30159,7 +34157,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. * @@ -30167,30 +34165,22 @@ 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. */ - 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; + 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; /** - * 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. + * Gets a list of managed instance keys. * - * @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. * @@ -30199,24 +34189,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. */ - beginForceFailoverAllowDataLossWithHttpOperationResponse(resourceGroupName: string, locationName: string, failoverGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: 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. + * Gets a list of managed instance keys. * - * @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. * @@ -30230,7 +34213,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroup} - The deserialized result object. + * @resolve {ManagedInstanceKeyListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30238,23 +34221,36 @@ 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. + * {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. */ - 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; + 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 { /** - * Lists the failover groups in a location. + * Gets a list of managed instance encryption protectors * - * @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} [options] Optional Parameters. * @@ -30263,17 +34259,20 @@ 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. */ - listByLocationNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists the failover groups in a location. + * Gets a list of managed instance encryption protectors * - * @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} [options] Optional Parameters. * @@ -30287,7 +34286,7 @@ export interface InstanceFailoverGroups { * * {Promise} A promise is returned. * - * @resolve {InstanceFailoverGroupListResult} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtectorListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30295,38 +34294,28 @@ 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 + * {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. */ - 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 { + 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 database's short term retention policy. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server. - * - * @param {string} databaseName The name of the database. + * @param {string} managedInstanceName The name of the managed instance. * * @param {object} [options] Optional Parameters. * @@ -30335,22 +34324,20 @@ 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. */ - getWithHttpOperationResponse(resourceGroupName: string, serverName: string, databaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's short term retention policy. + * 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 * Manager API or the portal. * - * @param {string} serverName The name of the server. - * - * @param {string} databaseName The name of the database. + * @param {string} managedInstanceName The name of the managed instance. * * @param {object} [options] Optional Parameters. * @@ -30364,7 +34351,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30372,34 +34359,37 @@ 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 + * {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. */ - 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; + 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 a database's short term retention policy. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The requested encryption protector resource + * state. * - * @param {object} parameters The short term retention policy info. + * @param {string} [parameters.serverKeyName] The name of the managed instance + * key. * - * @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.serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' * * @param {object} [options] Optional Parameters. * @@ -30408,27 +34398,30 @@ 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>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a database's short term retention policy. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The requested encryption protector resource + * state. * - * @param {object} parameters The short term retention policy info. + * @param {string} [parameters.serverKeyName] The name of the managed instance + * key. * - * @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.serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' * * @param {object} [options] Optional Parameters. * @@ -30442,7 +34435,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30450,34 +34443,37 @@ 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 + * {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. */ - 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; + 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; /** - * Updates a database's short term retention policy. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The requested encryption protector resource + * state. * - * @param {object} parameters The short term retention policy info. + * @param {string} [parameters.serverKeyName] The name of the managed instance + * key. * - * @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.serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' * * @param {object} [options] Optional Parameters. * @@ -30486,27 +34482,30 @@ 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>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a database's short term retention policy. + * 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance. * - * @param {string} databaseName The name of the database. + * @param {object} parameters The requested encryption protector resource + * state. * - * @param {object} parameters The short term retention policy info. + * @param {string} [parameters.serverKeyName] The name of the managed instance + * key. * - * @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.serverKeyType The encryption protector type like + * 'ServiceManaged', 'AzureKeyVault'. Possible values include: + * 'ServiceManaged', 'AzureKeyVault' * * @param {object} [options] Optional Parameters. * @@ -30520,7 +34519,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30528,29 +34527,24 @@ 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 + * {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. */ - 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; + 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 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. + * Gets a list of managed instance encryption protectors * - * @param {string} databaseName The name of the database. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -30559,22 +34553,17 @@ 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>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: 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. + * Gets a list of managed instance encryption protectors * - * @param {string} databaseName The name of the database. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -30588,7 +34577,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicyListResult} - The deserialized result object. + * @resolve {ManagedInstanceEncryptionProtectorListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30596,34 +34585,37 @@ 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. + * {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. */ - 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; + 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 { /** - * Updates a database's short term retention policy. + * 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 * 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} managedInstanceName The name of the managed instance. * * @param {object} [options] Optional Parameters. * @@ -30632,27 +34624,20 @@ 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>; + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a database's short term retention policy. + * 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 * 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} managedInstanceName The name of the managed instance. * * @param {object} [options] Optional Parameters. * @@ -30666,7 +34651,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {RecoverableManagedDatabaseListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30674,34 +34659,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. + * {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. */ - 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; + 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; /** - * Updates a database's short term retention policy. + * 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 * 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} managedInstanceName The name of the managed instance. * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} recoverableDatabaseName * * @param {object} [options] Optional Parameters. * @@ -30710,27 +34690,22 @@ 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>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, recoverableDatabaseName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a database's short term retention policy. + * 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 * 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} managedInstanceName The name of the managed instance. * - * @param {number} [parameters.retentionDays] The backup retention period in - * days. This is how many days Point-in-Time Restore will be supported. + * @param {string} recoverableDatabaseName * * @param {object} [options] Optional Parameters. * @@ -30744,7 +34719,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicy} - The deserialized result object. + * @resolve {RecoverableManagedDatabase} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30752,21 +34727,21 @@ 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 + * {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. */ - 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; + 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 database's short term retention policy. + * Gets a list of recoverable managed databases. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -30778,14 +34753,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. */ - listByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a database's short term retention policy. + * Gets a list of recoverable managed databases. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -30802,7 +34777,7 @@ export interface BackupShortTermRetentionPolicies { * * {Promise} A promise is returned. * - * @resolve {BackupShortTermRetentionPolicyListResult} - The deserialized result object. + * @resolve {RecoverableManagedDatabaseListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30810,44 +34785,37 @@ 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. + * {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. */ - 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; + 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 - * TdeCertificates + * ManagedInstanceVulnerabilityAssessments * __NOTE__: An instance of this class is automatically created for an * instance of the SqlManagementClient. */ -export interface TdeCertificates { +export interface ManagedInstanceVulnerabilityAssessments { /** - * Creates a TDE certificate for a given server. + * 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} 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 {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -30856,28 +34824,21 @@ 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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a TDE certificate for a given server. + * 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} 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 {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -30891,7 +34852,7 @@ export interface TdeCertificates { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedInstanceVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30899,33 +34860,56 @@ 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. + * {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. */ - 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, 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 a TDE certificate for a given server. + * Creates or updates 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * - * @param {object} parameters The requested TDE certificate to be created or - * updated. + * @param {object} parameters The requested resource. * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. + * @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.certPassword] The certificate password. + * @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. * @@ -30934,28 +34918,49 @@ 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, parameters: models.ManagedInstanceVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a TDE certificate for a given server. + * Creates or updates 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} serverName The name of the server. + * @param {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * - * @param {object} parameters The requested TDE certificate to be created or - * updated. + * @param {object} parameters The requested resource. * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. + * @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.certPassword] The certificate password. + * @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. * @@ -30969,7 +34974,7 @@ export interface TdeCertificates { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedInstanceVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -30977,42 +34982,28 @@ 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. + * {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. */ - 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, 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; /** - * Creates a TDE certificate for a given server. + * 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 {object} parameters The requested TDE certificate to be created or - * updated. - * - * @param {string} parameters.privateBlob The base64 encoded certificate - * private blob. + * contains the resource. You can obtain this value from the Azure Resource + * Manager API or the portal. * - * @param {string} [parameters.certPassword] The certificate password. + * @param {string} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31025,24 +35016,17 @@ 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, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a TDE certificate for a given server. + * 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 {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} managedInstanceName The name of the managed instance for + * which the vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31070,27 +35054,20 @@ 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, 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; /** - * Creates a TDE certificate for a given server. + * 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 {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} managedInstanceName The name of the managed instance for + * which the vulnerability assessments is defined. * * @param {object} [options] Optional Parameters. * @@ -31099,28 +35076,21 @@ 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>; + listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates a TDE certificate for a given server. + * 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 {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} managedInstanceName The name of the managed instance for + * which the vulnerability assessments is defined. * * @param {object} [options] Optional Parameters. * @@ -31134,7 +35104,7 @@ export interface ManagedInstanceTdeCertificates { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {ManagedInstanceVulnerabilityAssessmentListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31142,65 +35112,47 @@ 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. + * {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. */ - 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 { + 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 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. + * Gets the managed instance's vulnerability assessment policies. * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @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. */ - listByInstanceWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { 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. + * Gets the managed instance's vulnerability assessment policies. * - * @param {string} managedInstanceName The name of the managed instance. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @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 * @@ -31211,7 +35163,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKeyListResult} - The deserialized result object. + * @resolve {ManagedInstanceVulnerabilityAssessmentListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31219,30 +35171,38 @@ 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. + * {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. */ - 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; + 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 { /** - * Gets a managed instance key. + * 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. - * - * @param {string} keyName The name of the managed instance key to be - * retrieved. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31251,23 +35211,21 @@ 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>; + getWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a managed instance key. + * 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. - * - * @param {string} keyName The name of the managed instance key to be - * retrieved. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31281,7 +35239,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKey} - The deserialized result object. + * @resolve {ServerVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31289,38 +35247,56 @@ 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. + * {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, 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; + 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 a managed instance key. + * 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. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * - * @param {string} keyName The name of the managed instance key to be operated - * on (updated or created). + * @param {object} parameters The requested resource. * - * @param {object} parameters The requested managed instance key 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 {string} parameters.serverKeyType The key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' + * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] + * Specifies that the schedule scan notification will be is sent to the + * subscription administrators. * - * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is - * AzureKeyVault, then the URI is required. + * @param {array} [parameters.recurringScans.emails] Specifies an array of + * e-mail addresses to which the scan notification is sent. * * @param {object} [options] Optional Parameters. * @@ -31329,32 +35305,49 @@ 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>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, serverName: string, parameters: models.ServerVulnerabilityAssessment, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a managed instance key. + * 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. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * - * @param {string} keyName The name of the managed instance key to be operated - * on (updated or created). + * @param {object} parameters The requested resource. * - * @param {object} parameters The requested managed instance key 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 {string} parameters.serverKeyType The key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' + * @param {boolean} [parameters.recurringScans.emailSubscriptionAdmins] + * Specifies that the schedule scan notification will be is sent to the + * subscription administrators. * - * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is - * AzureKeyVault, then the URI is required. + * @param {array} [parameters.recurringScans.emails] Specifies an array of + * e-mail addresses to which the scan notification is sent. * * @param {object} [options] Optional Parameters. * @@ -31368,7 +35361,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKey} - The deserialized result object. + * @resolve {ServerVulnerabilityAssessment} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31376,28 +35369,28 @@ 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. + * {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, 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; + 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; /** - * Deletes the managed instance key with the given name. + * 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. - * - * @param {string} keyName The name of the managed instance key to be deleted. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31410,18 +35403,17 @@ export interface ManagedInstanceKeys { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, serverName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the managed instance key with the given name. + * 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. - * - * @param {string} keyName The name of the managed instance key to be deleted. + * @param {string} serverName The name of the server for which the + * vulnerability assessment is defined. * * @param {object} [options] Optional Parameters. * @@ -31449,31 +35441,80 @@ export interface ManagedInstanceKeys { * * {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; + 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; /** - * Creates or updates a managed instance key. + * 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} managedInstanceName The name of the managed instance. + * @param {string} serverName The name of the server. * - * @param {string} keyName The name of the managed instance key to be operated - * on (updated or created). + * @param {object} [options] Optional Parameters. * - * @param {object} parameters The requested managed instance key resource - * state. + * @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. * - * @param {string} parameters.serverKeyType The key type like 'ServiceManaged', - * 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault' + * {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} [parameters.uri] The URI of the key. If the ServerKeyType is - * AzureKeyVault, then the URI is required. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -31482,32 +35523,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. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, keyName: string, parameters: models.ManagedInstanceKey, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByServerNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * 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} 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' + * Lists the vulnerability assessment policies associated with a server. * - * @param {string} [parameters.uri] The URI of the key. If the ServerKeyType is - * AzureKeyVault, then the URI is required. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -31521,7 +35547,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKey} - The deserialized result object. + * @resolve {ServerVulnerabilityAssessmentListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31529,20 +35555,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. + * {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. */ - 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; + 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 { /** - * Deletes the managed instance key with the given name. + * 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 @@ -31550,7 +35586,16 @@ 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 {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. * @@ -31559,14 +35604,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>; + getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, sensitivityLabelSource: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the managed instance key with the given name. + * 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 @@ -31574,7 +35619,16 @@ 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 {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. * @@ -31588,7 +35642,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SensitivityLabel} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31596,22 +35650,44 @@ 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. + * {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. */ - 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; + 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 a list of managed instance keys. + * 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. * @@ -31620,17 +35696,38 @@ 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>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, parameters: models.SensitivityLabel, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of managed instance keys. + * 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. * @@ -31644,7 +35741,7 @@ export interface ManagedInstanceKeys { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceKeyListResult} - The deserialized result object. + * @resolve {SensitivityLabel} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31652,30 +35749,20 @@ 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. + * {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 - * ManagedInstanceEncryptionProtectors - * __NOTE__: An instance of this class is automatically created for an - * instance of the SqlManagementClient. - */ -export interface ManagedInstanceEncryptionProtectors { + 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 a list of managed instance encryption protectors + * 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 @@ -31683,6 +35770,14 @@ export interface ManagedInstanceEncryptionProtectors { * * @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 @@ -31690,14 +35785,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>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, schemaName: string, tableName: string, columnName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of managed instance encryption protectors + * 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 @@ -31705,6 +35800,14 @@ export interface ManagedInstanceEncryptionProtectors { * * @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 @@ -31717,7 +35820,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtectorListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31725,22 +35828,19 @@ 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. + * {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, 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; /** - * Gets a managed instance encryption protector. + * 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 @@ -31748,21 +35848,26 @@ export interface ManagedInstanceEncryptionProtectors { * * @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. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listCurrentByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a managed instance encryption protector. + * 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 @@ -31770,8 +35875,13 @@ export interface ManagedInstanceEncryptionProtectors { * * @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 * @@ -31782,7 +35892,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31790,21 +35900,21 @@ 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 + * {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. */ - 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; + 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; /** - * Updates an existing encryption protector. + * 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 @@ -31812,31 +35922,28 @@ export interface ManagedInstanceEncryptionProtectors { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} parameters The requested encryption protector resource - * state. + * @param {string} databaseName The name of the database. * - * @param {string} [parameters.serverKeyName] The name of the managed instance - * key. + * @param {object} [options] Optional Parameters. * - * @param {string} parameters.serverKeyType The encryption protector type like - * 'ServiceManaged', 'AzureKeyVault'. Possible values include: - * 'ServiceManaged', 'AzureKeyVault' + * @param {string} [options.skipToken] * - * @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, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listRecommendedByDatabaseWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, databaseName: string, options?: { skipToken? : string, filter? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates an existing encryption protector. + * 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 @@ -31844,17 +35951,14 @@ export interface ManagedInstanceEncryptionProtectors { * * @param {string} managedInstanceName The name of the managed instance. * - * @param {object} parameters The requested encryption protector resource - * state. + * @param {string} databaseName The name of the database. * - * @param {string} [parameters.serverKeyName] The name of the managed instance - * key. + * @param {object} [options] Optional Parameters. * - * @param {string} parameters.serverKeyType The encryption protector type like - * 'ServiceManaged', 'AzureKeyVault'. Possible values include: - * 'ServiceManaged', 'AzureKeyVault' + * @param {string} [options.skipToken] * - * @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 @@ -31866,7 +35970,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31874,37 +35978,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 + * {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, 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; + 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; /** - * 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. + * Gets the sensitivity labels of a given database * - * @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} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -31913,30 +36004,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. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, managedInstanceName: string, parameters: models.ManagedInstanceEncryptionProtector, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listCurrentByDatabaseNextWithHttpOperationResponse(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 the sensitivity labels of a given database * - * @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. * @@ -31950,7 +36028,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtector} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -31958,21 +36036,21 @@ 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 + * {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. */ - 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; + 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 a list of managed instance encryption protectors + * Gets the sensitivity labels of a given database * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -31984,14 +36062,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. */ - listByInstanceNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listRecommendedByDatabaseNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a list of managed instance encryption protectors + * Gets the sensitivity labels of a given database * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -32008,7 +36086,7 @@ export interface ManagedInstanceEncryptionProtectors { * * {Promise} A promise is returned. * - * @resolve {ManagedInstanceEncryptionProtectorListResult} - The deserialized result object. + * @resolve {SensitivityLabelListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -32016,16 +36094,15 @@ 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 + * {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. */ - 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; + 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 ff735c282f..6b6d82db91 100644 --- a/lib/services/sqlManagement2/lib/operations/index.js +++ b/lib/services/sqlManagement2/lib/operations/index.js @@ -47,6 +47,7 @@ exports.SyncAgents = require('./syncAgents'); exports.SyncGroups = require('./syncGroups'); exports.SyncMembers = require('./syncMembers'); exports.SubscriptionUsages = require('./subscriptionUsages'); +exports.VirtualClusters = require('./virtualClusters'); exports.VirtualNetworkRules = require('./virtualNetworkRules'); exports.ExtendedDatabaseBlobAuditingPolicies = require('./extendedDatabaseBlobAuditingPolicies'); exports.ExtendedServerBlobAuditingPolicies = require('./extendedServerBlobAuditingPolicies'); @@ -67,10 +68,15 @@ exports.LongTermRetentionBackups = require('./longTermRetentionBackups'); exports.BackupLongTermRetentionPolicies = require('./backupLongTermRetentionPolicies'); exports.ManagedBackupShortTermRetentionPolicies = require('./managedBackupShortTermRetentionPolicies'); exports.ManagedDatabases = require('./managedDatabases'); +exports.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies = require('./managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies'); exports.ServerAutomaticTuningOperations = require('./serverAutomaticTuningOperations'); exports.ServerDnsAliases = require('./serverDnsAliases'); exports.ServerSecurityAlertPolicies = require('./serverSecurityAlertPolicies'); +exports.RestorableDroppedManagedDatabases = require('./restorableDroppedManagedDatabases'); 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'); @@ -84,3 +90,7 @@ exports.TdeCertificates = require('./tdeCertificates'); exports.ManagedInstanceTdeCertificates = require('./managedInstanceTdeCertificates'); exports.ManagedInstanceKeys = require('./managedInstanceKeys'); exports.ManagedInstanceEncryptionProtectors = require('./managedInstanceEncryptionProtectors'); +exports.RecoverableManagedDatabases = require('./recoverableManagedDatabases'); +exports.ManagedInstanceVulnerabilityAssessments = require('./managedInstanceVulnerabilityAssessments'); +exports.ServerVulnerabilityAssessments = require('./serverVulnerabilityAssessments'); +exports.ManagedDatabaseSensitivityLabels = require('./managedDatabaseSensitivityLabels'); diff --git a/lib/services/sqlManagement2/lib/operations/jobExecutions.js b/lib/services/sqlManagement2/lib/operations/jobExecutions.js index 21208c7764..2047c643aa 100644 --- a/lib/services/sqlManagement2/lib/operations/jobExecutions.js +++ b/lib/services/sqlManagement2/lib/operations/jobExecutions.js @@ -866,7 +866,7 @@ function _get(resourceGroupName, serverName, jobAgentName, jobName, jobExecution /** - * Creates or updatess a job execution. + * Creates or updates a job execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -1109,7 +1109,7 @@ function _beginCreate(resourceGroupName, serverName, jobAgentName, jobName, opti } /** - * Creates or updatess a job execution. + * Creates or updates a job execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -2145,7 +2145,7 @@ class JobExecutions { } /** - * Creates or updatess a job execution. + * Creates or updates a job execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -2186,7 +2186,7 @@ class JobExecutions { } /** - * Creates or updatess a job execution. + * Creates or updates a job execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -2347,7 +2347,7 @@ class JobExecutions { } /** - * Creates or updatess a job execution. + * Creates or updates a job execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -2388,7 +2388,7 @@ class JobExecutions { } /** - * Creates or updatess a job execution. + * Creates or updates a job execution. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource diff --git a/lib/services/sqlManagement2/lib/operations/jobs.js b/lib/services/sqlManagement2/lib/operations/jobs.js index 01d36bc8f5..1bfd0886c1 100644 --- a/lib/services/sqlManagement2/lib/operations/jobs.js +++ b/lib/services/sqlManagement2/lib/operations/jobs.js @@ -353,7 +353,7 @@ function _get(resourceGroupName, serverName, jobAgentName, jobName, options, cal * is enabled. * * @param {string} [parameters.schedule.interval] Value of the schedule's - * recurring interval, if the scheduletype is recurring. ISO8601 duration + * recurring interval, if the schedule type is recurring. ISO8601 duration * format. * * @param {object} [options] Optional Parameters. @@ -1038,7 +1038,7 @@ class Jobs { * is enabled. * * @param {string} [parameters.schedule.interval] Value of the schedule's - * recurring interval, if the scheduletype is recurring. ISO8601 duration + * recurring interval, if the schedule type is recurring. ISO8601 duration * format. * * @param {object} [options] Optional Parameters. @@ -1097,7 +1097,7 @@ class Jobs { * is enabled. * * @param {string} [parameters.schedule.interval] Value of the schedule's - * recurring interval, if the scheduletype is recurring. ISO8601 duration + * recurring interval, if the schedule type is recurring. ISO8601 duration * format. * * @param {object} [options] Optional Parameters. diff --git a/lib/services/sqlManagement2/lib/operations/longTermRetentionBackups.js b/lib/services/sqlManagement2/lib/operations/longTermRetentionBackups.js index 39ad67fada..5a6dc4b181 100644 --- a/lib/services/sqlManagement2/lib/operations/longTermRetentionBackups.js +++ b/lib/services/sqlManagement2/lib/operations/longTermRetentionBackups.js @@ -19,9 +19,9 @@ const WebResource = msRest.WebResource; * * @param {string} locationName The location of the database. * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {string} backupName The backup name. * @@ -176,9 +176,9 @@ function _get(locationName, longTermRetentionServerName, longTermRetentionDataba * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {string} backupName The backup name. * @@ -242,9 +242,9 @@ function _deleteMethod(locationName, longTermRetentionServerName, longTermRetent * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {object} [options] Optional Parameters. * @@ -572,7 +572,7 @@ function _listByLocation(locationName, options, callback) { * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * * @param {object} [options] Optional Parameters. * @@ -737,9 +737,9 @@ function _listByServer(locationName, longTermRetentionServerName, options, callb * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {string} backupName The backup name. * @@ -1277,9 +1277,9 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database. * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {string} backupName The backup name. * @@ -1313,9 +1313,9 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database. * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {string} backupName The backup name. * @@ -1372,9 +1372,9 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {string} backupName The backup name. * @@ -1408,9 +1408,9 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {string} backupName The backup name. * @@ -1465,9 +1465,9 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {object} [options] Optional Parameters. * @@ -1506,9 +1506,9 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {object} [options] Optional Parameters. * @@ -1667,7 +1667,7 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * * @param {object} [options] Optional Parameters. * @@ -1706,7 +1706,7 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * * @param {object} [options] Optional Parameters. * @@ -1768,9 +1768,9 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {string} backupName The backup name. * @@ -1804,9 +1804,9 @@ class LongTermRetentionBackups { * * @param {string} locationName The location of the database * - * @param {string} longTermRetentionServerName + * @param {string} longTermRetentionServerName The name of the server * - * @param {string} longTermRetentionDatabaseName + * @param {string} longTermRetentionDatabaseName The name of the database * * @param {string} backupName The backup name. * diff --git a/lib/services/sqlManagement2/lib/operations/managedDatabaseSecurityAlertPolicies.js b/lib/services/sqlManagement2/lib/operations/managedDatabaseSecurityAlertPolicies.js new file mode 100644 index 0000000000..6a724ed76f --- /dev/null +++ b/lib/services/sqlManagement2/lib/operations/managedDatabaseSecurityAlertPolicies.js @@ -0,0 +1,650 @@ +/* + * 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 a managed database's security alert 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the managed database for which the + * security alert policy is defined. + * + * @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 ManagedDatabaseSecurityAlertPolicy} 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, 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 securityAlertPolicyName = 'default'; + 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 (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 (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}/securityAlertPolicies/{securityAlertPolicyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); + requestUrl = requestUrl.replace('{securityAlertPolicyName}', encodeURIComponent(securityAlertPolicyName)); + 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['ManagedDatabaseSecurityAlertPolicy']().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 a database's security alert 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the managed database for which the + * security alert policy is defined. + * + * @param {object} parameters The database security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. + * + * @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 ManagedDatabaseSecurityAlertPolicy} 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, 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 securityAlertPolicyName = 'default'; + 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 (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 (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}/securityAlertPolicies/{securityAlertPolicyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); + requestUrl = requestUrl.replace('{securityAlertPolicyName}', encodeURIComponent(securityAlertPolicyName)); + 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['ManagedDatabaseSecurityAlertPolicy']().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['ManagedDatabaseSecurityAlertPolicy']().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['ManagedDatabaseSecurityAlertPolicy']().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); + }); +} + +/** Class representing a ManagedDatabaseSecurityAlertPolicies. */ +class ManagedDatabaseSecurityAlertPolicies { + /** + * Create a ManagedDatabaseSecurityAlertPolicies. + * @param {SqlManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + } + + /** + * Gets a managed database's security alert 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the managed database for which the + * security alert policy is defined. + * + * @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, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(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 a managed database's security alert 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the managed database for which the + * security alert policy is defined. + * + * @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 {ManagedDatabaseSecurityAlertPolicy} - 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 ManagedDatabaseSecurityAlertPolicy} 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, 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, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, managedInstanceName, databaseName, options, optionalCallback); + } + } + + /** + * Creates or updates a database's security alert 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the managed database for which the + * security alert policy is defined. + * + * @param {object} parameters The database security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. + * + * @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, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, managedInstanceName, databaseName, 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 a database's security alert 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} managedInstanceName The name of the managed instance. + * + * @param {string} databaseName The name of the managed database for which the + * security alert policy is defined. + * + * @param {object} parameters The database security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. + * + * @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 {ManagedDatabaseSecurityAlertPolicy} - 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 ManagedDatabaseSecurityAlertPolicy} 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, 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, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, managedInstanceName, databaseName, parameters, options, optionalCallback); + } + } + +} + +module.exports = ManagedDatabaseSecurityAlertPolicies; 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/managedDatabases.js b/lib/services/sqlManagement2/lib/operations/managedDatabases.js index e20ff0e1b1..b0324d3a73 100644 --- a/lib/services/sqlManagement2/lib/operations/managedDatabases.js +++ b/lib/services/sqlManagement2/lib/operations/managedDatabases.js @@ -411,8 +411,10 @@ function _get(resourceGroupName, managedInstanceName, databaseName, options, cal * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -421,10 +423,17 @@ function _get(resourceGroupName, managedInstanceName, databaseName, options, cal * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -501,7 +510,7 @@ function _createOrUpdate(resourceGroupName, managedInstanceName, databaseName, p /** - * Deletes the managed database. + * Deletes 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 @@ -596,8 +605,10 @@ function _deleteMethod(resourceGroupName, managedInstanceName, databaseName, opt * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -606,10 +617,17 @@ function _deleteMethod(resourceGroupName, managedInstanceName, databaseName, opt * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -860,8 +878,10 @@ function _beginCompleteRestore(locationName, operationId, parameters, options, c * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -870,10 +890,17 @@ function _beginCompleteRestore(locationName, operationId, parameters, options, c * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -1053,7 +1080,7 @@ function _beginCreateOrUpdate(resourceGroupName, managedInstanceName, databaseNa } /** - * Deletes the managed database. + * Deletes 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 @@ -1214,8 +1241,10 @@ function _beginDeleteMethod(resourceGroupName, managedInstanceName, databaseName * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -1224,10 +1253,17 @@ function _beginDeleteMethod(resourceGroupName, managedInstanceName, databaseName * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -1849,8 +1885,10 @@ class ManagedDatabases { * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -1859,10 +1897,17 @@ class ManagedDatabases { * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -1921,8 +1966,10 @@ class ManagedDatabases { * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -1931,10 +1978,17 @@ class ManagedDatabases { * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -1987,7 +2041,7 @@ class ManagedDatabases { } /** - * Deletes the managed database. + * Deletes 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 @@ -2023,7 +2077,7 @@ class ManagedDatabases { } /** - * Deletes the managed database. + * Deletes 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 @@ -2108,8 +2162,10 @@ class ManagedDatabases { * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -2118,10 +2174,17 @@ class ManagedDatabases { * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -2178,8 +2241,10 @@ class ManagedDatabases { * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -2188,10 +2253,17 @@ class ManagedDatabases { * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -2369,8 +2441,10 @@ class ManagedDatabases { * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -2379,10 +2453,17 @@ class ManagedDatabases { * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -2441,8 +2522,10 @@ class ManagedDatabases { * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -2451,10 +2534,17 @@ class ManagedDatabases { * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -2507,7 +2597,7 @@ class ManagedDatabases { } /** - * Deletes the managed database. + * Deletes 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 @@ -2543,7 +2633,7 @@ class ManagedDatabases { } /** - * Deletes the managed database. + * Deletes 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 @@ -2628,8 +2718,10 @@ class ManagedDatabases { * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -2638,10 +2730,17 @@ class ManagedDatabases { * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -2698,8 +2797,10 @@ class ManagedDatabases { * an existing database. SourceDatabaseName, SourceManagedInstanceName and * PointInTime must be specified. RestoreExternalBackup: Create a database by * restoring from external backup files. Collation, StorageContainerUri and - * StorageContainerSasToken must be specified. Possible values include: - * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore' + * StorageContainerSasToken must be specified. Recovery: Creates a database by + * restoring a geo-replicated backup. RecoverableDatabaseId must be specified + * as the recoverable database resource ID to restore. Possible values include: + * 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery' * * @param {string} [parameters.storageContainerUri] Conditional. If createMode * is RestoreExternalBackup, this value is required. Specifies the uri of the @@ -2708,10 +2809,17 @@ class ManagedDatabases { * @param {string} [parameters.sourceDatabaseId] The resource identifier of the * source database associated with create operation of this database. * + * @param {string} [parameters.restorableDroppedDatabaseId] The restorable + * dropped database resource id to restore when creating this database. + * * @param {string} [parameters.storageContainerSasToken] Conditional. If * createMode is RestoreExternalBackup, this value is required. Specifies the * storage container sas token. * + * @param {string} [parameters.recoverableDatabaseId] The resource identifier + * of the recoverable database associated with create operation of this + * database. + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. diff --git a/lib/services/sqlManagement2/lib/operations/managedInstanceVulnerabilityAssessments.js b/lib/services/sqlManagement2/lib/operations/managedInstanceVulnerabilityAssessments.js new file mode 100644 index 0000000000..ed448e5c1c --- /dev/null +++ b/lib/services/sqlManagement2/lib/operations/managedInstanceVulnerabilityAssessments.js @@ -0,0 +1,1314 @@ +/* + * 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 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 for + * which the vulnerability assessment is defined. + * + * @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 ManagedInstanceVulnerabilityAssessment} 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, 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 vulnerabilityAssessmentName = 'default'; + 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 (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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{vulnerabilityAssessmentName}', encodeURIComponent(vulnerabilityAssessmentName)); + 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['ManagedInstanceVulnerabilityAssessment']().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 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 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. + * + * @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 ManagedInstanceVulnerabilityAssessment} 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, 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 vulnerabilityAssessmentName = 'default'; + 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 (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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{vulnerabilityAssessmentName}', encodeURIComponent(vulnerabilityAssessmentName)); + 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['ManagedInstanceVulnerabilityAssessment']().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['ManagedInstanceVulnerabilityAssessment']().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['ManagedInstanceVulnerabilityAssessment']().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); + }); +} + +/** + * 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 for + * which the vulnerability assessment is defined. + * + * @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, 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 vulnerabilityAssessmentName = 'default'; + 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 (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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{vulnerabilityAssessmentName}', encodeURIComponent(vulnerabilityAssessmentName)); + 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 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 for + * which the vulnerability assessments is defined. + * + * @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 + * ManagedInstanceVulnerabilityAssessmentListResult} 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 _listByInstance(resourceGroupName, managedInstanceName, 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 (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}/vulnerabilityAssessments'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + 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['ManagedInstanceVulnerabilityAssessmentListResult']().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 managed instance's vulnerability assessment policies. + * + * @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 + * ManagedInstanceVulnerabilityAssessmentListResult} 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 _listByInstanceNext(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['ManagedInstanceVulnerabilityAssessmentListResult']().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 ManagedInstanceVulnerabilityAssessments. */ +class ManagedInstanceVulnerabilityAssessments { + /** + * Create a ManagedInstanceVulnerabilityAssessments. + * @param {SqlManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._listByInstance = _listByInstance; + this._listByInstanceNext = _listByInstanceNext; + } + + /** + * 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 for + * which the vulnerability assessment is defined. + * + * @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, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, managedInstanceName, 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 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 for + * which the vulnerability assessment is defined. + * + * @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 {ManagedInstanceVulnerabilityAssessment} - 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 ManagedInstanceVulnerabilityAssessment} 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, 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, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, managedInstanceName, options, optionalCallback); + } + } + + /** + * Creates or updates 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 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. + * + * @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, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, managedInstanceName, 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 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 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. + * + * @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 {ManagedInstanceVulnerabilityAssessment} - 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 ManagedInstanceVulnerabilityAssessment} 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, 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, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, managedInstanceName, parameters, options, optionalCallback); + } + } + + /** + * 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 for + * which the vulnerability assessment is defined. + * + * @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, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, managedInstanceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * 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 for + * which the vulnerability assessment is defined. + * + * @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, 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, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, managedInstanceName, options, optionalCallback); + } + } + + /** + * 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 for + * which the vulnerability assessments is defined. + * + * @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. + */ + listByInstanceWithHttpOperationResponse(resourceGroupName, managedInstanceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByInstance(resourceGroupName, managedInstanceName, 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 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 for + * which the vulnerability assessments is defined. + * + * @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 {ManagedInstanceVulnerabilityAssessmentListResult} - 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 + * ManagedInstanceVulnerabilityAssessmentListResult} 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. + */ + listByInstance(resourceGroupName, managedInstanceName, 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._listByInstance(resourceGroupName, managedInstanceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByInstance(resourceGroupName, managedInstanceName, options, optionalCallback); + } + } + + /** + * Gets the managed instance's vulnerability assessment policies. + * + * @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. + */ + listByInstanceNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByInstanceNext(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 managed instance's vulnerability assessment policies. + * + * @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 {ManagedInstanceVulnerabilityAssessmentListResult} - 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 + * ManagedInstanceVulnerabilityAssessmentListResult} 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. + */ + listByInstanceNext(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._listByInstanceNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByInstanceNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = ManagedInstanceVulnerabilityAssessments; diff --git a/lib/services/sqlManagement2/lib/operations/managedInstances.js b/lib/services/sqlManagement2/lib/operations/managedInstances.js index cd86297f07..d29bc1b4a4 100644 --- a/lib/services/sqlManagement2/lib/operations/managedInstances.js +++ b/lib/services/sqlManagement2/lib/operations/managedInstances.js @@ -494,6 +494,25 @@ function _get(resourceGroupName, managedInstanceName, options, callback) { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -688,6 +707,25 @@ function _deleteMethod(resourceGroupName, managedInstanceName, options, callback * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -822,6 +860,25 @@ function _update(resourceGroupName, managedInstanceName, parameters, options, ca * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -1177,6 +1234,25 @@ function _beginDeleteMethod(resourceGroupName, managedInstanceName, options, cal * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -1927,6 +2003,25 @@ class ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -2018,6 +2113,25 @@ class ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -2212,6 +2326,25 @@ class ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -2293,6 +2426,25 @@ class ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -2404,6 +2556,25 @@ class ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -2495,6 +2666,25 @@ class ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {string} parameters.location Resource location. * * @param {object} [parameters.tags] Resource tags. @@ -2689,6 +2879,25 @@ class ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. @@ -2770,6 +2979,25 @@ class ManagedInstances { * managed instance whose DNS zone this managed instance will share after * creation. * + * @param {boolean} [parameters.publicDataEndpointEnabled] Whether or not the + * public data endpoint is enabled. + * + * @param {string} [parameters.proxyOverride] Connection type used for + * connecting to the instance. Possible values include: 'Proxy', 'Redirect', + * 'Default' + * + * @param {string} [parameters.timezoneId] Id of the timezone. Allowed values + * are timezones supported by Windows. + * Winodws keeps details on supported timezones, including the id, in registry + * under + * KEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones. + * You can get those registry values via SQL Server by querying SELECT name AS + * timezone_id FROM sys.time_zone_info. + * List of Ids can also be obtained by executing + * [System.TimeZoneInfo]::GetSystemTimeZones() in PowerShell. + * An example of valid timezone id is "Pacific Standard Time" or "W. Europe + * Standard Time". + * * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. diff --git a/lib/services/sqlManagement2/lib/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.js b/lib/services/sqlManagement2/lib/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.js new file mode 100644 index 0000000000..aee7f97667 --- /dev/null +++ b/lib/services/sqlManagement2/lib/operations/managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies.js @@ -0,0 +1,1697 @@ +/* + * 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 a dropped 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @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 ManagedBackupShortTermRetentionPolicy} 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, restorableDroppedDatabaseId, 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 policyName = 'default'; + 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 (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 (restorableDroppedDatabaseId === null || restorableDroppedDatabaseId === undefined || typeof restorableDroppedDatabaseId.valueOf() !== 'string') { + throw new Error('restorableDroppedDatabaseId 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}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{restorableDroppedDatabaseId}', encodeURIComponent(restorableDroppedDatabaseId)); + requestUrl = requestUrl.replace('{policyName}', encodeURIComponent(policyName)); + 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['ManagedBackupShortTermRetentionPolicy']().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); + }); +} + + +/** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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 {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 ManagedBackupShortTermRetentionPolicy} 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, restorableDroppedDatabaseId, 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.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ManagedBackupShortTermRetentionPolicy']().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); + }); + }); +} + + +/** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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 {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 ManagedBackupShortTermRetentionPolicy} 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 _update(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, 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.'); + } + + // Send request + this.beginUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ManagedBackupShortTermRetentionPolicy']().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 a dropped database's short term retention policy list. + * + * @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} restorableDroppedDatabaseId + * + * @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 + * ManagedBackupShortTermRetentionPolicyListResult} 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 _listByRestorableDroppedDatabase(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, 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 = '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 (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 (restorableDroppedDatabaseId === null || restorableDroppedDatabaseId === undefined || typeof restorableDroppedDatabaseId.valueOf() !== 'string') { + throw new Error('restorableDroppedDatabaseId 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}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{restorableDroppedDatabaseId}', encodeURIComponent(restorableDroppedDatabaseId)); + 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['ManagedBackupShortTermRetentionPolicyListResult']().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); + }); +} + +/** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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 {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 ManagedBackupShortTermRetentionPolicy} 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 _beginCreateOrUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, 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 policyName = 'default'; + 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 (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 (restorableDroppedDatabaseId === null || restorableDroppedDatabaseId === undefined || typeof restorableDroppedDatabaseId.valueOf() !== 'string') { + throw new Error('restorableDroppedDatabaseId 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}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{restorableDroppedDatabaseId}', encodeURIComponent(restorableDroppedDatabaseId)); + requestUrl = requestUrl.replace('{policyName}', encodeURIComponent(policyName)); + 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['ManagedBackupShortTermRetentionPolicy']().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 !== 202) { + 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['ManagedBackupShortTermRetentionPolicy']().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); + }); +} + +/** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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 {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 ManagedBackupShortTermRetentionPolicy} 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 _beginUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, 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 policyName = 'default'; + 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 (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 (restorableDroppedDatabaseId === null || restorableDroppedDatabaseId === undefined || typeof restorableDroppedDatabaseId.valueOf() !== 'string') { + throw new Error('restorableDroppedDatabaseId 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}/restorableDroppedDatabases/{restorableDroppedDatabaseId}/backupShortTermRetentionPolicies/{policyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{restorableDroppedDatabaseId}', encodeURIComponent(restorableDroppedDatabaseId)); + requestUrl = requestUrl.replace('{policyName}', encodeURIComponent(policyName)); + 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 = 'PATCH'; + 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['ManagedBackupShortTermRetentionPolicy']().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 !== 202) { + 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['ManagedBackupShortTermRetentionPolicy']().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 a dropped database's short term retention policy list. + * + * @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 + * ManagedBackupShortTermRetentionPolicyListResult} 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 _listByRestorableDroppedDatabaseNext(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['ManagedBackupShortTermRetentionPolicyListResult']().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 ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies. */ +class ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies { + /** + * Create a ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies. + * @param {SqlManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._update = _update; + this._listByRestorableDroppedDatabase = _listByRestorableDroppedDatabase; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginUpdate = _beginUpdate; + this._listByRestorableDroppedDatabaseNext = _listByRestorableDroppedDatabaseNext; + } + + /** + * Gets a dropped 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @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, restorableDroppedDatabaseId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a dropped 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @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 {ManagedBackupShortTermRetentionPolicy} - 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 ManagedBackupShortTermRetentionPolicy} 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, restorableDroppedDatabaseId, 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, restorableDroppedDatabaseId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, options, optionalCallback); + } + } + + /** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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 {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 {ManagedBackupShortTermRetentionPolicy} - 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 ManagedBackupShortTermRetentionPolicy} 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, restorableDroppedDatabaseId, 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, restorableDroppedDatabaseId, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, optionalCallback); + } + } + + /** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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} - The error object. + */ + updateWithHttpOperationResponse(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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 {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 {ManagedBackupShortTermRetentionPolicy} - 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 ManagedBackupShortTermRetentionPolicy} 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. + */ + update(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, 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._update(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, optionalCallback); + } + } + + /** + * Gets a dropped database's short term retention policy list. + * + * @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} restorableDroppedDatabaseId + * + * @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. + */ + listByRestorableDroppedDatabaseWithHttpOperationResponse(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByRestorableDroppedDatabase(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a dropped database's short term retention policy list. + * + * @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} restorableDroppedDatabaseId + * + * @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 {ManagedBackupShortTermRetentionPolicyListResult} - 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 + * ManagedBackupShortTermRetentionPolicyListResult} 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. + */ + listByRestorableDroppedDatabase(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, 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._listByRestorableDroppedDatabase(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByRestorableDroppedDatabase(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, options, optionalCallback); + } + } + + /** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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 {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 {ManagedBackupShortTermRetentionPolicy} - 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 ManagedBackupShortTermRetentionPolicy} 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. + */ + beginCreateOrUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, 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._beginCreateOrUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, optionalCallback); + } + } + + /** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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} - The error object. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Sets a database's long 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @param {object} parameters The long 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 {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 {ManagedBackupShortTermRetentionPolicy} - 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 ManagedBackupShortTermRetentionPolicy} 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. + */ + beginUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, 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._beginUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdate(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, parameters, options, optionalCallback); + } + } + + /** + * Gets a dropped database's short term retention policy list. + * + * @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. + */ + listByRestorableDroppedDatabaseNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByRestorableDroppedDatabaseNext(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 a dropped database's short term retention policy list. + * + * @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 {ManagedBackupShortTermRetentionPolicyListResult} - 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 + * ManagedBackupShortTermRetentionPolicyListResult} 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. + */ + listByRestorableDroppedDatabaseNext(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._listByRestorableDroppedDatabaseNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByRestorableDroppedDatabaseNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; diff --git a/lib/services/sqlManagement2/lib/operations/managedServerSecurityAlertPolicies.js b/lib/services/sqlManagement2/lib/operations/managedServerSecurityAlertPolicies.js new file mode 100644 index 0000000000..fce20d5552 --- /dev/null +++ b/lib/services/sqlManagement2/lib/operations/managedServerSecurityAlertPolicies.js @@ -0,0 +1,861 @@ +/* + * 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; + +/** + * Get a managed server's threat detection 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} managedInstanceName The name of the managed instance. + * + * @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 ManagedServerSecurityAlertPolicy} 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, 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 securityAlertPolicyName = 'Default'; + 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 (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 (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}/securityAlertPolicies/{securityAlertPolicyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{securityAlertPolicyName}', encodeURIComponent(securityAlertPolicyName)); + 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['ManagedServerSecurityAlertPolicy']().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 a threat detection 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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The managed server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. + * + * @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 ManagedServerSecurityAlertPolicy} 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, 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.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, managedInstanceName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ManagedServerSecurityAlertPolicy']().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 a threat detection 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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The managed server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. + * + * @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 ManagedServerSecurityAlertPolicy} 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 _beginCreateOrUpdate(resourceGroupName, managedInstanceName, 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 securityAlertPolicyName = 'Default'; + 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 (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 (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}/securityAlertPolicies/{securityAlertPolicyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{securityAlertPolicyName}', encodeURIComponent(securityAlertPolicyName)); + 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['ManagedServerSecurityAlertPolicy']().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 !== 202) { + 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['ManagedServerSecurityAlertPolicy']().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 ManagedServerSecurityAlertPolicies. */ +class ManagedServerSecurityAlertPolicies { + /** + * Create a ManagedServerSecurityAlertPolicies. + * @param {SqlManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + } + + /** + * Get a managed server's threat detection 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} managedInstanceName The name of the managed instance. + * + * @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, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, managedInstanceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Get a managed server's threat detection 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} managedInstanceName The name of the managed instance. + * + * @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 {ManagedServerSecurityAlertPolicy} - 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 ManagedServerSecurityAlertPolicy} 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, 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, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, managedInstanceName, options, optionalCallback); + } + } + + /** + * Creates or updates a threat detection 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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The managed server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. + * + * @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, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, managedInstanceName, 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 a threat detection 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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The managed server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. + * + * @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 {ManagedServerSecurityAlertPolicy} - 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 ManagedServerSecurityAlertPolicy} 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, 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, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, managedInstanceName, parameters, options, optionalCallback); + } + } + + /** + * Creates or updates a threat detection 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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The managed server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. + * + * @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. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, managedInstanceName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, managedInstanceName, 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 a threat detection 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} managedInstanceName The name of the managed instance. + * + * @param {object} parameters The managed server security alert policy. + * + * @param {string} parameters.state Specifies the state of the policy, whether + * it is enabled or disabled. Possible values include: 'New', 'Enabled', + * 'Disabled' + * + * @param {array} [parameters.disabledAlerts] Specifies an array of alerts that + * are disabled. Allowed values are: Sql_Injection, + * Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, + * Unsafe_Action + * + * @param {array} [parameters.emailAddresses] Specifies an array of e-mail + * addresses to which the alert is sent. + * + * @param {boolean} [parameters.emailAccountAdmins] Specifies that the alert is + * sent to the account administrators. + * + * @param {string} [parameters.storageEndpoint] Specifies the blob storage + * endpoint (e.g. https://MyAccount.blob.core.windows.net). This blob storage + * will hold all Threat Detection audit logs. + * + * @param {string} [parameters.storageAccountAccessKey] Specifies the + * identifier key of the Threat Detection audit storage account. + * + * @param {number} [parameters.retentionDays] Specifies the number of days to + * keep in the Threat Detection audit logs. + * + * @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 {ManagedServerSecurityAlertPolicy} - 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 ManagedServerSecurityAlertPolicy} 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. + */ + beginCreateOrUpdate(resourceGroupName, managedInstanceName, 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._beginCreateOrUpdate(resourceGroupName, managedInstanceName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, managedInstanceName, parameters, options, optionalCallback); + } + } + +} + +module.exports = ManagedServerSecurityAlertPolicies; diff --git a/lib/services/sqlManagement2/lib/operations/recommendedElasticPools.js b/lib/services/sqlManagement2/lib/operations/recommendedElasticPools.js index 7349644e35..32b2afa8d1 100644 --- a/lib/services/sqlManagement2/lib/operations/recommendedElasticPools.js +++ b/lib/services/sqlManagement2/lib/operations/recommendedElasticPools.js @@ -15,7 +15,7 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Gets a recommented elastic pool. + * Gets a recommended elastic pool. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -314,7 +314,7 @@ function _listByServer(resourceGroupName, serverName, options, callback) { } /** - * Returns recommented elastic pool metrics. + * Returns recommended elastic pool metrics. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -480,7 +480,7 @@ class RecommendedElasticPools { } /** - * Gets a recommented elastic pool. + * Gets a recommended elastic pool. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -517,7 +517,7 @@ class RecommendedElasticPools { } /** - * Gets a recommented elastic pool. + * Gets a recommended elastic pool. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -668,7 +668,7 @@ class RecommendedElasticPools { } /** - * Returns recommented elastic pool metrics. + * Returns recommended elastic pool metrics. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource @@ -705,7 +705,7 @@ class RecommendedElasticPools { } /** - * Returns recommented elastic pool metrics. + * Returns recommended elastic pool metrics. * * @param {string} resourceGroupName The name of the resource group that * contains the resource. You can obtain this value from the Azure Resource diff --git a/lib/services/sqlManagement2/lib/operations/recoverableManagedDatabases.js b/lib/services/sqlManagement2/lib/operations/recoverableManagedDatabases.js new file mode 100644 index 0000000000..221d69c550 --- /dev/null +++ b/lib/services/sqlManagement2/lib/operations/recoverableManagedDatabases.js @@ -0,0 +1,729 @@ +/* + * 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 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 + * Manager API or the portal. + * + * @param {string} managedInstanceName The name of the managed instance. + * + * @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 RecoverableManagedDatabaseListResult} 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 _listByInstance(resourceGroupName, managedInstanceName, 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 = '2017-10-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 (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}/recoverableDatabases'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + 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['RecoverableManagedDatabaseListResult']().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 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 + * Manager API or the portal. + * + * @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 + * 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 RecoverableManagedDatabase} 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, recoverableDatabaseName, 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 = '2017-10-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 (recoverableDatabaseName === null || recoverableDatabaseName === undefined || typeof recoverableDatabaseName.valueOf() !== 'string') { + throw new Error('recoverableDatabaseName 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}/recoverableDatabases/{recoverableDatabaseName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{recoverableDatabaseName}', encodeURIComponent(recoverableDatabaseName)); + 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['RecoverableManagedDatabase']().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 a list of recoverable managed databases. + * + * @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 RecoverableManagedDatabaseListResult} 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 _listByInstanceNext(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['RecoverableManagedDatabaseListResult']().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 RecoverableManagedDatabases. */ +class RecoverableManagedDatabases { + /** + * Create a RecoverableManagedDatabases. + * @param {SqlManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._listByInstance = _listByInstance; + this._get = _get; + this._listByInstanceNext = _listByInstanceNext; + } + + /** + * 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 + * Manager API or the portal. + * + * @param {string} managedInstanceName The name of the managed instance. + * + * @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. + */ + listByInstanceWithHttpOperationResponse(resourceGroupName, managedInstanceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByInstance(resourceGroupName, managedInstanceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * 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 + * Manager API or the portal. + * + * @param {string} managedInstanceName The name of the managed instance. + * + * @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 {RecoverableManagedDatabaseListResult} - 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 RecoverableManagedDatabaseListResult} 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. + */ + listByInstance(resourceGroupName, managedInstanceName, 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._listByInstance(resourceGroupName, managedInstanceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByInstance(resourceGroupName, managedInstanceName, options, optionalCallback); + } + } + + /** + * 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 + * Manager API or the portal. + * + * @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 + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, managedInstanceName, recoverableDatabaseName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, managedInstanceName, recoverableDatabaseName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * 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 + * Manager API or the portal. + * + * @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 + * 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 {RecoverableManagedDatabase} - 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 RecoverableManagedDatabase} 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, recoverableDatabaseName, 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, recoverableDatabaseName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, managedInstanceName, recoverableDatabaseName, options, optionalCallback); + } + } + + /** + * Gets a list of recoverable managed databases. + * + * @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. + */ + listByInstanceNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByInstanceNext(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 a list of recoverable managed databases. + * + * @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 {RecoverableManagedDatabaseListResult} - 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 RecoverableManagedDatabaseListResult} 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. + */ + listByInstanceNext(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._listByInstanceNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByInstanceNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = RecoverableManagedDatabases; diff --git a/lib/services/sqlManagement2/lib/operations/restorableDroppedManagedDatabases.js b/lib/services/sqlManagement2/lib/operations/restorableDroppedManagedDatabases.js new file mode 100644 index 0000000000..3a2c45a520 --- /dev/null +++ b/lib/services/sqlManagement2/lib/operations/restorableDroppedManagedDatabases.js @@ -0,0 +1,729 @@ +/* + * 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 a list of restorable dropped managed databases. + * + * @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 {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 RestorableDroppedManagedDatabaseListResult} + * 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 _listByInstance(resourceGroupName, managedInstanceName, 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 = '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 (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 (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}/restorableDroppedDatabases'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + 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['RestorableDroppedManagedDatabaseListResult']().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 a restorable dropped 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @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 RestorableDroppedManagedDatabase} 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, restorableDroppedDatabaseId, 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 = '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 (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 (restorableDroppedDatabaseId === null || restorableDroppedDatabaseId === undefined || typeof restorableDroppedDatabaseId.valueOf() !== 'string') { + throw new Error('restorableDroppedDatabaseId 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}/restorableDroppedDatabases/{restorableDroppedDatabaseId}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{managedInstanceName}', encodeURIComponent(managedInstanceName)); + requestUrl = requestUrl.replace('{restorableDroppedDatabaseId}', encodeURIComponent(restorableDroppedDatabaseId)); + 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['RestorableDroppedManagedDatabase']().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 a list of restorable dropped managed databases. + * + * @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 RestorableDroppedManagedDatabaseListResult} + * 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 _listByInstanceNext(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['RestorableDroppedManagedDatabaseListResult']().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 RestorableDroppedManagedDatabases. */ +class RestorableDroppedManagedDatabases { + /** + * Create a RestorableDroppedManagedDatabases. + * @param {SqlManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._listByInstance = _listByInstance; + this._get = _get; + this._listByInstanceNext = _listByInstanceNext; + } + + /** + * Gets a list of restorable dropped managed databases. + * + * @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 {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. + */ + listByInstanceWithHttpOperationResponse(resourceGroupName, managedInstanceName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByInstance(resourceGroupName, managedInstanceName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a list of restorable dropped managed databases. + * + * @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 {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 {RestorableDroppedManagedDatabaseListResult} - 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 RestorableDroppedManagedDatabaseListResult} + * 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. + */ + listByInstance(resourceGroupName, managedInstanceName, 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._listByInstance(resourceGroupName, managedInstanceName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByInstance(resourceGroupName, managedInstanceName, options, optionalCallback); + } + } + + /** + * Gets a restorable dropped 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @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, restorableDroppedDatabaseId, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a restorable dropped 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} managedInstanceName The name of the managed instance. + * + * @param {string} restorableDroppedDatabaseId + * + * @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 {RestorableDroppedManagedDatabase} - 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 RestorableDroppedManagedDatabase} 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, restorableDroppedDatabaseId, 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, restorableDroppedDatabaseId, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, managedInstanceName, restorableDroppedDatabaseId, options, optionalCallback); + } + } + + /** + * Gets a list of restorable dropped managed databases. + * + * @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. + */ + listByInstanceNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByInstanceNext(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 a list of restorable dropped managed databases. + * + * @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 {RestorableDroppedManagedDatabaseListResult} - 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 RestorableDroppedManagedDatabaseListResult} + * 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. + */ + listByInstanceNext(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._listByInstanceNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByInstanceNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = RestorableDroppedManagedDatabases; diff --git a/lib/services/sqlManagement2/lib/operations/sensitivityLabels.js b/lib/services/sqlManagement2/lib/operations/sensitivityLabels.js index c78e01e640..119005b322 100644 --- a/lib/services/sqlManagement2/lib/operations/sensitivityLabels.js +++ b/lib/services/sqlManagement2/lib/operations/sensitivityLabels.js @@ -47,7 +47,7 @@ const WebResource = msRest.WebResource; * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByDatabase(resourceGroupName, serverName, databaseName, options, callback) { +function _listCurrentByDatabase(resourceGroupName, serverName, databaseName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -85,7 +85,7 @@ function _listByDatabase(resourceGroupName, serverName, databaseName, options, c // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/currentSensitivityLabels'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{serverName}', encodeURIComponent(serverName)); requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); @@ -187,12 +187,10 @@ function _listByDatabase(resourceGroupName, serverName, databaseName, options, c * * @param {string} databaseName The name of the database. * - * @param {string} sensitivityLabelSource Optional source of the sensitivity - * label. Valid values are current or recommeneded. In not specified both - * returned. Possible values include: 'current', 'recommended' - * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * * @param {string} [options.filter] An OData filter expression that filters * elements in the collection. * @@ -213,7 +211,7 @@ function _listByDatabase(resourceGroupName, serverName, databaseName, options, c * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByDatabaseWithSource(resourceGroupName, serverName, databaseName, sensitivityLabelSource, options, callback) { +function _listRecommendedByDatabase(resourceGroupName, serverName, databaseName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -223,6 +221,7 @@ function _listByDatabaseWithSource(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 @@ -236,13 +235,8 @@ function _listByDatabaseWithSource(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 (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 (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.'); @@ -259,13 +253,15 @@ function _listByDatabaseWithSource(resourceGroupName, serverName, databaseName, // Construct URL let baseUrl = this.client.baseUri; - let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/sensitivityLabels/{sensitivityLabelSource}'; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/recommendedSensitivityLabels'; requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); requestUrl = requestUrl.replace('{serverName}', encodeURIComponent(serverName)); requestUrl = requestUrl.replace('{databaseName}', encodeURIComponent(databaseName)); - requestUrl = requestUrl.replace('{sensitivityLabelSource}', encodeURIComponent(sensitivityLabelSource)); 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)); } @@ -553,8 +549,12 @@ function _get(resourceGroupName, serverName, databaseName, schemaName, tableName * * @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 @@ -921,7 +921,7 @@ function _deleteMethod(resourceGroupName, serverName, databaseName, schemaName, * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByDatabaseNext(nextPageLink, options, callback) { +function _listCurrentByDatabaseNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1049,7 +1049,7 @@ function _listByDatabaseNext(nextPageLink, options, callback) { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listByDatabaseWithSourceNext(nextPageLink, options, callback) { +function _listRecommendedByDatabaseNext(nextPageLink, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -1160,13 +1160,13 @@ class SensitivityLabels { */ constructor(client) { this.client = client; - this._listByDatabase = _listByDatabase; - this._listByDatabaseWithSource = _listByDatabaseWithSource; + this._listCurrentByDatabase = _listCurrentByDatabase; + this._listRecommendedByDatabase = _listRecommendedByDatabase; this._get = _get; this._createOrUpdate = _createOrUpdate; this._deleteMethod = _deleteMethod; - this._listByDatabaseNext = _listByDatabaseNext; - this._listByDatabaseWithSourceNext = _listByDatabaseWithSourceNext; + this._listCurrentByDatabaseNext = _listCurrentByDatabaseNext; + this._listRecommendedByDatabaseNext = _listRecommendedByDatabaseNext; } /** @@ -1194,11 +1194,11 @@ class SensitivityLabels { * * @reject {Error} - The error object. */ - listByDatabaseWithHttpOperationResponse(resourceGroupName, serverName, databaseName, options) { + listCurrentByDatabaseWithHttpOperationResponse(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) => { + self._listCurrentByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1250,7 +1250,7 @@ class SensitivityLabels { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback) { + listCurrentByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1259,14 +1259,14 @@ class SensitivityLabels { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { + self._listCurrentByDatabase(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); + return self._listCurrentByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback); } } @@ -1281,12 +1281,10 @@ class SensitivityLabels { * * @param {string} databaseName The name of the database. * - * @param {string} sensitivityLabelSource Optional source of the sensitivity - * label. Valid values are current or recommeneded. In not specified both - * returned. Possible values include: 'current', 'recommended' - * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * * @param {string} [options.filter] An OData filter expression that filters * elements in the collection. * @@ -1299,11 +1297,11 @@ class SensitivityLabels { * * @reject {Error} - The error object. */ - listByDatabaseWithSourceWithHttpOperationResponse(resourceGroupName, serverName, databaseName, sensitivityLabelSource, options) { + listRecommendedByDatabaseWithHttpOperationResponse(resourceGroupName, serverName, databaseName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByDatabaseWithSource(resourceGroupName, serverName, databaseName, sensitivityLabelSource, options, (err, result, request, response) => { + self._listRecommendedByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1324,12 +1322,10 @@ class SensitivityLabels { * * @param {string} databaseName The name of the database. * - * @param {string} sensitivityLabelSource Optional source of the sensitivity - * label. Valid values are current or recommeneded. In not specified both - * returned. Possible values include: 'current', 'recommended' - * * @param {object} [options] Optional Parameters. * + * @param {string} [options.skipToken] + * * @param {string} [options.filter] An OData filter expression that filters * elements in the collection. * @@ -1359,7 +1355,7 @@ class SensitivityLabels { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByDatabaseWithSource(resourceGroupName, serverName, databaseName, sensitivityLabelSource, options, optionalCallback) { + listRecommendedByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1368,14 +1364,14 @@ class SensitivityLabels { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByDatabaseWithSource(resourceGroupName, serverName, databaseName, sensitivityLabelSource, options, (err, result, request, response) => { + self._listRecommendedByDatabase(resourceGroupName, serverName, databaseName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByDatabaseWithSource(resourceGroupName, serverName, databaseName, sensitivityLabelSource, options, optionalCallback); + return self._listRecommendedByDatabase(resourceGroupName, serverName, databaseName, options, optionalCallback); } } @@ -1512,8 +1508,12 @@ class SensitivityLabels { * * @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 @@ -1560,8 +1560,12 @@ class SensitivityLabels { * * @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 @@ -1731,11 +1735,11 @@ class SensitivityLabels { * * @reject {Error} - The error object. */ - listByDatabaseNextWithHttpOperationResponse(nextPageLink, options) { + listCurrentByDatabaseNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByDatabaseNext(nextPageLink, options, (err, result, request, response) => { + self._listCurrentByDatabaseNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1779,7 +1783,7 @@ class SensitivityLabels { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByDatabaseNext(nextPageLink, options, optionalCallback) { + listCurrentByDatabaseNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1788,14 +1792,14 @@ class SensitivityLabels { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByDatabaseNext(nextPageLink, options, (err, result, request, response) => { + self._listCurrentByDatabaseNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByDatabaseNext(nextPageLink, options, optionalCallback); + return self._listCurrentByDatabaseNext(nextPageLink, options, optionalCallback); } } @@ -1816,11 +1820,11 @@ class SensitivityLabels { * * @reject {Error} - The error object. */ - listByDatabaseWithSourceNextWithHttpOperationResponse(nextPageLink, options) { + listRecommendedByDatabaseNextWithHttpOperationResponse(nextPageLink, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._listByDatabaseWithSourceNext(nextPageLink, options, (err, result, request, response) => { + self._listRecommendedByDatabaseNext(nextPageLink, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -1864,7 +1868,7 @@ class SensitivityLabels { * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - listByDatabaseWithSourceNext(nextPageLink, options, optionalCallback) { + listRecommendedByDatabaseNext(nextPageLink, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -1873,14 +1877,14 @@ class SensitivityLabels { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._listByDatabaseWithSourceNext(nextPageLink, options, (err, result, request, response) => { + self._listRecommendedByDatabaseNext(nextPageLink, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._listByDatabaseWithSourceNext(nextPageLink, options, optionalCallback); + return self._listRecommendedByDatabaseNext(nextPageLink, options, optionalCallback); } } diff --git a/lib/services/sqlManagement2/lib/operations/serverVulnerabilityAssessments.js b/lib/services/sqlManagement2/lib/operations/serverVulnerabilityAssessments.js new file mode 100644 index 0000000000..c609b34893 --- /dev/null +++ b/lib/services/sqlManagement2/lib/operations/serverVulnerabilityAssessments.js @@ -0,0 +1,1307 @@ +/* + * 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 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} serverName The name of the server for which the + * vulnerability assessment is defined. + * + * @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 ServerVulnerabilityAssessment} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, serverName, 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 vulnerabilityAssessmentName = 'default'; + 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 (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 (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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{serverName}', encodeURIComponent(serverName)); + requestUrl = requestUrl.replace('{vulnerabilityAssessmentName}', encodeURIComponent(vulnerabilityAssessmentName)); + 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['ServerVulnerabilityAssessment']().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 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} 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 {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 {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 ServerVulnerabilityAssessment} 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, serverName, 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 vulnerabilityAssessmentName = 'default'; + 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 (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 (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/servers/{serverName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{serverName}', encodeURIComponent(serverName)); + requestUrl = requestUrl.replace('{vulnerabilityAssessmentName}', encodeURIComponent(vulnerabilityAssessmentName)); + 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['ServerVulnerabilityAssessment']().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['ServerVulnerabilityAssessment']().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['ServerVulnerabilityAssessment']().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); + }); +} + +/** + * 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} serverName The name of the server for which the + * vulnerability assessment is defined. + * + * @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, serverName, 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 vulnerabilityAssessmentName = 'default'; + 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 (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 (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}/vulnerabilityAssessments/{vulnerabilityAssessmentName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{serverName}', encodeURIComponent(serverName)); + requestUrl = requestUrl.replace('{vulnerabilityAssessmentName}', encodeURIComponent(vulnerabilityAssessmentName)); + 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); + }); +} + +/** + * 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 {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 ServerVulnerabilityAssessmentListResult} 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 _listByServer(resourceGroupName, serverName, 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 (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 (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}/vulnerabilityAssessments'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{serverName}', encodeURIComponent(serverName)); + 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['ServerVulnerabilityAssessmentListResult']().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); + }); +} + +/** + * 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 {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 ServerVulnerabilityAssessmentListResult} 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 _listByServerNext(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['ServerVulnerabilityAssessmentListResult']().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 ServerVulnerabilityAssessments. */ +class ServerVulnerabilityAssessments { + /** + * Create a ServerVulnerabilityAssessments. + * @param {SqlManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._deleteMethod = _deleteMethod; + this._listByServer = _listByServer; + this._listByServerNext = _listByServerNext; + } + + /** + * 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} serverName The name of the server for which the + * vulnerability assessment is defined. + * + * @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, serverName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, serverName, 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 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} serverName The name of the server for which the + * vulnerability assessment is defined. + * + * @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 {ServerVulnerabilityAssessment} - 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 ServerVulnerabilityAssessment} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, serverName, 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, serverName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, serverName, options, optionalCallback); + } + } + + /** + * 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} 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 {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 + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, serverName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, serverName, 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 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} 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 {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 {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 {ServerVulnerabilityAssessment} - 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 ServerVulnerabilityAssessment} 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, serverName, 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, serverName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, serverName, parameters, options, optionalCallback); + } + } + + /** + * 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} serverName The name of the server for which the + * vulnerability assessment is defined. + * + * @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, serverName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, serverName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * 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} serverName The name of the server for which the + * vulnerability assessment is defined. + * + * @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, serverName, 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, serverName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, serverName, options, optionalCallback); + } + } + + /** + * 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} - The error object. + */ + listByServerWithHttpOperationResponse(resourceGroupName, serverName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByServer(resourceGroupName, serverName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * 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 {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 {ServerVulnerabilityAssessmentListResult} - 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 ServerVulnerabilityAssessmentListResult} 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. + */ + listByServer(resourceGroupName, serverName, 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._listByServer(resourceGroupName, serverName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByServer(resourceGroupName, serverName, options, optionalCallback); + } + } + + /** + * 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} - The error object. + */ + listByServerNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByServerNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * 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 {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 {ServerVulnerabilityAssessmentListResult} - 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 ServerVulnerabilityAssessmentListResult} 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. + */ + listByServerNext(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._listByServerNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByServerNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = ServerVulnerabilityAssessments; diff --git a/lib/services/sqlManagement2/lib/operations/virtualClusters.js b/lib/services/sqlManagement2/lib/operations/virtualClusters.js new file mode 100644 index 0000000000..cbdd4fd490 --- /dev/null +++ b/lib/services/sqlManagement2/lib/operations/virtualClusters.js @@ -0,0 +1,1971 @@ +/* + * 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 a list of all virtualClusters in the subscription. + * + * @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 VirtualClusterListResult} 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 _list(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 = '2015-05-01-preview'; + // Validate + try { + 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}/providers/Microsoft.Sql/virtualClusters'; + 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['VirtualClusterListResult']().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 a list of virtual clusters in a resource 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 {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 VirtualClusterListResult} 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 _listByResourceGroup(resourceGroupName, 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 = '2015-05-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 (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/virtualClusters'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + 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['VirtualClusterListResult']().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 a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @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 VirtualCluster} 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, virtualClusterName, 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 = '2015-05-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 (virtualClusterName === null || virtualClusterName === undefined || typeof virtualClusterName.valueOf() !== 'string') { + throw new Error('virtualClusterName 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/virtualClusters/{virtualClusterName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualClusterName}', encodeURIComponent(virtualClusterName)); + 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['VirtualCluster']().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); + }); +} + + +/** + * Deletes a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @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, virtualClusterName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, virtualClusterName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Updates a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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 VirtualCluster} 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 _update(resourceGroupName, virtualClusterName, 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.'); + } + + // Send request + this.beginUpdate(resourceGroupName, virtualClusterName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualCluster']().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); + }); + }); +} + +/** + * Deletes a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @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 _beginDeleteMethod(resourceGroupName, virtualClusterName, 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 = '2015-05-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 (virtualClusterName === null || virtualClusterName === undefined || typeof virtualClusterName.valueOf() !== 'string') { + throw new Error('virtualClusterName 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/virtualClusters/{virtualClusterName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualClusterName}', encodeURIComponent(virtualClusterName)); + 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 && statusCode !== 202 && statusCode !== 204) { + 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); + }); +} + +/** + * Updates a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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 VirtualCluster} 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 _beginUpdate(resourceGroupName, virtualClusterName, 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 apiVersion = '2015-05-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 (virtualClusterName === null || virtualClusterName === undefined || typeof virtualClusterName.valueOf() !== 'string') { + throw new Error('virtualClusterName 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/virtualClusters/{virtualClusterName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualClusterName}', encodeURIComponent(virtualClusterName)); + 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 = 'PATCH'; + 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['VirtualClusterUpdate']().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 !== 202) { + 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['VirtualCluster']().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 a list of all virtualClusters in the subscription. + * + * @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 VirtualClusterListResult} 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 _listNext(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['VirtualClusterListResult']().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 a list of virtual clusters in a resource group. + * + * @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 VirtualClusterListResult} 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 _listByResourceGroupNext(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['VirtualClusterListResult']().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 VirtualClusters. */ +class VirtualClusters { + /** + * Create a VirtualClusters. + * @param {SqlManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._listByResourceGroup = _listByResourceGroup; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._update = _update; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginUpdate = _beginUpdate; + this._listNext = _listNext; + this._listByResourceGroupNext = _listByResourceGroupNext; + } + + /** + * Gets a list of all virtualClusters in the subscription. + * + * @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. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a list of all virtualClusters in the subscription. + * + * @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 {VirtualClusterListResult} - 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 VirtualClusterListResult} 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. + */ + list(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._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Gets a list of virtual clusters in a resource 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 {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. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a list of virtual clusters in a resource 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 {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 {VirtualClusterListResult} - 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 VirtualClusterListResult} 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. + */ + listByResourceGroup(resourceGroupName, 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._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * Gets a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @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, virtualClusterName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, virtualClusterName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @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 {VirtualCluster} - 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 VirtualCluster} 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, virtualClusterName, 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, virtualClusterName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, virtualClusterName, options, optionalCallback); + } + } + + /** + * Deletes a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @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, virtualClusterName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, virtualClusterName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @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, virtualClusterName, 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, virtualClusterName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, virtualClusterName, options, optionalCallback); + } + } + + /** + * Updates a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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. + */ + updateWithHttpOperationResponse(resourceGroupName, virtualClusterName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._update(resourceGroupName, virtualClusterName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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 {VirtualCluster} - 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 VirtualCluster} 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. + */ + update(resourceGroupName, virtualClusterName, 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._update(resourceGroupName, virtualClusterName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._update(resourceGroupName, virtualClusterName, parameters, options, optionalCallback); + } + } + + /** + * Deletes a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @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. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, virtualClusterName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, virtualClusterName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @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. + */ + beginDeleteMethod(resourceGroupName, virtualClusterName, 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._beginDeleteMethod(resourceGroupName, virtualClusterName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, virtualClusterName, options, optionalCallback); + } + } + + /** + * Updates a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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. + */ + beginUpdateWithHttpOperationResponse(resourceGroupName, virtualClusterName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdate(resourceGroupName, virtualClusterName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates a virtual cluster. + * + * @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} virtualClusterName The name of the virtual cluster. + * + * @param {object} parameters The requested managed instance resource state. + * + * @param {string} [parameters.family] If the service has different generations + * of hardware, for the same SKU, then that can be captured here. + * + * @param {object} [parameters.tags] Resource tags. + * + * @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 {VirtualCluster} - 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 VirtualCluster} 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. + */ + beginUpdate(resourceGroupName, virtualClusterName, 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._beginUpdate(resourceGroupName, virtualClusterName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdate(resourceGroupName, virtualClusterName, parameters, options, optionalCallback); + } + } + + /** + * Gets a list of all virtualClusters in the subscription. + * + * @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. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(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 a list of all virtualClusters in the subscription. + * + * @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 {VirtualClusterListResult} - 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 VirtualClusterListResult} 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. + */ + listNext(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._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + + /** + * Gets a list of virtual clusters in a resource group. + * + * @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. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(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 a list of virtual clusters in a resource group. + * + * @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 {VirtualClusterListResult} - 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 VirtualClusterListResult} 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. + */ + listByResourceGroupNext(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._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = VirtualClusters; diff --git a/lib/services/sqlManagement2/lib/sqlManagementClient.d.ts b/lib/services/sqlManagement2/lib/sqlManagementClient.d.ts index e72fad0799..071ab545cf 100644 --- a/lib/services/sqlManagement2/lib/sqlManagementClient.d.ts +++ b/lib/services/sqlManagement2/lib/sqlManagementClient.d.ts @@ -87,6 +87,7 @@ export default class SqlManagementClient extends AzureServiceClient { syncGroups: operations.SyncGroups; syncMembers: operations.SyncMembers; subscriptionUsages: operations.SubscriptionUsages; + virtualClusters: operations.VirtualClusters; virtualNetworkRules: operations.VirtualNetworkRules; extendedDatabaseBlobAuditingPolicies: operations.ExtendedDatabaseBlobAuditingPolicies; extendedServerBlobAuditingPolicies: operations.ExtendedServerBlobAuditingPolicies; @@ -107,10 +108,15 @@ export default class SqlManagementClient extends AzureServiceClient { backupLongTermRetentionPolicies: operations.BackupLongTermRetentionPolicies; managedBackupShortTermRetentionPolicies: operations.ManagedBackupShortTermRetentionPolicies; managedDatabases: operations.ManagedDatabases; + managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies: operations.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies; serverAutomaticTuningOperations: operations.ServerAutomaticTuningOperations; serverDnsAliases: operations.ServerDnsAliases; serverSecurityAlertPolicies: operations.ServerSecurityAlertPolicies; + restorableDroppedManagedDatabases: operations.RestorableDroppedManagedDatabases; restorePoints: operations.RestorePoints; + managedDatabaseSecurityAlertPolicies: operations.ManagedDatabaseSecurityAlertPolicies; + managedServerSecurityAlertPolicies: operations.ManagedServerSecurityAlertPolicies; + sensitivityLabels: operations.SensitivityLabels; databaseOperations: operations.DatabaseOperations; elasticPoolOperations: operations.ElasticPoolOperations; capabilities: operations.Capabilities; @@ -124,6 +130,10 @@ export default class SqlManagementClient extends AzureServiceClient { managedInstanceTdeCertificates: operations.ManagedInstanceTdeCertificates; managedInstanceKeys: operations.ManagedInstanceKeys; managedInstanceEncryptionProtectors: operations.ManagedInstanceEncryptionProtectors; + 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 45135244a8..d7dc1b6c1f 100644 --- a/lib/services/sqlManagement2/lib/sqlManagementClient.js +++ b/lib/services/sqlManagement2/lib/sqlManagementClient.js @@ -104,6 +104,7 @@ class SqlManagementClient extends ServiceClient { this.syncGroups = new operations.SyncGroups(this); this.syncMembers = new operations.SyncMembers(this); this.subscriptionUsages = new operations.SubscriptionUsages(this); + this.virtualClusters = new operations.VirtualClusters(this); this.virtualNetworkRules = new operations.VirtualNetworkRules(this); this.extendedDatabaseBlobAuditingPolicies = new operations.ExtendedDatabaseBlobAuditingPolicies(this); this.extendedServerBlobAuditingPolicies = new operations.ExtendedServerBlobAuditingPolicies(this); @@ -124,10 +125,15 @@ class SqlManagementClient extends ServiceClient { this.backupLongTermRetentionPolicies = new operations.BackupLongTermRetentionPolicies(this); this.managedBackupShortTermRetentionPolicies = new operations.ManagedBackupShortTermRetentionPolicies(this); this.managedDatabases = new operations.ManagedDatabases(this); + this.managedRestorableDroppedDatabaseBackupShortTermRetentionPolicies = new operations.ManagedRestorableDroppedDatabaseBackupShortTermRetentionPolicies(this); this.serverAutomaticTuningOperations = new operations.ServerAutomaticTuningOperations(this); this.serverDnsAliases = new operations.ServerDnsAliases(this); this.serverSecurityAlertPolicies = new operations.ServerSecurityAlertPolicies(this); + this.restorableDroppedManagedDatabases = new operations.RestorableDroppedManagedDatabases(this); 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); @@ -141,6 +147,10 @@ class SqlManagementClient extends ServiceClient { this.managedInstanceTdeCertificates = new operations.ManagedInstanceTdeCertificates(this); this.managedInstanceKeys = new operations.ManagedInstanceKeys(this); this.managedInstanceEncryptionProtectors = new operations.ManagedInstanceEncryptionProtectors(this); + 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); }