diff --git a/sql/resource-manager/v2014_04_01/pom.xml b/sql/resource-manager/v2014_04_01/pom.xml
index ea0859894df5..7a82102978b7 100644
--- a/sql/resource-manager/v2014_04_01/pom.xml
+++ b/sql/resource-manager/v2014_04_01/pom.xml
@@ -11,7 +11,7 @@
com.microsoft.azure
azure-arm-parent
- 0.0.3-beta
+ 0.0.2-beta
../../../pom.xml
azure-mgmt-sql
@@ -19,7 +19,7 @@
jar
Microsoft Azure SDK for Sql Management
This package contains Microsoft Sql Management SDK.
- https://github.com/Azure/azure-libraries-for-java
+ https://github.com/Azure/azure-sdk-for-java
The MIT License (MIT)
@@ -28,8 +28,8 @@
- scm:git:https://github.com/Azure/azure-libraries-for-java
- scm:git:git@github.com:Azure/azure-libraries-for-java.git
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
HEAD
diff --git a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Database.java b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Database.java
index cbc104d416e0..0794fd1d73b9 100644
--- a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Database.java
+++ b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/Database.java
@@ -210,6 +210,9 @@ interface Blank extends WithServer {
interface WithServer {
/**
* Specifies resourceGroupName, serverName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @return the next definition stage
*/
WithLocation withExistingServer(String resourceGroupName, String serverName);
}
@@ -220,6 +223,8 @@ interface WithServer {
interface WithLocation {
/**
* Specifies location.
+ * @param location Resource location
+ * @return the next definition stage
*/
WithCreate withLocation(String location);
}
@@ -230,6 +235,8 @@ interface WithLocation {
interface WithCollation {
/**
* Specifies collation.
+ * @param collation The collation of the database. If createMode is not Default, this value is ignored
+ * @return the next definition stage
*/
WithCreate withCollation(String collation);
}
@@ -240,6 +247,16 @@ interface WithCollation {
interface WithCreateMode {
/**
* Specifies createMode.
+ * @param 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.
+ OnlineSecondary/NonReadableSecondary: creates a database as a (readable or nonreadable) 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, NonReadableSecondary, OnlineSecondary and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. Possible values include: 'Copy', 'Default', 'NonReadableSecondary', 'OnlineSecondary', 'PointInTimeRestore', 'Recovery', 'Restore', 'RestoreLongTermRetentionBackup'
+ * @return the next definition stage
*/
WithCreate withCreateMode(CreateMode createMode);
}
@@ -250,6 +267,8 @@ interface WithCreateMode {
interface WithEdition {
/**
* Specifies edition.
+ * @param edition The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions -l westus --query [].name`. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2'
+ * @return the next definition stage
*/
WithCreate withEdition(DatabaseEdition edition);
}
@@ -260,6 +279,8 @@ interface WithEdition {
interface WithElasticPoolName {
/**
* Specifies elasticPoolName.
+ * @param elasticPoolName The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition
+ * @return the next definition stage
*/
WithCreate withElasticPoolName(String elasticPoolName);
}
@@ -270,6 +291,8 @@ interface WithElasticPoolName {
interface WithMaxSizeBytes {
/**
* Specifies maxSizeBytes.
+ * @param maxSizeBytes The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."
+ * @return the next definition stage
*/
WithCreate withMaxSizeBytes(String maxSizeBytes);
}
@@ -280,6 +303,8 @@ interface WithMaxSizeBytes {
interface WithReadScale {
/**
* Specifies readScale.
+ * @param readScale Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. Possible values include: 'Enabled', 'Disabled'
+ * @return the next definition stage
*/
WithCreate withReadScale(ReadScale readScale);
}
@@ -290,6 +315,8 @@ interface WithReadScale {
interface WithRecoveryServicesRecoveryPointResourceId {
/**
* Specifies recoveryServicesRecoveryPointResourceId.
+ * @param recoveryServicesRecoveryPointResourceId Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from
+ * @return the next definition stage
*/
WithCreate withRecoveryServicesRecoveryPointResourceId(String recoveryServicesRecoveryPointResourceId);
}
@@ -300,6 +327,8 @@ interface WithRecoveryServicesRecoveryPointResourceId {
interface WithRequestedServiceObjectiveId {
/**
* Specifies requestedServiceObjectiveId.
+ * @param requestedServiceObjectiveId The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`
+ * @return the next definition stage
*/
WithCreate withRequestedServiceObjectiveId(UUID requestedServiceObjectiveId);
}
@@ -310,6 +339,8 @@ interface WithRequestedServiceObjectiveId {
interface WithRequestedServiceObjectiveName {
/**
* Specifies requestedServiceObjectiveName.
+ * @param requestedServiceObjectiveName The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`. 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'
+ * @return the next definition stage
*/
WithCreate withRequestedServiceObjectiveName(ServiceObjectiveName requestedServiceObjectiveName);
}
@@ -320,6 +351,8 @@ interface WithRequestedServiceObjectiveName {
interface WithRestorePointInTime {
/**
* Specifies restorePointInTime.
+ * @param restorePointInTime Conditional. If createMode is PointInTimeRestore, this value is required. If createMode is Restore, this value is optional. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. Must be greater than or equal to the source database's earliestRestoreDate value
+ * @return the next definition stage
*/
WithCreate withRestorePointInTime(DateTime restorePointInTime);
}
@@ -330,6 +363,8 @@ interface WithRestorePointInTime {
interface WithSampleName {
/**
* Specifies sampleName.
+ * @param sampleName Indicates the name of the sample schema to apply when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition. Possible values include: 'AdventureWorksLT'
+ * @return the next definition stage
*/
WithCreate withSampleName(SampleName sampleName);
}
@@ -340,6 +375,8 @@ interface WithSampleName {
interface WithSourceDatabaseDeletionDate {
/**
* Specifies sourceDatabaseDeletionDate.
+ * @param sourceDatabaseDeletionDate Conditional. If createMode is Restore and sourceDatabaseId is the deleted database's original resource id when it existed (as opposed to its current restorable dropped database id), then this value is required. Specifies the time that the database was deleted
+ * @return the next definition stage
*/
WithCreate withSourceDatabaseDeletionDate(DateTime sourceDatabaseDeletionDate);
}
@@ -350,6 +387,8 @@ interface WithSourceDatabaseDeletionDate {
interface WithSourceDatabaseId {
/**
* Specifies sourceDatabaseId.
+ * @param sourceDatabaseId Conditional. If createMode is Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, or Restore, then this value is required. Specifies the resource ID of the source database. If createMode is NonReadableSecondary or OnlineSecondary, the name of the source database must be the same as the new database being created
+ * @return the next definition stage
*/
WithCreate withSourceDatabaseId(String sourceDatabaseId);
}
@@ -360,6 +399,8 @@ interface WithSourceDatabaseId {
interface WithTags {
/**
* Specifies tags.
+ * @param tags Resource tags
+ * @return the next definition stage
*/
WithCreate withTags(Map tags);
}
@@ -370,6 +411,8 @@ interface WithTags {
interface WithZoneRedundant {
/**
* Specifies zoneRedundant.
+ * @param zoneRedundant Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones
+ * @return the next definition stage
*/
WithCreate withZoneRedundant(Boolean zoneRedundant);
}
@@ -398,6 +441,8 @@ interface UpdateStages {
interface WithCollation {
/**
* Specifies collation.
+ * @param collation The collation of the database. If createMode is not Default, this value is ignored
+ * @return the next update stage
*/
Update withCollation(String collation);
}
@@ -408,6 +453,16 @@ interface WithCollation {
interface WithCreateMode {
/**
* Specifies createMode.
+ * @param 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.
+ OnlineSecondary/NonReadableSecondary: creates a database as a (readable or nonreadable) 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, NonReadableSecondary, OnlineSecondary and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. Possible values include: 'Copy', 'Default', 'NonReadableSecondary', 'OnlineSecondary', 'PointInTimeRestore', 'Recovery', 'Restore', 'RestoreLongTermRetentionBackup'
+ * @return the next update stage
*/
Update withCreateMode(CreateMode createMode);
}
@@ -418,6 +473,8 @@ interface WithCreateMode {
interface WithEdition {
/**
* Specifies edition.
+ * @param edition The edition of the database. The DatabaseEditions enumeration contains all the valid editions. If createMode is NonReadableSecondary or OnlineSecondary, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions -l westus --query [].name`. Possible values include: 'Web', 'Business', 'Basic', 'Standard', 'Premium', 'PremiumRS', 'Free', 'Stretch', 'DataWarehouse', 'System', 'System2'
+ * @return the next update stage
*/
Update withEdition(DatabaseEdition edition);
}
@@ -428,6 +485,8 @@ interface WithEdition {
interface WithElasticPoolName {
/**
* Specifies elasticPoolName.
+ * @param elasticPoolName The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition
+ * @return the next update stage
*/
Update withElasticPoolName(String elasticPoolName);
}
@@ -438,6 +497,8 @@ interface WithElasticPoolName {
interface WithMaxSizeBytes {
/**
* Specifies maxSizeBytes.
+ * @param maxSizeBytes The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation."
+ * @return the next update stage
*/
Update withMaxSizeBytes(String maxSizeBytes);
}
@@ -448,6 +509,8 @@ interface WithMaxSizeBytes {
interface WithReadScale {
/**
* Specifies readScale.
+ * @param readScale Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. Possible values include: 'Enabled', 'Disabled'
+ * @return the next update stage
*/
Update withReadScale(ReadScale readScale);
}
@@ -458,6 +521,8 @@ interface WithReadScale {
interface WithRecoveryServicesRecoveryPointResourceId {
/**
* Specifies recoveryServicesRecoveryPointResourceId.
+ * @param recoveryServicesRecoveryPointResourceId Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from
+ * @return the next update stage
*/
Update withRecoveryServicesRecoveryPointResourceId(String recoveryServicesRecoveryPointResourceId);
}
@@ -468,6 +533,8 @@ interface WithRecoveryServicesRecoveryPointResourceId {
interface WithRequestedServiceObjectiveId {
/**
* Specifies requestedServiceObjectiveId.
+ * @param requestedServiceObjectiveId The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`
+ * @return the next update stage
*/
Update withRequestedServiceObjectiveId(UUID requestedServiceObjectiveId);
}
@@ -478,6 +545,8 @@ interface WithRequestedServiceObjectiveId {
interface WithRequestedServiceObjectiveName {
/**
* Specifies requestedServiceObjectiveName.
+ * @param requestedServiceObjectiveName The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." or use the Azure CLI command `az sql db list-editions --location <location> --query [].supportedServiceLevelObjectives[].name`. 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'
+ * @return the next update stage
*/
Update withRequestedServiceObjectiveName(ServiceObjectiveName requestedServiceObjectiveName);
}
@@ -488,6 +557,8 @@ interface WithRequestedServiceObjectiveName {
interface WithRestorePointInTime {
/**
* Specifies restorePointInTime.
+ * @param restorePointInTime Conditional. If createMode is PointInTimeRestore, this value is required. If createMode is Restore, this value is optional. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. Must be greater than or equal to the source database's earliestRestoreDate value
+ * @return the next update stage
*/
Update withRestorePointInTime(DateTime restorePointInTime);
}
@@ -498,6 +569,8 @@ interface WithRestorePointInTime {
interface WithSampleName {
/**
* Specifies sampleName.
+ * @param sampleName Indicates the name of the sample schema to apply when creating this database. If createMode is not Default, this value is ignored. Not supported for DataWarehouse edition. Possible values include: 'AdventureWorksLT'
+ * @return the next update stage
*/
Update withSampleName(SampleName sampleName);
}
@@ -508,6 +581,8 @@ interface WithSampleName {
interface WithSourceDatabaseDeletionDate {
/**
* Specifies sourceDatabaseDeletionDate.
+ * @param sourceDatabaseDeletionDate Conditional. If createMode is Restore and sourceDatabaseId is the deleted database's original resource id when it existed (as opposed to its current restorable dropped database id), then this value is required. Specifies the time that the database was deleted
+ * @return the next update stage
*/
Update withSourceDatabaseDeletionDate(DateTime sourceDatabaseDeletionDate);
}
@@ -518,6 +593,8 @@ interface WithSourceDatabaseDeletionDate {
interface WithSourceDatabaseId {
/**
* Specifies sourceDatabaseId.
+ * @param sourceDatabaseId Conditional. If createMode is Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, or Restore, then this value is required. Specifies the resource ID of the source database. If createMode is NonReadableSecondary or OnlineSecondary, the name of the source database must be the same as the new database being created
+ * @return the next update stage
*/
Update withSourceDatabaseId(String sourceDatabaseId);
}
@@ -528,6 +605,8 @@ interface WithSourceDatabaseId {
interface WithTags {
/**
* Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
*/
Update withTags(Map tags);
}
@@ -538,6 +617,8 @@ interface WithTags {
interface WithZoneRedundant {
/**
* Specifies zoneRedundant.
+ * @param zoneRedundant Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones
+ * @return the next update stage
*/
Update withZoneRedundant(Boolean zoneRedundant);
}
diff --git a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseSecurityAlertPolicy.java b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseSecurityAlertPolicy.java
index 219419e26a66..e971723b73d5 100644
--- a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseSecurityAlertPolicy.java
+++ b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/DatabaseSecurityAlertPolicy.java
@@ -109,6 +109,10 @@ interface Blank extends WithDatabasis {
interface WithDatabasis {
/**
* Specifies resourceGroupName, serverName, databaseName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @param databaseName The name of the database for which database Threat Detection policy is defined
+ * @return the next definition stage
*/
WithState withExistingDatabasis(String resourceGroupName, String serverName, String databaseName);
}
@@ -119,6 +123,8 @@ interface WithDatabasis {
interface WithState {
/**
* Specifies state.
+ * @param state Specifies the state of the policy. If state is Enabled, storageEndpoint and storageAccountAccessKey are required. Possible values include: 'New', 'Enabled', 'Disabled'
+ * @return the next definition stage
*/
WithCreate withState(SecurityAlertPolicyState state);
}
@@ -129,6 +135,8 @@ interface WithState {
interface WithDisabledAlerts {
/**
* Specifies disabledAlerts.
+ * @param 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
+ * @return the next definition stage
*/
WithCreate withDisabledAlerts(String disabledAlerts);
}
@@ -139,6 +147,8 @@ interface WithDisabledAlerts {
interface WithEmailAccountAdmins {
/**
* Specifies emailAccountAdmins.
+ * @param emailAccountAdmins Specifies that the alert is sent to the account administrators. Possible values include: 'Enabled', 'Disabled'
+ * @return the next definition stage
*/
WithCreate withEmailAccountAdmins(SecurityAlertPolicyEmailAccountAdmins emailAccountAdmins);
}
@@ -149,6 +159,8 @@ interface WithEmailAccountAdmins {
interface WithEmailAddresses {
/**
* Specifies emailAddresses.
+ * @param emailAddresses Specifies the semicolon-separated list of e-mail addresses to which the alert is sent
+ * @return the next definition stage
*/
WithCreate withEmailAddresses(String emailAddresses);
}
@@ -159,6 +171,8 @@ interface WithEmailAddresses {
interface WithLocation {
/**
* Specifies location.
+ * @param location The geo-location where the resource lives
+ * @return the next definition stage
*/
WithCreate withLocation(String location);
}
@@ -169,6 +183,8 @@ interface WithLocation {
interface WithRetentionDays {
/**
* Specifies retentionDays.
+ * @param retentionDays Specifies the number of days to keep in the Threat Detection audit logs
+ * @return the next definition stage
*/
WithCreate withRetentionDays(Integer retentionDays);
}
@@ -179,6 +195,8 @@ interface WithRetentionDays {
interface WithStorageAccountAccessKey {
/**
* Specifies storageAccountAccessKey.
+ * @param storageAccountAccessKey Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required
+ * @return the next definition stage
*/
WithCreate withStorageAccountAccessKey(String storageAccountAccessKey);
}
@@ -189,6 +207,8 @@ interface WithStorageAccountAccessKey {
interface WithStorageEndpoint {
/**
* Specifies storageEndpoint.
+ * @param 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
+ * @return the next definition stage
*/
WithCreate withStorageEndpoint(String storageEndpoint);
}
@@ -199,6 +219,8 @@ interface WithStorageEndpoint {
interface WithUseServerDefault {
/**
* Specifies useServerDefault.
+ * @param useServerDefault Specifies whether to use the default server policy. Possible values include: 'Enabled', 'Disabled'
+ * @return the next definition stage
*/
WithCreate withUseServerDefault(SecurityAlertPolicyUseServerDefault useServerDefault);
}
@@ -227,6 +249,8 @@ interface UpdateStages {
interface WithDisabledAlerts {
/**
* Specifies disabledAlerts.
+ * @param 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
+ * @return the next update stage
*/
Update withDisabledAlerts(String disabledAlerts);
}
@@ -237,6 +261,8 @@ interface WithDisabledAlerts {
interface WithEmailAccountAdmins {
/**
* Specifies emailAccountAdmins.
+ * @param emailAccountAdmins Specifies that the alert is sent to the account administrators. Possible values include: 'Enabled', 'Disabled'
+ * @return the next update stage
*/
Update withEmailAccountAdmins(SecurityAlertPolicyEmailAccountAdmins emailAccountAdmins);
}
@@ -247,6 +273,8 @@ interface WithEmailAccountAdmins {
interface WithEmailAddresses {
/**
* Specifies emailAddresses.
+ * @param emailAddresses Specifies the semicolon-separated list of e-mail addresses to which the alert is sent
+ * @return the next update stage
*/
Update withEmailAddresses(String emailAddresses);
}
@@ -257,6 +285,8 @@ interface WithEmailAddresses {
interface WithLocation {
/**
* Specifies location.
+ * @param location The geo-location where the resource lives
+ * @return the next update stage
*/
Update withLocation(String location);
}
@@ -267,6 +297,8 @@ interface WithLocation {
interface WithRetentionDays {
/**
* Specifies retentionDays.
+ * @param retentionDays Specifies the number of days to keep in the Threat Detection audit logs
+ * @return the next update stage
*/
Update withRetentionDays(Integer retentionDays);
}
@@ -277,6 +309,8 @@ interface WithRetentionDays {
interface WithStorageAccountAccessKey {
/**
* Specifies storageAccountAccessKey.
+ * @param storageAccountAccessKey Specifies the identifier key of the Threat Detection audit storage account. If state is Enabled, storageAccountAccessKey is required
+ * @return the next update stage
*/
Update withStorageAccountAccessKey(String storageAccountAccessKey);
}
@@ -287,6 +321,8 @@ interface WithStorageAccountAccessKey {
interface WithStorageEndpoint {
/**
* Specifies storageEndpoint.
+ * @param 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
+ * @return the next update stage
*/
Update withStorageEndpoint(String storageEndpoint);
}
@@ -297,6 +333,8 @@ interface WithStorageEndpoint {
interface WithUseServerDefault {
/**
* Specifies useServerDefault.
+ * @param useServerDefault Specifies whether to use the default server policy. Possible values include: 'Enabled', 'Disabled'
+ * @return the next update stage
*/
Update withUseServerDefault(SecurityAlertPolicyUseServerDefault useServerDefault);
}
diff --git a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPool.java b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPool.java
index 3d1ce6a7f16d..22c4dd39ec5d 100644
--- a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPool.java
+++ b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ElasticPool.java
@@ -116,6 +116,9 @@ interface Blank extends WithServer {
interface WithServer {
/**
* Specifies resourceGroupName, serverName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @return the next definition stage
*/
WithLocation withExistingServer(String resourceGroupName, String serverName);
}
@@ -126,6 +129,8 @@ interface WithServer {
interface WithLocation {
/**
* Specifies location.
+ * @param location Resource location
+ * @return the next definition stage
*/
WithCreate withLocation(String location);
}
@@ -136,6 +141,8 @@ interface WithLocation {
interface WithDatabaseDtuMax {
/**
* Specifies databaseDtuMax.
+ * @param databaseDtuMax The maximum DTU any one database can consume
+ * @return the next definition stage
*/
WithCreate withDatabaseDtuMax(Integer databaseDtuMax);
}
@@ -146,6 +153,8 @@ interface WithDatabaseDtuMax {
interface WithDatabaseDtuMin {
/**
* Specifies databaseDtuMin.
+ * @param databaseDtuMin The minimum DTU all databases are guaranteed
+ * @return the next definition stage
*/
WithCreate withDatabaseDtuMin(Integer databaseDtuMin);
}
@@ -156,6 +165,8 @@ interface WithDatabaseDtuMin {
interface WithDtu {
/**
* Specifies dtu.
+ * @param dtu The total shared DTU for the database elastic pool
+ * @return the next definition stage
*/
WithCreate withDtu(Integer dtu);
}
@@ -166,6 +177,8 @@ interface WithDtu {
interface WithEdition {
/**
* Specifies edition.
+ * @param edition The edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium'
+ * @return the next definition stage
*/
WithCreate withEdition(ElasticPoolEdition edition);
}
@@ -176,6 +189,8 @@ interface WithEdition {
interface WithStorageMB {
/**
* Specifies storageMB.
+ * @param storageMB Gets storage limit for the database elastic pool in MB
+ * @return the next definition stage
*/
WithCreate withStorageMB(Integer storageMB);
}
@@ -186,6 +201,8 @@ interface WithStorageMB {
interface WithTags {
/**
* Specifies tags.
+ * @param tags Resource tags
+ * @return the next definition stage
*/
WithCreate withTags(Map tags);
}
@@ -196,6 +213,8 @@ interface WithTags {
interface WithZoneRedundant {
/**
* Specifies zoneRedundant.
+ * @param zoneRedundant Whether or not this database elastic pool is zone redundant, which means the replicas of this database will be spread across multiple availability zones
+ * @return the next definition stage
*/
WithCreate withZoneRedundant(Boolean zoneRedundant);
}
@@ -224,6 +243,8 @@ interface UpdateStages {
interface WithDatabaseDtuMax {
/**
* Specifies databaseDtuMax.
+ * @param databaseDtuMax The maximum DTU any one database can consume
+ * @return the next update stage
*/
Update withDatabaseDtuMax(Integer databaseDtuMax);
}
@@ -234,6 +255,8 @@ interface WithDatabaseDtuMax {
interface WithDatabaseDtuMin {
/**
* Specifies databaseDtuMin.
+ * @param databaseDtuMin The minimum DTU all databases are guaranteed
+ * @return the next update stage
*/
Update withDatabaseDtuMin(Integer databaseDtuMin);
}
@@ -244,6 +267,8 @@ interface WithDatabaseDtuMin {
interface WithDtu {
/**
* Specifies dtu.
+ * @param dtu The total shared DTU for the database elastic pool
+ * @return the next update stage
*/
Update withDtu(Integer dtu);
}
@@ -254,6 +279,8 @@ interface WithDtu {
interface WithEdition {
/**
* Specifies edition.
+ * @param edition The edition of the elastic pool. Possible values include: 'Basic', 'Standard', 'Premium'
+ * @return the next update stage
*/
Update withEdition(ElasticPoolEdition edition);
}
@@ -264,6 +291,8 @@ interface WithEdition {
interface WithStorageMB {
/**
* Specifies storageMB.
+ * @param storageMB Gets storage limit for the database elastic pool in MB
+ * @return the next update stage
*/
Update withStorageMB(Integer storageMB);
}
@@ -274,6 +303,8 @@ interface WithStorageMB {
interface WithTags {
/**
* Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
*/
Update withTags(Map tags);
}
@@ -284,6 +315,8 @@ interface WithTags {
interface WithZoneRedundant {
/**
* Specifies zoneRedundant.
+ * @param zoneRedundant Whether or not this database elastic pool is zone redundant, which means the replicas of this database will be spread across multiple availability zones
+ * @return the next update stage
*/
Update withZoneRedundant(Boolean zoneRedundant);
}
diff --git a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/FirewallRule.java b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/FirewallRule.java
index 113a3fd162b7..379746b5a031 100644
--- a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/FirewallRule.java
+++ b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/FirewallRule.java
@@ -79,6 +79,9 @@ interface Blank extends WithServer {
interface WithServer {
/**
* Specifies resourceGroupName, serverName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @return the next definition stage
*/
WithEndIpAddress withExistingServer(String resourceGroupName, String serverName);
}
@@ -89,6 +92,8 @@ interface WithServer {
interface WithEndIpAddress {
/**
* Specifies endIpAddress.
+ * @param 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
+ * @return the next definition stage
*/
WithStartIpAddress withEndIpAddress(String endIpAddress);
}
@@ -99,6 +104,8 @@ interface WithEndIpAddress {
interface WithStartIpAddress {
/**
* Specifies startIpAddress.
+ * @param 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
+ * @return the next definition stage
*/
WithCreate withStartIpAddress(String startIpAddress);
}
diff --git a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ImportExportResponse.java b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ImportExportResponse.java
index 3bfb29fdd51d..eb8c451ffbaf 100644
--- a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ImportExportResponse.java
+++ b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/ImportExportResponse.java
@@ -104,6 +104,10 @@ interface Blank extends WithDatabasis {
interface WithDatabasis {
/**
* Specifies resourceGroupName, serverName, databaseName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @param databaseName The name of the database to import into
+ * @return the next definition stage
*/
WithAdministratorLogin withExistingDatabasis(String resourceGroupName, String serverName, String databaseName);
}
@@ -114,6 +118,8 @@ interface WithDatabasis {
interface WithAdministratorLogin {
/**
* Specifies administratorLogin.
+ * @param administratorLogin The name of the SQL administrator
+ * @return the next definition stage
*/
WithAdministratorLoginPassword withAdministratorLogin(String administratorLogin);
}
@@ -124,6 +130,8 @@ interface WithAdministratorLogin {
interface WithAdministratorLoginPassword {
/**
* Specifies administratorLoginPassword.
+ * @param administratorLoginPassword The password of the SQL administrator
+ * @return the next definition stage
*/
WithOperationMode withAdministratorLoginPassword(String administratorLoginPassword);
}
@@ -134,6 +142,8 @@ interface WithAdministratorLoginPassword {
interface WithOperationMode {
/**
* Specifies operationMode.
+ * @param operationMode The type of import operation being performed. This is always Import
+ * @return the next definition stage
*/
WithStorageKey withOperationMode(String operationMode);
}
@@ -144,6 +154,8 @@ interface WithOperationMode {
interface WithStorageKey {
/**
* Specifies storageKey.
+ * @param storageKey The storage key to use. If storage key type is SharedAccessKey, it must be preceded with a "?."
+ * @return the next definition stage
*/
WithStorageKeyType withStorageKey(String storageKey);
}
@@ -154,6 +166,8 @@ interface WithStorageKey {
interface WithStorageKeyType {
/**
* Specifies storageKeyType.
+ * @param storageKeyType The type of the storage key to use. Possible values include: 'StorageAccessKey', 'SharedAccessKey'
+ * @return the next definition stage
*/
WithStorageUri withStorageKeyType(StorageKeyType storageKeyType);
}
@@ -164,6 +178,8 @@ interface WithStorageKeyType {
interface WithStorageUri {
/**
* Specifies storageUri.
+ * @param storageUri The storage uri to use
+ * @return the next definition stage
*/
WithCreate withStorageUri(String storageUri);
}
@@ -174,6 +190,8 @@ interface WithStorageUri {
interface WithAuthenticationType {
/**
* Specifies authenticationType.
+ * @param authenticationType The authentication type. Possible values include: 'SQL', 'ADPassword'
+ * @return the next definition stage
*/
WithCreate withAuthenticationType(AuthenticationType authenticationType);
}
@@ -184,6 +202,8 @@ interface WithAuthenticationType {
interface WithName {
/**
* Specifies name.
+ * @param name The name of the extension
+ * @return the next definition stage
*/
WithCreate withName(String name);
}
@@ -194,6 +214,8 @@ interface WithName {
interface WithType {
/**
* Specifies type.
+ * @param type The type of the extension
+ * @return the next definition stage
*/
WithCreate withType(String type);
}
@@ -222,6 +244,8 @@ interface UpdateStages {
interface WithAuthenticationType {
/**
* Specifies authenticationType.
+ * @param authenticationType The authentication type. Possible values include: 'SQL', 'ADPassword'
+ * @return the next update stage
*/
Update withAuthenticationType(AuthenticationType authenticationType);
}
@@ -232,6 +256,8 @@ interface WithAuthenticationType {
interface WithName {
/**
* Specifies name.
+ * @param name The name of the extension
+ * @return the next update stage
*/
Update withName(String name);
}
@@ -242,6 +268,8 @@ interface WithName {
interface WithType {
/**
* Specifies type.
+ * @param type The type of the extension
+ * @return the next update stage
*/
Update withType(String type);
}
diff --git a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseImpl.java b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseImpl.java
index e86c1cac6c00..eac249ed9214 100644
--- a/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseImpl.java
+++ b/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabaseImpl.java
@@ -48,7 +48,7 @@ class DatabaseImpl extends CreatableUpdatableImpl
com.microsoft.azure
azure-arm-parent
- 0.0.3-beta
+ 0.0.2-beta
../../../pom.xml
azure-mgmt-sql
@@ -19,7 +19,7 @@
jar
Microsoft Azure SDK for Sql Management
This package contains Microsoft Sql Management SDK.
- https://github.com/Azure/azure-libraries-for-java
+ https://github.com/Azure/azure-sdk-for-java
The MIT License (MIT)
@@ -28,8 +28,8 @@
- scm:git:https://github.com/Azure/azure-libraries-for-java
- scm:git:git@github.com:Azure/azure-libraries-for-java.git
+ scm:git:https://github.com/Azure/azure-sdk-for-java
+ scm:git:git@github.com:Azure/azure-sdk-for-java.git
HEAD
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/BackupShortTermRetentionPolicy.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/BackupShortTermRetentionPolicy.java
index 32dcb53fb9d0..ec07161e0982 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/BackupShortTermRetentionPolicy.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/BackupShortTermRetentionPolicy.java
@@ -45,7 +45,7 @@ public interface BackupShortTermRetentionPolicy extends HasInner {
/**
* The template for a BackupShortTermRetentionPolicy update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable {
+ interface Update extends Appliable, UpdateStages.WithRetentionDays {
}
/**
* Grouping of BackupShortTermRetentionPolicy update stages.
*/
interface UpdateStages {
+ /**
+ * The stage of the backupshorttermretentionpolicy update allowing to specify RetentionDays.
+ */
+ interface WithRetentionDays {
+ /**
+ * Specifies retentionDays.
+ * @param retentionDays The backup retention period in days. This is how many days Point-in-Time Restore will be supported
+ * @return the next update stage
+ */
+ Update withRetentionDays(Integer retentionDays);
+ }
+
}
}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/Database.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/Database.java
index 67c6cc9fd40b..966ec7467b22 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/Database.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/Database.java
@@ -217,6 +217,9 @@ interface Blank extends WithServer {
interface WithServer {
/**
* Specifies resourceGroupName, serverName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @return the next definition stage
*/
WithLocation withExistingServer(String resourceGroupName, String serverName);
}
@@ -227,6 +230,8 @@ interface WithServer {
interface WithLocation {
/**
* Specifies location.
+ * @param location Resource location
+ * @return the next definition stage
*/
WithCreate withLocation(String location);
}
@@ -237,6 +242,8 @@ interface WithLocation {
interface WithCatalogCollation {
/**
* Specifies catalogCollation.
+ * @param catalogCollation Collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS'
+ * @return the next definition stage
*/
WithCreate withCatalogCollation(CatalogCollationType catalogCollation);
}
@@ -247,6 +254,8 @@ interface WithCatalogCollation {
interface WithCollation {
/**
* Specifies collation.
+ * @param collation The collation of the database
+ * @return the next definition stage
*/
WithCreate withCollation(String collation);
}
@@ -257,6 +266,16 @@ interface WithCollation {
interface WithCreateMode {
/**
* Specifies createMode.
+ * @param 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'
+ * @return the next definition stage
*/
WithCreate withCreateMode(CreateMode createMode);
}
@@ -267,6 +286,8 @@ interface WithCreateMode {
interface WithElasticPoolId {
/**
* Specifies elasticPoolId.
+ * @param elasticPoolId The resource identifier of the elastic pool containing this database
+ * @return the next definition stage
*/
WithCreate withElasticPoolId(String elasticPoolId);
}
@@ -277,6 +298,8 @@ interface WithElasticPoolId {
interface WithLicenseType {
/**
* Specifies licenseType.
+ * @param licenseType The license type to apply for this database. Possible values include: 'LicenseIncluded', 'BasePrice'
+ * @return the next definition stage
*/
WithCreate withLicenseType(DatabaseLicenseType licenseType);
}
@@ -287,6 +310,8 @@ interface WithLicenseType {
interface WithLongTermRetentionBackupResourceId {
/**
* Specifies longTermRetentionBackupResourceId.
+ * @param longTermRetentionBackupResourceId The resource identifier of the long term retention backup associated with create operation of this database
+ * @return the next definition stage
*/
WithCreate withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId);
}
@@ -297,6 +322,8 @@ interface WithLongTermRetentionBackupResourceId {
interface WithMaxSizeBytes {
/**
* Specifies maxSizeBytes.
+ * @param maxSizeBytes The max size of the database expressed in bytes
+ * @return the next definition stage
*/
WithCreate withMaxSizeBytes(Long maxSizeBytes);
}
@@ -307,6 +334,8 @@ interface WithMaxSizeBytes {
interface WithReadScale {
/**
* Specifies readScale.
+ * @param 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'
+ * @return the next definition stage
*/
WithCreate withReadScale(DatabaseReadScale readScale);
}
@@ -317,6 +346,8 @@ interface WithReadScale {
interface WithRecoverableDatabaseId {
/**
* Specifies recoverableDatabaseId.
+ * @param recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database
+ * @return the next definition stage
*/
WithCreate withRecoverableDatabaseId(String recoverableDatabaseId);
}
@@ -327,6 +358,8 @@ interface WithRecoverableDatabaseId {
interface WithRecoveryServicesRecoveryPointId {
/**
* Specifies recoveryServicesRecoveryPointId.
+ * @param recoveryServicesRecoveryPointId The resource identifier of the recovery point associated with create operation of this database
+ * @return the next definition stage
*/
WithCreate withRecoveryServicesRecoveryPointId(String recoveryServicesRecoveryPointId);
}
@@ -337,6 +370,8 @@ interface WithRecoveryServicesRecoveryPointId {
interface WithRestorableDroppedDatabaseId {
/**
* Specifies restorableDroppedDatabaseId.
+ * @param restorableDroppedDatabaseId The resource identifier of the restorable dropped database associated with create operation of this database
+ * @return the next definition stage
*/
WithCreate withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId);
}
@@ -347,6 +382,8 @@ interface WithRestorableDroppedDatabaseId {
interface WithRestorePointInTime {
/**
* Specifies restorePointInTime.
+ * @param restorePointInTime Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database
+ * @return the next definition stage
*/
WithCreate withRestorePointInTime(DateTime restorePointInTime);
}
@@ -357,6 +394,8 @@ interface WithRestorePointInTime {
interface WithSampleName {
/**
* Specifies sampleName.
+ * @param sampleName The name of the sample schema to apply when creating this database. Possible values include: 'AdventureWorksLT', 'WideWorldImportersStd', 'WideWorldImportersFull'
+ * @return the next definition stage
*/
WithCreate withSampleName(SampleName sampleName);
}
@@ -367,6 +406,8 @@ interface WithSampleName {
interface WithSku {
/**
* Specifies sku.
+ * @param sku The name and tier of the SKU
+ * @return the next definition stage
*/
WithCreate withSku(Sku sku);
}
@@ -377,6 +418,8 @@ interface WithSku {
interface WithSourceDatabaseDeletionDate {
/**
* Specifies sourceDatabaseDeletionDate.
+ * @param sourceDatabaseDeletionDate Specifies the time that the database was deleted
+ * @return the next definition stage
*/
WithCreate withSourceDatabaseDeletionDate(DateTime sourceDatabaseDeletionDate);
}
@@ -387,6 +430,8 @@ interface WithSourceDatabaseDeletionDate {
interface WithSourceDatabaseId {
/**
* Specifies sourceDatabaseId.
+ * @param sourceDatabaseId The resource identifier of the source database associated with create operation of this database
+ * @return the next definition stage
*/
WithCreate withSourceDatabaseId(String sourceDatabaseId);
}
@@ -397,6 +442,8 @@ interface WithSourceDatabaseId {
interface WithTags {
/**
* Specifies tags.
+ * @param tags Resource tags
+ * @return the next definition stage
*/
WithCreate withTags(Map tags);
}
@@ -407,6 +454,8 @@ interface WithTags {
interface WithZoneRedundant {
/**
* Specifies zoneRedundant.
+ * @param zoneRedundant Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones
+ * @return the next definition stage
*/
WithCreate withZoneRedundant(Boolean zoneRedundant);
}
@@ -435,6 +484,8 @@ interface UpdateStages {
interface WithCatalogCollation {
/**
* Specifies catalogCollation.
+ * @param catalogCollation Collation of the metadata catalog. Possible values include: 'DATABASE_DEFAULT', 'SQL_Latin1_General_CP1_CI_AS'
+ * @return the next update stage
*/
Update withCatalogCollation(CatalogCollationType catalogCollation);
}
@@ -445,6 +496,8 @@ interface WithCatalogCollation {
interface WithCollation {
/**
* Specifies collation.
+ * @param collation The collation of the database
+ * @return the next update stage
*/
Update withCollation(String collation);
}
@@ -455,6 +508,16 @@ interface WithCollation {
interface WithCreateMode {
/**
* Specifies createMode.
+ * @param 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'
+ * @return the next update stage
*/
Update withCreateMode(CreateMode createMode);
}
@@ -465,6 +528,8 @@ interface WithCreateMode {
interface WithElasticPoolId {
/**
* Specifies elasticPoolId.
+ * @param elasticPoolId The resource identifier of the elastic pool containing this database
+ * @return the next update stage
*/
Update withElasticPoolId(String elasticPoolId);
}
@@ -475,6 +540,8 @@ interface WithElasticPoolId {
interface WithLicenseType {
/**
* Specifies licenseType.
+ * @param licenseType The license type to apply for this database. Possible values include: 'LicenseIncluded', 'BasePrice'
+ * @return the next update stage
*/
Update withLicenseType(DatabaseLicenseType licenseType);
}
@@ -485,6 +552,8 @@ interface WithLicenseType {
interface WithLongTermRetentionBackupResourceId {
/**
* Specifies longTermRetentionBackupResourceId.
+ * @param longTermRetentionBackupResourceId The resource identifier of the long term retention backup associated with create operation of this database
+ * @return the next update stage
*/
Update withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId);
}
@@ -495,6 +564,8 @@ interface WithLongTermRetentionBackupResourceId {
interface WithMaxSizeBytes {
/**
* Specifies maxSizeBytes.
+ * @param maxSizeBytes The max size of the database expressed in bytes
+ * @return the next update stage
*/
Update withMaxSizeBytes(Long maxSizeBytes);
}
@@ -505,6 +576,8 @@ interface WithMaxSizeBytes {
interface WithReadScale {
/**
* Specifies readScale.
+ * @param 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'
+ * @return the next update stage
*/
Update withReadScale(DatabaseReadScale readScale);
}
@@ -515,6 +588,8 @@ interface WithReadScale {
interface WithRecoverableDatabaseId {
/**
* Specifies recoverableDatabaseId.
+ * @param recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database
+ * @return the next update stage
*/
Update withRecoverableDatabaseId(String recoverableDatabaseId);
}
@@ -525,6 +600,8 @@ interface WithRecoverableDatabaseId {
interface WithRecoveryServicesRecoveryPointId {
/**
* Specifies recoveryServicesRecoveryPointId.
+ * @param recoveryServicesRecoveryPointId The resource identifier of the recovery point associated with create operation of this database
+ * @return the next update stage
*/
Update withRecoveryServicesRecoveryPointId(String recoveryServicesRecoveryPointId);
}
@@ -535,6 +612,8 @@ interface WithRecoveryServicesRecoveryPointId {
interface WithRestorableDroppedDatabaseId {
/**
* Specifies restorableDroppedDatabaseId.
+ * @param restorableDroppedDatabaseId The resource identifier of the restorable dropped database associated with create operation of this database
+ * @return the next update stage
*/
Update withRestorableDroppedDatabaseId(String restorableDroppedDatabaseId);
}
@@ -545,6 +624,8 @@ interface WithRestorableDroppedDatabaseId {
interface WithRestorePointInTime {
/**
* Specifies restorePointInTime.
+ * @param restorePointInTime Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database
+ * @return the next update stage
*/
Update withRestorePointInTime(DateTime restorePointInTime);
}
@@ -555,6 +636,8 @@ interface WithRestorePointInTime {
interface WithSampleName {
/**
* Specifies sampleName.
+ * @param sampleName The name of the sample schema to apply when creating this database. Possible values include: 'AdventureWorksLT', 'WideWorldImportersStd', 'WideWorldImportersFull'
+ * @return the next update stage
*/
Update withSampleName(SampleName sampleName);
}
@@ -565,6 +648,8 @@ interface WithSampleName {
interface WithSku {
/**
* Specifies sku.
+ * @param sku The name and tier of the SKU
+ * @return the next update stage
*/
Update withSku(Sku sku);
}
@@ -575,6 +660,8 @@ interface WithSku {
interface WithSourceDatabaseDeletionDate {
/**
* Specifies sourceDatabaseDeletionDate.
+ * @param sourceDatabaseDeletionDate Specifies the time that the database was deleted
+ * @return the next update stage
*/
Update withSourceDatabaseDeletionDate(DateTime sourceDatabaseDeletionDate);
}
@@ -585,6 +672,8 @@ interface WithSourceDatabaseDeletionDate {
interface WithSourceDatabaseId {
/**
* Specifies sourceDatabaseId.
+ * @param sourceDatabaseId The resource identifier of the source database associated with create operation of this database
+ * @return the next update stage
*/
Update withSourceDatabaseId(String sourceDatabaseId);
}
@@ -595,6 +684,8 @@ interface WithSourceDatabaseId {
interface WithTags {
/**
* Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
*/
Update withTags(Map tags);
}
@@ -605,6 +696,8 @@ interface WithTags {
interface WithZoneRedundant {
/**
* Specifies zoneRedundant.
+ * @param zoneRedundant Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones
+ * @return the next update stage
*/
Update withZoneRedundant(Boolean zoneRedundant);
}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessment.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessment.java
index b363f4918cf4..3cded2e29f5c 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessment.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessment.java
@@ -8,93 +8,186 @@
package com.microsoft.azure.management.sql.v2017_10_01_preview;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import com.microsoft.rest.serializer.JsonFlatten;
-import com.microsoft.azure.ProxyResource;
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.DatabaseVulnerabilityAssessmentInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.SqlManager;
/**
- * A database vulnerability assessment.
+ * Type representing DatabaseVulnerabilityAssessment.
*/
-@JsonFlatten
-public class DatabaseVulnerabilityAssessment extends ProxyResource {
+public interface DatabaseVulnerabilityAssessment extends HasInner, Indexable, Refreshable, Updatable, HasManager {
/**
- * A blob storage container path to hold the scan results (e.g.
- * https://myStorage.blob.core.windows.net/VaScans/).
+ * @return the id value.
*/
- @JsonProperty(value = "properties.storageContainerPath", required = true)
- private String storageContainerPath;
+ String id();
/**
- * A shared access signature (SAS Key) that has write access to the blob
- * container specified in 'storageContainerPath' parameter.
+ * @return the name value.
*/
- @JsonProperty(value = "properties.storageContainerSasKey", required = true)
- private String storageContainerSasKey;
+ String name();
/**
- * The recurring scans settings.
+ * @return the recurringScans value.
*/
- @JsonProperty(value = "properties.recurringScans")
- private VulnerabilityAssessmentRecurringScansProperties recurringScans;
+ VulnerabilityAssessmentRecurringScansProperties recurringScans();
/**
- * Get a blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- *
- * @return the storageContainerPath value
+ * @return the storageAccountAccessKey value.
*/
- public String storageContainerPath() {
- return this.storageContainerPath;
- }
+ String storageAccountAccessKey();
/**
- * Set a blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
- *
- * @param storageContainerPath the storageContainerPath value to set
- * @return the DatabaseVulnerabilityAssessment object itself.
+ * @return the storageContainerPath value.
*/
- public DatabaseVulnerabilityAssessment withStorageContainerPath(String storageContainerPath) {
- this.storageContainerPath = storageContainerPath;
- return this;
- }
+ String storageContainerPath();
/**
- * Get a shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter.
- *
- * @return the storageContainerSasKey value
+ * @return the storageContainerSasKey value.
*/
- public String storageContainerSasKey() {
- return this.storageContainerSasKey;
- }
+ String storageContainerSasKey();
/**
- * Set a shared access signature (SAS Key) that has write access to the blob container specified in 'storageContainerPath' parameter.
- *
- * @param storageContainerSasKey the storageContainerSasKey value to set
- * @return the DatabaseVulnerabilityAssessment object itself.
+ * @return the type value.
*/
- public DatabaseVulnerabilityAssessment withStorageContainerSasKey(String storageContainerSasKey) {
- this.storageContainerSasKey = storageContainerSasKey;
- return this;
- }
+ String type();
/**
- * Get the recurring scans settings.
- *
- * @return the recurringScans value
+ * The entirety of the DatabaseVulnerabilityAssessment definition.
*/
- public VulnerabilityAssessmentRecurringScansProperties recurringScans() {
- return this.recurringScans;
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithDatabasis, DefinitionStages.WithStorageContainerPath, DefinitionStages.WithCreate {
}
/**
- * Set the recurring scans settings.
- *
- * @param recurringScans the recurringScans value to set
- * @return the DatabaseVulnerabilityAssessment object itself.
+ * Grouping of DatabaseVulnerabilityAssessment definition stages.
*/
- public DatabaseVulnerabilityAssessment withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) {
- this.recurringScans = recurringScans;
- return this;
+ interface DefinitionStages {
+ /**
+ * The first stage of a DatabaseVulnerabilityAssessment definition.
+ */
+ interface Blank extends WithDatabasis {
+ }
+
+ /**
+ * The stage of the databasevulnerabilityassessment definition allowing to specify Databasis.
+ */
+ interface WithDatabasis {
+ /**
+ * Specifies resourceGroupName, managedInstanceName, databaseName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param managedInstanceName The name of the managed instance
+ * @param databaseName The name of the database for which the vulnerability assessment is defined
+ * @return the next definition stage
+ */
+ WithStorageContainerPath withExistingDatabasis(String resourceGroupName, String managedInstanceName, String databaseName);
+ }
+
+ /**
+ * The stage of the databasevulnerabilityassessment definition allowing to specify StorageContainerPath.
+ */
+ interface WithStorageContainerPath {
+ /**
+ * Specifies storageContainerPath.
+ * @param storageContainerPath A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/)
+ * @return the next definition stage
+ */
+ WithCreate withStorageContainerPath(String storageContainerPath);
+ }
+
+ /**
+ * The stage of the databasevulnerabilityassessment definition allowing to specify RecurringScans.
+ */
+ interface WithRecurringScans {
+ /**
+ * Specifies recurringScans.
+ * @param recurringScans The recurring scans settings
+ * @return the next definition stage
+ */
+ WithCreate withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans);
+ }
+
+ /**
+ * The stage of the databasevulnerabilityassessment definition allowing to specify StorageAccountAccessKey.
+ */
+ interface WithStorageAccountAccessKey {
+ /**
+ * Specifies storageAccountAccessKey.
+ * @param storageAccountAccessKey Specifies the identifier key of the vulnerability assessment storage account. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required
+ * @return the next definition stage
+ */
+ WithCreate withStorageAccountAccessKey(String storageAccountAccessKey);
+ }
+
+ /**
+ * The stage of the databasevulnerabilityassessment definition allowing to specify StorageContainerSasKey.
+ */
+ interface WithStorageContainerSasKey {
+ /**
+ * Specifies storageContainerSasKey.
+ * @param 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
+ * @return the next definition stage
+ */
+ WithCreate withStorageContainerSasKey(String storageContainerSasKey);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithRecurringScans, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageContainerSasKey {
+ }
+ }
+ /**
+ * The template for a DatabaseVulnerabilityAssessment update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithRecurringScans, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageContainerSasKey {
}
+ /**
+ * Grouping of DatabaseVulnerabilityAssessment update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the databasevulnerabilityassessment update allowing to specify RecurringScans.
+ */
+ interface WithRecurringScans {
+ /**
+ * Specifies recurringScans.
+ * @param recurringScans The recurring scans settings
+ * @return the next update stage
+ */
+ Update withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans);
+ }
+
+ /**
+ * The stage of the databasevulnerabilityassessment update allowing to specify StorageAccountAccessKey.
+ */
+ interface WithStorageAccountAccessKey {
+ /**
+ * Specifies storageAccountAccessKey.
+ * @param storageAccountAccessKey Specifies the identifier key of the vulnerability assessment storage account. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required
+ * @return the next update stage
+ */
+ Update withStorageAccountAccessKey(String storageAccountAccessKey);
+ }
+
+ /**
+ * The stage of the databasevulnerabilityassessment update allowing to specify StorageContainerSasKey.
+ */
+ interface WithStorageContainerSasKey {
+ /**
+ * Specifies storageContainerSasKey.
+ * @param 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
+ * @return the next update stage
+ */
+ Update withStorageContainerSasKey(String storageContainerSasKey);
+ }
+
+ }
}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentRuleBaseline.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentRuleBaseline.java
new file mode 100644
index 000000000000..d658a4a3e554
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentRuleBaseline.java
@@ -0,0 +1,120 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.DatabaseVulnerabilityAssessmentRuleBaselineInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.SqlManager;
+import java.util.List;
+
+/**
+ * Type representing DatabaseVulnerabilityAssessmentRuleBaseline.
+ */
+public interface DatabaseVulnerabilityAssessmentRuleBaseline extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the baselineResults value.
+ */
+ List baselineResults();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the DatabaseVulnerabilityAssessmentRuleBaseline definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithRule, DefinitionStages.WithBaselineResults, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of DatabaseVulnerabilityAssessmentRuleBaseline definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a DatabaseVulnerabilityAssessmentRuleBaseline definition.
+ */
+ interface Blank extends WithRule {
+ }
+
+ /**
+ * The stage of the databasevulnerabilityassessmentrulebaseline definition allowing to specify Rule.
+ */
+ interface WithRule {
+ /**
+ * Specifies resourceGroupName, managedInstanceName, databaseName, ruleId.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param managedInstanceName The name of the managed instance
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined
+ * @param ruleId The vulnerability assessment rule ID
+ * @return the next definition stage
+ */
+ WithBaselineResults withExistingRule(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId);
+ }
+
+ /**
+ * The stage of the databasevulnerabilityassessmentrulebaseline definition allowing to specify BaselineResults.
+ */
+ interface WithBaselineResults {
+ /**
+ * Specifies baselineResults.
+ * @param baselineResults The rule baseline result
+ * @return the next definition stage
+ */
+ WithCreate withBaselineResults(List baselineResults);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable {
+ }
+ }
+ /**
+ * The template for a DatabaseVulnerabilityAssessmentRuleBaseline update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithBaselineResults {
+ }
+
+ /**
+ * Grouping of DatabaseVulnerabilityAssessmentRuleBaseline update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the databasevulnerabilityassessmentrulebaseline update allowing to specify BaselineResults.
+ */
+ interface WithBaselineResults {
+ /**
+ * Specifies baselineResults.
+ * @param baselineResults The rule baseline result
+ * @return the next update stage
+ */
+ Update withBaselineResults(List baselineResults);
+ }
+
+ }
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentRuleBaselineItem.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentRuleBaselineItem.java
new file mode 100644
index 000000000000..8af515f3ab25
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentRuleBaselineItem.java
@@ -0,0 +1,45 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties for an Azure SQL Database Vulnerability Assessment rule
+ * baseline's result.
+ */
+public class DatabaseVulnerabilityAssessmentRuleBaselineItem {
+ /**
+ * The rule baseline result.
+ */
+ @JsonProperty(value = "result", required = true)
+ private List result;
+
+ /**
+ * Get the rule baseline result.
+ *
+ * @return the result value
+ */
+ public List result() {
+ return this.result;
+ }
+
+ /**
+ * Set the rule baseline result.
+ *
+ * @param result the result value to set
+ * @return the DatabaseVulnerabilityAssessmentRuleBaselineItem object itself.
+ */
+ public DatabaseVulnerabilityAssessmentRuleBaselineItem withResult(List result) {
+ this.result = result;
+ return this;
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentScans.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentScans.java
index b57f178bb0dc..b06b176e94e2 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentScans.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseVulnerabilityAssessmentScans.java
@@ -9,7 +9,7 @@
package com.microsoft.azure.management.sql.v2017_10_01_preview;
import rx.Observable;
-import com.microsoft.azure.management.sql.v2017_10_01_preview.VulnerabilityAssessmentScanRecord;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.ServerVulnerabilityAssessmentScanRecord;
import rx.Completable;
/**
@@ -26,7 +26,7 @@ public interface DatabaseVulnerabilityAssessmentScans {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
- Observable getAsync(String resourceGroupName, String serverName, String databaseName, String scanId);
+ Observable getAsync(String resourceGroupName, String serverName, String databaseName, String scanId);
/**
* Lists the vulnerability assessment scans of a database.
@@ -37,7 +37,7 @@ public interface DatabaseVulnerabilityAssessmentScans {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable for the request
*/
- Observable listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName);
+ Observable listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName);
/**
* Executes a Vulnerability Assessment database scan.
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ElasticPool.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ElasticPool.java
index 9af9d5d6f326..c7b12d377c52 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ElasticPool.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ElasticPool.java
@@ -111,6 +111,9 @@ interface Blank extends WithServer {
interface WithServer {
/**
* Specifies resourceGroupName, serverName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param serverName The name of the server
+ * @return the next definition stage
*/
WithLocation withExistingServer(String resourceGroupName, String serverName);
}
@@ -121,6 +124,8 @@ interface WithServer {
interface WithLocation {
/**
* Specifies location.
+ * @param location Resource location
+ * @return the next definition stage
*/
WithCreate withLocation(String location);
}
@@ -131,6 +136,8 @@ interface WithLocation {
interface WithLicenseType {
/**
* Specifies licenseType.
+ * @param licenseType The license type to apply for this elastic pool. Possible values include: 'LicenseIncluded', 'BasePrice'
+ * @return the next definition stage
*/
WithCreate withLicenseType(ElasticPoolLicenseType licenseType);
}
@@ -141,6 +148,8 @@ interface WithLicenseType {
interface WithMaxSizeBytes {
/**
* Specifies maxSizeBytes.
+ * @param maxSizeBytes The storage limit for the database elastic pool in bytes
+ * @return the next definition stage
*/
WithCreate withMaxSizeBytes(Long maxSizeBytes);
}
@@ -151,6 +160,8 @@ interface WithMaxSizeBytes {
interface WithPerDatabaseSettings {
/**
* Specifies perDatabaseSettings.
+ * @param perDatabaseSettings The per database settings for the elastic pool
+ * @return the next definition stage
*/
WithCreate withPerDatabaseSettings(ElasticPoolPerDatabaseSettings perDatabaseSettings);
}
@@ -161,6 +172,8 @@ interface WithPerDatabaseSettings {
interface WithSku {
/**
* Specifies sku.
+ * @param sku the sku parameter value
+ * @return the next definition stage
*/
WithCreate withSku(Sku sku);
}
@@ -171,6 +184,8 @@ interface WithSku {
interface WithTags {
/**
* Specifies tags.
+ * @param tags Resource tags
+ * @return the next definition stage
*/
WithCreate withTags(Map tags);
}
@@ -181,6 +196,8 @@ interface WithTags {
interface WithZoneRedundant {
/**
* Specifies zoneRedundant.
+ * @param 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
+ * @return the next definition stage
*/
WithCreate withZoneRedundant(Boolean zoneRedundant);
}
@@ -209,6 +226,8 @@ interface UpdateStages {
interface WithLicenseType {
/**
* Specifies licenseType.
+ * @param licenseType The license type to apply for this elastic pool. Possible values include: 'LicenseIncluded', 'BasePrice'
+ * @return the next update stage
*/
Update withLicenseType(ElasticPoolLicenseType licenseType);
}
@@ -219,6 +238,8 @@ interface WithLicenseType {
interface WithMaxSizeBytes {
/**
* Specifies maxSizeBytes.
+ * @param maxSizeBytes The storage limit for the database elastic pool in bytes
+ * @return the next update stage
*/
Update withMaxSizeBytes(Long maxSizeBytes);
}
@@ -229,6 +250,8 @@ interface WithMaxSizeBytes {
interface WithPerDatabaseSettings {
/**
* Specifies perDatabaseSettings.
+ * @param perDatabaseSettings The per database settings for the elastic pool
+ * @return the next update stage
*/
Update withPerDatabaseSettings(ElasticPoolPerDatabaseSettings perDatabaseSettings);
}
@@ -239,6 +262,8 @@ interface WithPerDatabaseSettings {
interface WithSku {
/**
* Specifies sku.
+ * @param sku the sku parameter value
+ * @return the next update stage
*/
Update withSku(Sku sku);
}
@@ -249,6 +274,8 @@ interface WithSku {
interface WithTags {
/**
* Specifies tags.
+ * @param tags Resource tags
+ * @return the next update stage
*/
Update withTags(Map tags);
}
@@ -259,6 +286,8 @@ interface WithTags {
interface WithZoneRedundant {
/**
* Specifies zoneRedundant.
+ * @param 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
+ * @return the next update stage
*/
Update withZoneRedundant(Boolean zoneRedundant);
}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/InstanceFailoverGroup.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/InstanceFailoverGroup.java
index 8b022a6bf994..b99af7ba80a1 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/InstanceFailoverGroup.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/InstanceFailoverGroup.java
@@ -90,6 +90,9 @@ interface Blank extends WithLocation {
interface WithLocation {
/**
* Specifies resourceGroupName, locationName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param locationName The name of the region where the resource is located
+ * @return the next definition stage
*/
WithManagedInstancePairs withExistingLocation(String resourceGroupName, String locationName);
}
@@ -100,6 +103,8 @@ interface WithLocation {
interface WithManagedInstancePairs {
/**
* Specifies managedInstancePairs.
+ * @param managedInstancePairs List of managed instance pairs in the failover group
+ * @return the next definition stage
*/
WithPartnerRegions withManagedInstancePairs(List managedInstancePairs);
}
@@ -110,6 +115,8 @@ interface WithManagedInstancePairs {
interface WithPartnerRegions {
/**
* Specifies partnerRegions.
+ * @param partnerRegions Partner region information for the failover group
+ * @return the next definition stage
*/
WithReadWriteEndpoint withPartnerRegions(List partnerRegions);
}
@@ -120,6 +127,8 @@ interface WithPartnerRegions {
interface WithReadWriteEndpoint {
/**
* Specifies readWriteEndpoint.
+ * @param readWriteEndpoint Read-write endpoint of the failover group instance
+ * @return the next definition stage
*/
WithCreate withReadWriteEndpoint(InstanceFailoverGroupReadWriteEndpoint readWriteEndpoint);
}
@@ -130,6 +139,8 @@ interface WithReadWriteEndpoint {
interface WithReadOnlyEndpoint {
/**
* Specifies readOnlyEndpoint.
+ * @param readOnlyEndpoint Read-only endpoint of the failover group instance
+ * @return the next definition stage
*/
WithCreate withReadOnlyEndpoint(InstanceFailoverGroupReadOnlyEndpoint readOnlyEndpoint);
}
@@ -158,6 +169,8 @@ interface UpdateStages {
interface WithReadOnlyEndpoint {
/**
* Specifies readOnlyEndpoint.
+ * @param readOnlyEndpoint Read-only endpoint of the failover group instance
+ * @return the next update stage
*/
Update withReadOnlyEndpoint(InstanceFailoverGroupReadOnlyEndpoint readOnlyEndpoint);
}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.java
new file mode 100644
index 000000000000..e2ea17009a99
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedDatabaseVulnerabilityAssessmentRuleBaselines.java
@@ -0,0 +1,51 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import rx.Observable;
+import rx.Completable;
+
+/**
+ * Type representing ManagedDatabaseVulnerabilityAssessmentRuleBaselines.
+ */
+public interface ManagedDatabaseVulnerabilityAssessmentRuleBaselines {
+ /**
+ * Begins definition for a new Baseline resource.
+ * @param name resource name.
+ * @return the first stage of the new Baseline definition.
+ */
+ DatabaseVulnerabilityAssessmentRuleBaseline.DefinitionStages.Blank defineBaseline(String name);
+
+ /**
+ * Gets a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName);
+
+ /**
+ * Removes the database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName);
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedDatabaseVulnerabilityAssessmentScans.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedDatabaseVulnerabilityAssessmentScans.java
new file mode 100644
index 000000000000..84eb0df1f542
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedDatabaseVulnerabilityAssessmentScans.java
@@ -0,0 +1,67 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import rx.Observable;
+import rx.Completable;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.ManagedDatabaseVulnerabilityAssessmentScansInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ManagedDatabaseVulnerabilityAssessmentScans.
+ */
+public interface ManagedDatabaseVulnerabilityAssessmentScans extends HasInner {
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable initiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId);
+
+ /**
+ * Convert an existing scan result to a human readable format. If already exists nothing happens.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the scanned database.
+ * @param scanId The vulnerability assessment scan Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable exportAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId);
+
+ /**
+ * Gets a vulnerability assessment scan record of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId);
+
+ /**
+ * Lists the vulnerability assessment scans of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByDatabaseAsync(final String resourceGroupName, final String managedInstanceName, final String databaseName);
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedDatabaseVulnerabilityAssessments.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedDatabaseVulnerabilityAssessments.java
new file mode 100644
index 000000000000..a968416a939b
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedDatabaseVulnerabilityAssessments.java
@@ -0,0 +1,47 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import rx.Observable;
+import rx.Completable;
+
+/**
+ * Type representing ManagedDatabaseVulnerabilityAssessments.
+ */
+public interface ManagedDatabaseVulnerabilityAssessments {
+ /**
+ * Begins definition for a new VulnerabilityAssessment resource.
+ * @param name resource name.
+ * @return the first stage of the new VulnerabilityAssessment definition.
+ */
+ DatabaseVulnerabilityAssessment.DefinitionStages.Blank defineVulnerabilityAssessment(String name);
+
+ /**
+ * Gets the database's vulnerability assessment.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName);
+
+ /**
+ * Removes the database's vulnerability assessment.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment is defined.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName);
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceEncryptionProtector.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceEncryptionProtector.java
new file mode 100644
index 000000000000..6c16d10ffdc6
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceEncryptionProtector.java
@@ -0,0 +1,60 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.SqlManager;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.ManagedInstanceEncryptionProtectorInner;
+
+/**
+ * Type representing ManagedInstanceEncryptionProtector.
+ */
+public interface ManagedInstanceEncryptionProtector extends HasInner, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the kind value.
+ */
+ String kind();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the serverKeyName value.
+ */
+ String serverKeyName();
+
+ /**
+ * @return the serverKeyType value.
+ */
+ ServerKeyType serverKeyType();
+
+ /**
+ * @return the thumbprint value.
+ */
+ String thumbprint();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the uri value.
+ */
+ String uri();
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceEncryptionProtectors.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceEncryptionProtectors.java
new file mode 100644
index 000000000000..228e27215ed8
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceEncryptionProtectors.java
@@ -0,0 +1,51 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.ManagedInstanceEncryptionProtectorInner;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.ManagedInstanceEncryptionProtectorsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ManagedInstanceEncryptionProtectors.
+ */
+public interface ManagedInstanceEncryptionProtectors extends HasInner {
+ /**
+ * Gets a list of managed instance encryption protectors.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByInstanceAsync(final String resourceGroupName, final String managedInstanceName);
+
+ /**
+ * Gets a managed instance encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName);
+
+ /**
+ * Updates an existing encryption protector.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param parameters The requested encryption protector resource state.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable createOrUpdateAsync(String resourceGroupName, String managedInstanceName, ManagedInstanceEncryptionProtectorInner parameters);
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceKey.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceKey.java
new file mode 100644
index 000000000000..c45ff63df55d
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceKey.java
@@ -0,0 +1,150 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.ManagedInstanceKeyInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.SqlManager;
+import org.joda.time.DateTime;
+
+/**
+ * Type representing ManagedInstanceKey.
+ */
+public interface ManagedInstanceKey extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the creationDate value.
+ */
+ DateTime creationDate();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the kind value.
+ */
+ String kind();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the serverKeyType value.
+ */
+ ServerKeyType serverKeyType();
+
+ /**
+ * @return the thumbprint value.
+ */
+ String thumbprint();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * @return the uri value.
+ */
+ String uri();
+
+ /**
+ * The entirety of the ManagedInstanceKey definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithManagedInstance, DefinitionStages.WithServerKeyType, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of ManagedInstanceKey definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a ManagedInstanceKey definition.
+ */
+ interface Blank extends WithManagedInstance {
+ }
+
+ /**
+ * The stage of the managedinstancekey definition allowing to specify ManagedInstance.
+ */
+ interface WithManagedInstance {
+ /**
+ * Specifies resourceGroupName, managedInstanceName.
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal
+ * @param managedInstanceName The name of the managed instance
+ * @return the next definition stage
+ */
+ WithServerKeyType withExistingManagedInstance(String resourceGroupName, String managedInstanceName);
+ }
+
+ /**
+ * The stage of the managedinstancekey definition allowing to specify ServerKeyType.
+ */
+ interface WithServerKeyType {
+ /**
+ * Specifies serverKeyType.
+ * @param serverKeyType The key type like 'ServiceManaged', 'AzureKeyVault'. Possible values include: 'ServiceManaged', 'AzureKeyVault'
+ * @return the next definition stage
+ */
+ WithCreate withServerKeyType(ServerKeyType serverKeyType);
+ }
+
+ /**
+ * The stage of the managedinstancekey definition allowing to specify Uri.
+ */
+ interface WithUri {
+ /**
+ * Specifies uri.
+ * @param uri The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required
+ * @return the next definition stage
+ */
+ WithCreate withUri(String uri);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable, DefinitionStages.WithUri {
+ }
+ }
+ /**
+ * The template for a ManagedInstanceKey update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithUri {
+ }
+
+ /**
+ * Grouping of ManagedInstanceKey update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the managedinstancekey update allowing to specify Uri.
+ */
+ interface WithUri {
+ /**
+ * Specifies uri.
+ * @param uri The URI of the key. If the ServerKeyType is AzureKeyVault, then the URI is required
+ * @return the next update stage
+ */
+ Update withUri(String uri);
+ }
+
+ }
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceKeys.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceKeys.java
new file mode 100644
index 000000000000..320d0d09266e
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceKeys.java
@@ -0,0 +1,53 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.ManagedInstanceKeysInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing ManagedInstanceKeys.
+ */
+public interface ManagedInstanceKeys extends SupportsCreating, HasInner {
+ /**
+ * Gets a managed instance key.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param keyName The name of the managed instance key to be retrieved.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, String keyName);
+
+ /**
+ * Gets a list of managed instance keys.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByInstanceAsync(final String resourceGroupName, final String managedInstanceName);
+
+ /**
+ * Deletes the managed instance key with the given name.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param keyName The name of the managed instance key to be deleted.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String managedInstanceName, String keyName);
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceVulnerabilityAssessmentScanRecord.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceVulnerabilityAssessmentScanRecord.java
new file mode 100644
index 000000000000..c47199200be6
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ManagedInstanceVulnerabilityAssessmentScanRecord.java
@@ -0,0 +1,79 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.VulnerabilityAssessmentScanRecordInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.SqlManager;
+import org.joda.time.DateTime;
+import java.util.List;
+
+/**
+ * Type representing ManagedInstanceVulnerabilityAssessmentScanRecord.
+ */
+public interface ManagedInstanceVulnerabilityAssessmentScanRecord extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the endTime value.
+ */
+ DateTime endTime();
+
+ /**
+ * @return the errors value.
+ */
+ List errors();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the numberOfFailedSecurityChecks value.
+ */
+ Integer numberOfFailedSecurityChecks();
+
+ /**
+ * @return the scanId value.
+ */
+ String scanId();
+
+ /**
+ * @return the startTime value.
+ */
+ DateTime startTime();
+
+ /**
+ * @return the state value.
+ */
+ VulnerabilityAssessmentScanState state();
+
+ /**
+ * @return the storageContainerPath value.
+ */
+ String storageContainerPath();
+
+ /**
+ * @return the triggerType value.
+ */
+ VulnerabilityAssessmentScanTriggerType triggerType();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ServerKeyType.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ServerKeyType.java
new file mode 100644
index 000000000000..d13b712b173e
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ServerKeyType.java
@@ -0,0 +1,41 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ServerKeyType.
+ */
+public final class ServerKeyType extends ExpandableStringEnum {
+ /** Static value ServiceManaged for ServerKeyType. */
+ public static final ServerKeyType SERVICE_MANAGED = fromString("ServiceManaged");
+
+ /** Static value AzureKeyVault for ServerKeyType. */
+ public static final ServerKeyType AZURE_KEY_VAULT = fromString("AzureKeyVault");
+
+ /**
+ * Creates or finds a ServerKeyType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ServerKeyType
+ */
+ @JsonCreator
+ public static ServerKeyType fromString(String name) {
+ return fromString(name, ServerKeyType.class);
+ }
+
+ /**
+ * @return known ServerKeyType values
+ */
+ public static Collection values() {
+ return values(ServerKeyType.class);
+ }
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ServerVulnerabilityAssessmentScanRecord.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ServerVulnerabilityAssessmentScanRecord.java
new file mode 100644
index 000000000000..40d70282c88d
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/ServerVulnerabilityAssessmentScanRecord.java
@@ -0,0 +1,79 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.VulnerabilityAssessmentScanRecordInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.implementation.SqlManager;
+import org.joda.time.DateTime;
+import java.util.List;
+
+/**
+ * Type representing ServerVulnerabilityAssessmentScanRecord.
+ */
+public interface ServerVulnerabilityAssessmentScanRecord extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the endTime value.
+ */
+ DateTime endTime();
+
+ /**
+ * @return the errors value.
+ */
+ List errors();
+
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the numberOfFailedSecurityChecks value.
+ */
+ Integer numberOfFailedSecurityChecks();
+
+ /**
+ * @return the scanId value.
+ */
+ String scanId();
+
+ /**
+ * @return the startTime value.
+ */
+ DateTime startTime();
+
+ /**
+ * @return the state value.
+ */
+ VulnerabilityAssessmentScanState state();
+
+ /**
+ * @return the storageContainerPath value.
+ */
+ String storageContainerPath();
+
+ /**
+ * @return the triggerType value.
+ */
+ VulnerabilityAssessmentScanTriggerType triggerType();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/VulnerabilityAssessmentPolicyBaselineName.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/VulnerabilityAssessmentPolicyBaselineName.java
new file mode 100644
index 000000000000..8eb67b02d36a
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/VulnerabilityAssessmentPolicyBaselineName.java
@@ -0,0 +1,53 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for VulnerabilityAssessmentPolicyBaselineName.
+ */
+public enum VulnerabilityAssessmentPolicyBaselineName {
+ /** Enum value master. */
+ MASTER("master"),
+
+ /** Enum value default. */
+ DEFAULT("default");
+
+ /** The actual serialized value for a VulnerabilityAssessmentPolicyBaselineName instance. */
+ private String value;
+
+ VulnerabilityAssessmentPolicyBaselineName(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a VulnerabilityAssessmentPolicyBaselineName instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed VulnerabilityAssessmentPolicyBaselineName object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static VulnerabilityAssessmentPolicyBaselineName fromString(String value) {
+ VulnerabilityAssessmentPolicyBaselineName[] items = VulnerabilityAssessmentPolicyBaselineName.values();
+ for (VulnerabilityAssessmentPolicyBaselineName item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/BackupShortTermRetentionPolicyImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/BackupShortTermRetentionPolicyImpl.java
index 386dd7a3b554..558f03784ffa 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/BackupShortTermRetentionPolicyImpl.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/BackupShortTermRetentionPolicyImpl.java
@@ -17,6 +17,8 @@ class BackupShortTermRetentionPolicyImpl extends CreatableUpdatableImpl createResourceAsync() {
BackupShortTermRetentionPoliciesInner client = this.manager().inner().backupShortTermRetentionPolicies();
- return client.createOrUpdateAsync(this.resourceGroupName, this.serverName, this.databaseName)
+ return client.createOrUpdateAsync(this.resourceGroupName, this.serverName, this.databaseName, this.cretentionDays)
.map(innerToFluentMap(this));
}
@Override
public Observable updateResourceAsync() {
BackupShortTermRetentionPoliciesInner client = this.manager().inner().backupShortTermRetentionPolicies();
- return client.updateAsync(this.resourceGroupName, this.serverName, this.databaseName)
+ return client.updateAsync(this.resourceGroupName, this.serverName, this.databaseName, this.uretentionDays)
.map(innerToFluentMap(this));
}
@@ -97,4 +99,14 @@ public BackupShortTermRetentionPolicyImpl withExistingDatabasis(String resourceG
return this;
}
+ @Override
+ public BackupShortTermRetentionPolicyImpl withRetentionDays(Integer retentionDays) {
+ if (isInCreateMode()) {
+ this.cretentionDays = retentionDays;
+ } else {
+ this.uretentionDays = retentionDays;
+ }
+ return this;
+ }
+
}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseImpl.java
index 90eac77d4eb1..57538e6de24c 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseImpl.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseImpl.java
@@ -45,7 +45,7 @@ class DatabaseImpl extends CreatableUpdatableImpl implements DatabaseVulnerabilityAssessment, DatabaseVulnerabilityAssessment.Definition, DatabaseVulnerabilityAssessment.Update {
+ private final SqlManager manager;
+ private String resourceGroupName;
+ private String managedInstanceName;
+ private String databaseName;
+
+ DatabaseVulnerabilityAssessmentImpl(String name, SqlManager manager) {
+ super(name, new DatabaseVulnerabilityAssessmentInner());
+ this.manager = manager;
+ // Set resource name
+ this.databaseName = name;
+ //
+ }
+
+ DatabaseVulnerabilityAssessmentImpl(DatabaseVulnerabilityAssessmentInner inner, SqlManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.databaseName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.managedInstanceName = IdParsingUtils.getValueFromIdByName(inner.id(), "managedInstances");
+ this.databaseName = IdParsingUtils.getValueFromIdByName(inner.id(), "databases");
+ //
+ }
+
+ @Override
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ ManagedDatabaseVulnerabilityAssessmentsInner client = this.manager().inner().managedDatabaseVulnerabilityAssessments();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.managedInstanceName, this.databaseName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ ManagedDatabaseVulnerabilityAssessmentsInner client = this.manager().inner().managedDatabaseVulnerabilityAssessments();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.managedInstanceName, this.databaseName, this.inner())
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ ManagedDatabaseVulnerabilityAssessmentsInner client = this.manager().inner().managedDatabaseVulnerabilityAssessments();
+ return client.getAsync(this.resourceGroupName, this.managedInstanceName, this.databaseName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public VulnerabilityAssessmentRecurringScansProperties recurringScans() {
+ return this.inner().recurringScans();
+ }
+
+ @Override
+ public String storageAccountAccessKey() {
+ return this.inner().storageAccountAccessKey();
+ }
+
+ @Override
+ public String storageContainerPath() {
+ return this.inner().storageContainerPath();
+ }
+
+ @Override
+ public String storageContainerSasKey() {
+ return this.inner().storageContainerSasKey();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public DatabaseVulnerabilityAssessmentImpl withExistingDatabasis(String resourceGroupName, String managedInstanceName, String databaseName) {
+ this.resourceGroupName = resourceGroupName;
+ this.managedInstanceName = managedInstanceName;
+ this.databaseName = databaseName;
+ return this;
+ }
+
+ @Override
+ public DatabaseVulnerabilityAssessmentImpl withStorageContainerPath(String storageContainerPath) {
+ this.inner().withStorageContainerPath(storageContainerPath);
+ return this;
+ }
+
+ @Override
+ public DatabaseVulnerabilityAssessmentImpl withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) {
+ this.inner().withRecurringScans(recurringScans);
+ return this;
+ }
+
+ @Override
+ public DatabaseVulnerabilityAssessmentImpl withStorageAccountAccessKey(String storageAccountAccessKey) {
+ this.inner().withStorageAccountAccessKey(storageAccountAccessKey);
+ return this;
+ }
+
+ @Override
+ public DatabaseVulnerabilityAssessmentImpl withStorageContainerSasKey(String storageContainerSasKey) {
+ this.inner().withStorageContainerSasKey(storageContainerSasKey);
+ return this;
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentInner.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentInner.java
new file mode 100644
index 000000000000..ca0d10de1ccc
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentInner.java
@@ -0,0 +1,131 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview.implementation;
+
+import com.microsoft.azure.management.sql.v2017_10_01_preview.VulnerabilityAssessmentRecurringScansProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * A database vulnerability assessment.
+ */
+@JsonFlatten
+public class DatabaseVulnerabilityAssessmentInner extends ProxyResource {
+ /**
+ * A blob storage container path to hold the scan results (e.g.
+ * https://myStorage.blob.core.windows.net/VaScans/).
+ */
+ @JsonProperty(value = "properties.storageContainerPath", required = true)
+ private String storageContainerPath;
+
+ /**
+ * 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.
+ */
+ @JsonProperty(value = "properties.storageContainerSasKey")
+ private String storageContainerSasKey;
+
+ /**
+ * Specifies the identifier key of the vulnerability assessment storage
+ * account. If 'StorageContainerSasKey' isn't specified,
+ * storageAccountAccessKey is required.
+ */
+ @JsonProperty(value = "properties.storageAccountAccessKey")
+ private String storageAccountAccessKey;
+
+ /**
+ * The recurring scans settings.
+ */
+ @JsonProperty(value = "properties.recurringScans")
+ private VulnerabilityAssessmentRecurringScansProperties recurringScans;
+
+ /**
+ * Get a blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
+ *
+ * @return the storageContainerPath value
+ */
+ public String storageContainerPath() {
+ return this.storageContainerPath;
+ }
+
+ /**
+ * Set a blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/).
+ *
+ * @param storageContainerPath the storageContainerPath value to set
+ * @return the DatabaseVulnerabilityAssessmentInner object itself.
+ */
+ public DatabaseVulnerabilityAssessmentInner withStorageContainerPath(String storageContainerPath) {
+ this.storageContainerPath = storageContainerPath;
+ return this;
+ }
+
+ /**
+ * Get 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.
+ *
+ * @return the storageContainerSasKey value
+ */
+ public String storageContainerSasKey() {
+ return this.storageContainerSasKey;
+ }
+
+ /**
+ * Set 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 storageContainerSasKey the storageContainerSasKey value to set
+ * @return the DatabaseVulnerabilityAssessmentInner object itself.
+ */
+ public DatabaseVulnerabilityAssessmentInner withStorageContainerSasKey(String storageContainerSasKey) {
+ this.storageContainerSasKey = storageContainerSasKey;
+ return this;
+ }
+
+ /**
+ * Get specifies the identifier key of the vulnerability assessment storage account. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.
+ *
+ * @return the storageAccountAccessKey value
+ */
+ public String storageAccountAccessKey() {
+ return this.storageAccountAccessKey;
+ }
+
+ /**
+ * Set specifies the identifier key of the vulnerability assessment storage account. If 'StorageContainerSasKey' isn't specified, storageAccountAccessKey is required.
+ *
+ * @param storageAccountAccessKey the storageAccountAccessKey value to set
+ * @return the DatabaseVulnerabilityAssessmentInner object itself.
+ */
+ public DatabaseVulnerabilityAssessmentInner withStorageAccountAccessKey(String storageAccountAccessKey) {
+ this.storageAccountAccessKey = storageAccountAccessKey;
+ return this;
+ }
+
+ /**
+ * Get the recurring scans settings.
+ *
+ * @return the recurringScans value
+ */
+ public VulnerabilityAssessmentRecurringScansProperties recurringScans() {
+ return this.recurringScans;
+ }
+
+ /**
+ * Set the recurring scans settings.
+ *
+ * @param recurringScans the recurringScans value to set
+ * @return the DatabaseVulnerabilityAssessmentInner object itself.
+ */
+ public DatabaseVulnerabilityAssessmentInner withRecurringScans(VulnerabilityAssessmentRecurringScansProperties recurringScans) {
+ this.recurringScans = recurringScans;
+ return this;
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselineImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselineImpl.java
new file mode 100644
index 000000000000..7c4b03e3bda7
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselineImpl.java
@@ -0,0 +1,120 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview.implementation;
+
+import com.microsoft.azure.management.sql.v2017_10_01_preview.DatabaseVulnerabilityAssessmentRuleBaseline;
+import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
+import rx.Observable;
+import java.util.List;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.DatabaseVulnerabilityAssessmentRuleBaselineItem;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.VulnerabilityAssessmentPolicyBaselineName;
+
+class DatabaseVulnerabilityAssessmentRuleBaselineImpl extends CreatableUpdatableImpl implements DatabaseVulnerabilityAssessmentRuleBaseline, DatabaseVulnerabilityAssessmentRuleBaseline.Definition, DatabaseVulnerabilityAssessmentRuleBaseline.Update {
+ private final SqlManager manager;
+ private String resourceGroupName;
+ private String managedInstanceName;
+ private String databaseName;
+ private String ruleId;
+ private VulnerabilityAssessmentPolicyBaselineName baselineName;
+ private List cbaselineResults;
+ private List ubaselineResults;
+
+ DatabaseVulnerabilityAssessmentRuleBaselineImpl(String name, SqlManager manager) {
+ super(name, new DatabaseVulnerabilityAssessmentRuleBaselineInner());
+ this.manager = manager;
+ // Set resource name
+ this.baselineName = name;
+ //
+ }
+
+ DatabaseVulnerabilityAssessmentRuleBaselineImpl(DatabaseVulnerabilityAssessmentRuleBaselineInner inner, SqlManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.baselineName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.managedInstanceName = IdParsingUtils.getValueFromIdByName(inner.id(), "managedInstances");
+ this.databaseName = IdParsingUtils.getValueFromIdByName(inner.id(), "databases");
+ this.ruleId = IdParsingUtils.getValueFromIdByName(inner.id(), "rules");
+ this.baselineName = VulnerabilityAssessmentPolicyBaselineName.valueOf(IdParsingUtils.getValueFromIdByName(inner.id(), "baselines"));
+ //
+ }
+
+ @Override
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner client = this.manager().inner().managedDatabaseVulnerabilityAssessmentRuleBaselines();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.managedInstanceName, this.databaseName, this.ruleId, this.baselineName, this.cbaselineResults)
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner client = this.manager().inner().managedDatabaseVulnerabilityAssessmentRuleBaselines();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.managedInstanceName, this.databaseName, this.ruleId, this.baselineName, this.ubaselineResults)
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner client = this.manager().inner().managedDatabaseVulnerabilityAssessmentRuleBaselines();
+ return client.getAsync(this.resourceGroupName, this.managedInstanceName, this.databaseName, this.ruleId, this.baselineName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+
+ @Override
+ public List baselineResults() {
+ return this.inner().baselineResults();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public DatabaseVulnerabilityAssessmentRuleBaselineImpl withExistingRule(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId) {
+ this.resourceGroupName = resourceGroupName;
+ this.managedInstanceName = managedInstanceName;
+ this.databaseName = databaseName;
+ this.ruleId = ruleId;
+ return this;
+ }
+
+ @Override
+ public DatabaseVulnerabilityAssessmentRuleBaselineImpl withBaselineResults(List baselineResults) {
+ if (isInCreateMode()) {
+ this.cbaselineResults = baselineResults;
+ } else {
+ this.ubaselineResults = baselineResults;
+ }
+ return this;
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselineInner.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselineInner.java
new file mode 100644
index 000000000000..4edbff7ffbaf
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselineInner.java
@@ -0,0 +1,48 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview.implementation;
+
+import java.util.List;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.DatabaseVulnerabilityAssessmentRuleBaselineItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * A database vulnerability assessment rule baseline.
+ */
+@JsonFlatten
+public class DatabaseVulnerabilityAssessmentRuleBaselineInner extends ProxyResource {
+ /**
+ * The rule baseline result.
+ */
+ @JsonProperty(value = "properties.baselineResults", required = true)
+ private List baselineResults;
+
+ /**
+ * Get the rule baseline result.
+ *
+ * @return the baselineResults value
+ */
+ public List baselineResults() {
+ return this.baselineResults;
+ }
+
+ /**
+ * Set the rule baseline result.
+ *
+ * @param baselineResults the baselineResults value to set
+ * @return the DatabaseVulnerabilityAssessmentRuleBaselineInner object itself.
+ */
+ public DatabaseVulnerabilityAssessmentRuleBaselineInner withBaselineResults(List baselineResults) {
+ this.baselineResults = baselineResults;
+ return this;
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentScansImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentScansImpl.java
index 600bda466a78..085c9d4b3212 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentScansImpl.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseVulnerabilityAssessmentScansImpl.java
@@ -13,7 +13,7 @@
import com.microsoft.azure.management.sql.v2017_10_01_preview.DatabaseVulnerabilityAssessmentScans;
import rx.Observable;
import rx.functions.Func1;
-import com.microsoft.azure.management.sql.v2017_10_01_preview.VulnerabilityAssessmentScanRecord;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.ServerVulnerabilityAssessmentScanRecord;
import com.microsoft.azure.Page;
import rx.Completable;
import com.microsoft.azure.management.sql.v2017_10_01_preview.DatabaseVulnerabilityAssessmentScansExport;
@@ -30,8 +30,8 @@ public SqlManager manager() {
return this.manager;
}
- private VulnerabilityAssessmentScanRecordImpl wrapVulnerabilityAssessmentScanRecordModel(VulnerabilityAssessmentScanRecordInner inner) {
- return new VulnerabilityAssessmentScanRecordImpl(inner, manager());
+ private ServerVulnerabilityAssessmentScanRecordImpl wrapServerVulnerabilityAssessmentScanRecordModel(VulnerabilityAssessmentScanRecordInner inner) {
+ return new ServerVulnerabilityAssessmentScanRecordImpl(inner, manager());
}
private Observable getVulnerabilityAssessmentScanRecordInnerUsingDatabaseVulnerabilityAssessmentScansInnerAsync(String id) {
@@ -44,19 +44,19 @@ private Observable getVulnerabilityAsses
}
@Override
- public Observable getAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
+ public Observable getAsync(String resourceGroupName, String serverName, String databaseName, String scanId) {
DatabaseVulnerabilityAssessmentScansInner client = this.inner();
return client.getAsync(resourceGroupName, serverName, databaseName, scanId)
- .map(new Func1() {
+ .map(new Func1() {
@Override
- public VulnerabilityAssessmentScanRecord call(VulnerabilityAssessmentScanRecordInner inner) {
- return wrapVulnerabilityAssessmentScanRecordModel(inner);
+ public ServerVulnerabilityAssessmentScanRecord call(VulnerabilityAssessmentScanRecordInner inner) {
+ return wrapServerVulnerabilityAssessmentScanRecordModel(inner);
}
});
}
@Override
- public Observable listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName) {
+ public Observable listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName) {
DatabaseVulnerabilityAssessmentScansInner client = this.inner();
return client.listByDatabaseAsync(resourceGroupName, serverName, databaseName)
.flatMapIterable(new Func1, Iterable>() {
@@ -65,10 +65,10 @@ public Iterable call(Page() {
+ .map(new Func1() {
@Override
- public VulnerabilityAssessmentScanRecord call(VulnerabilityAssessmentScanRecordInner inner) {
- return wrapVulnerabilityAssessmentScanRecordModel(inner);
+ public ServerVulnerabilityAssessmentScanRecord call(VulnerabilityAssessmentScanRecordInner inner) {
+ return wrapServerVulnerabilityAssessmentScanRecordModel(inner);
}
});
}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ElasticPoolImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ElasticPoolImpl.java
index 88df7092bc8c..2ed08c5141e8 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ElasticPoolImpl.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ElasticPoolImpl.java
@@ -41,7 +41,7 @@ class ElasticPoolImpl extends CreatableUpdatableImpl implements ManagedDatabaseVulnerabilityAssessmentRuleBaselines {
+ private final SqlManager manager;
+
+ ManagedDatabaseVulnerabilityAssessmentRuleBaselinesImpl(SqlManager manager) {
+ super(manager.inner().managedDatabaseVulnerabilityAssessmentRuleBaselines());
+ this.manager = manager;
+ }
+
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public DatabaseVulnerabilityAssessmentRuleBaselineImpl defineBaseline(String name) {
+ return wrapBaselineModel(name);
+ }
+
+ private DatabaseVulnerabilityAssessmentRuleBaselineImpl wrapBaselineModel(String name) {
+ return new DatabaseVulnerabilityAssessmentRuleBaselineImpl(name, this.manager());
+ }
+
+ private DatabaseVulnerabilityAssessmentRuleBaselineImpl wrapDatabaseVulnerabilityAssessmentRuleBaselineModel(DatabaseVulnerabilityAssessmentRuleBaselineInner inner) {
+ return new DatabaseVulnerabilityAssessmentRuleBaselineImpl(inner, manager());
+ }
+
+ private Observable getDatabaseVulnerabilityAssessmentRuleBaselineInnerUsingManagedDatabaseVulnerabilityAssessmentRuleBaselinesInnerAsync(String id) {
+ String resourceGroupName = IdParsingUtils.getValueFromIdByName(id, "resourceGroups");
+ String managedInstanceName = IdParsingUtils.getValueFromIdByName(id, "managedInstances");
+ String databaseName = IdParsingUtils.getValueFromIdByName(id, "databases");
+ String ruleId = IdParsingUtils.getValueFromIdByName(id, "rules");
+ String baselineName = VulnerabilityAssessmentPolicyBaselineName.valueOf(IdParsingUtils.getValueFromIdByName(id, "baselines"));
+ ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner client = this.inner();
+ return client.getAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName);
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) {
+ ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner client = this.inner();
+ return client.getAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName)
+ .map(new Func1() {
+ @Override
+ public DatabaseVulnerabilityAssessmentRuleBaseline call(DatabaseVulnerabilityAssessmentRuleBaselineInner inner) {
+ return wrapDatabaseVulnerabilityAssessmentRuleBaselineModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) {
+ ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName).toCompletable();
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner.java
new file mode 100644
index 000000000000..96c9069ddde8
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner.java
@@ -0,0 +1,408 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.DatabaseVulnerabilityAssessmentRuleBaselineItem;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.VulnerabilityAssessmentPolicyBaselineName;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in ManagedDatabaseVulnerabilityAssessmentRuleBaselines.
+ */
+public class ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner {
+ /** The Retrofit service to perform REST calls. */
+ private ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService service;
+ /** The service client containing this operation class. */
+ private SqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner(Retrofit retrofit, SqlManagementClientImpl client) {
+ this.service = retrofit.create(ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ManagedDatabaseVulnerabilityAssessmentRuleBaselines to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ManagedDatabaseVulnerabilityAssessmentRuleBaselinesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentRuleBaselines get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("ruleId") String ruleId, @Path("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentRuleBaselines createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("ruleId") String ruleId, @Path("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body DatabaseVulnerabilityAssessmentRuleBaselineInner parameters, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentRuleBaselines delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/rules/{ruleId}/baselines/{baselineName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("ruleId") String ruleId, @Path("baselineName") VulnerabilityAssessmentPolicyBaselineName baselineName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DatabaseVulnerabilityAssessmentRuleBaselineInner object if successful.
+ */
+ public DatabaseVulnerabilityAssessmentRuleBaselineInner get(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) {
+ return getWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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 serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName), serviceCallback);
+ }
+
+ /**
+ * Gets a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseVulnerabilityAssessmentRuleBaselineInner object
+ */
+ public Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) {
+ return getWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName).map(new Func1, DatabaseVulnerabilityAssessmentRuleBaselineInner>() {
+ @Override
+ public DatabaseVulnerabilityAssessmentRuleBaselineInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseVulnerabilityAssessmentRuleBaselineInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (managedInstanceName == null) {
+ throw new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (ruleId == null) {
+ throw new IllegalArgumentException("Parameter ruleId is required and cannot be null.");
+ }
+ if (baselineName == null) {
+ throw new IllegalArgumentException("Parameter baselineName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String vulnerabilityAssessmentName = "default";
+ return service.get(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Creates or updates a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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 baselineResults The rule baseline result
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DatabaseVulnerabilityAssessmentRuleBaselineInner object if successful.
+ */
+ public DatabaseVulnerabilityAssessmentRuleBaselineInner createOrUpdate(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, List baselineResults) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName, baselineResults).toBlocking().single().body();
+ }
+
+ /**
+ * Creates or updates a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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 baselineResults The rule baseline result
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, List baselineResults, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName, baselineResults), serviceCallback);
+ }
+
+ /**
+ * Creates or updates a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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 baselineResults The rule baseline result
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseVulnerabilityAssessmentRuleBaselineInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, List baselineResults) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName, baselineResults).map(new Func1, DatabaseVulnerabilityAssessmentRuleBaselineInner>() {
+ @Override
+ public DatabaseVulnerabilityAssessmentRuleBaselineInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Creates or updates a database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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 baselineResults The rule baseline result
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseVulnerabilityAssessmentRuleBaselineInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, List baselineResults) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (managedInstanceName == null) {
+ throw new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (ruleId == null) {
+ throw new IllegalArgumentException("Parameter ruleId is required and cannot be null.");
+ }
+ if (baselineName == null) {
+ throw new IllegalArgumentException("Parameter baselineName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ if (baselineResults == null) {
+ throw new IllegalArgumentException("Parameter baselineResults is required and cannot be null.");
+ }
+ Validator.validate(baselineResults);
+ final String vulnerabilityAssessmentName = "default";
+ DatabaseVulnerabilityAssessmentRuleBaselineInner parameters = new DatabaseVulnerabilityAssessmentRuleBaselineInner();
+ parameters.withBaselineResults(baselineResults);
+ return service.createOrUpdate(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), parameters, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Removes the database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) {
+ deleteWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName).toBlocking().single().body();
+ }
+
+ /**
+ * Removes the database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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 serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName), serviceCallback);
+ }
+
+ /**
+ * Removes the database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Removes the database's vulnerability assessment rule baseline.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database for which the vulnerability assessment rule baseline is defined.
+ * @param ruleId The vulnerability assessment rule ID.
+ * @param 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'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String ruleId, VulnerabilityAssessmentPolicyBaselineName baselineName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (managedInstanceName == null) {
+ throw new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (ruleId == null) {
+ throw new IllegalArgumentException("Parameter ruleId is required and cannot be null.");
+ }
+ if (baselineName == null) {
+ throw new IllegalArgumentException("Parameter baselineName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String vulnerabilityAssessmentName = "default";
+ return service.delete(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, ruleId, baselineName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentScansImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentScansImpl.java
new file mode 100644
index 000000000000..161455d1fb42
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentScansImpl.java
@@ -0,0 +1,85 @@
+/**
+ * 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.
+ *
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentScans;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import rx.Completable;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.DatabaseVulnerabilityAssessmentScansExport;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedInstanceVulnerabilityAssessmentScanRecord;
+
+class ManagedDatabaseVulnerabilityAssessmentScansImpl extends WrapperImpl implements ManagedDatabaseVulnerabilityAssessmentScans {
+ private final SqlManager manager;
+
+ ManagedDatabaseVulnerabilityAssessmentScansImpl(SqlManager manager) {
+ super(manager.inner().managedDatabaseVulnerabilityAssessmentScans());
+ this.manager = manager;
+ }
+
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ private ManagedInstanceVulnerabilityAssessmentScanRecordImpl wrapModel(VulnerabilityAssessmentScanRecordInner inner) {
+ return new ManagedInstanceVulnerabilityAssessmentScanRecordImpl(inner, manager());
+ }
+
+ @Override
+ public Completable initiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ ManagedDatabaseVulnerabilityAssessmentScansInner client = this.inner();
+ return client.initiateScanAsync(resourceGroupName, managedInstanceName, databaseName, scanId).toCompletable();
+ }
+
+ @Override
+ public Observable exportAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ ManagedDatabaseVulnerabilityAssessmentScansInner client = this.inner();
+ return client.exportAsync(resourceGroupName, managedInstanceName, databaseName, scanId)
+ .map(new Func1() {
+ @Override
+ public DatabaseVulnerabilityAssessmentScansExport call(DatabaseVulnerabilityAssessmentScansExportInner inner) {
+ return new DatabaseVulnerabilityAssessmentScansExportImpl(inner, manager());
+ }
+ });
+ }
+
+ @Override
+ public Observable listByDatabaseAsync(final String resourceGroupName, final String managedInstanceName, final String databaseName) {
+ ManagedDatabaseVulnerabilityAssessmentScansInner client = this.inner();
+ return client.listByDatabaseAsync(resourceGroupName, managedInstanceName, databaseName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public ManagedInstanceVulnerabilityAssessmentScanRecord call(VulnerabilityAssessmentScanRecordInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ ManagedDatabaseVulnerabilityAssessmentScansInner client = this.inner();
+ return client.getAsync(resourceGroupName, managedInstanceName, databaseName, scanId)
+ .map(new Func1() {
+ @Override
+ public ManagedInstanceVulnerabilityAssessmentScanRecord call(VulnerabilityAssessmentScanRecordInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentScansInner.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentScansInner.java
new file mode 100644
index 000000000000..37e2c24ebd00
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentScansInner.java
@@ -0,0 +1,717 @@
+/**
+ * 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.
+ */
+
+package com.microsoft.azure.management.sql.v2017_10_01_preview.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.AzureServiceFuture;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.ListOperationCallback;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.PagedList;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+import retrofit2.http.POST;
+import retrofit2.http.Query;
+import retrofit2.http.Url;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in ManagedDatabaseVulnerabilityAssessmentScans.
+ */
+public class ManagedDatabaseVulnerabilityAssessmentScansInner {
+ /** The Retrofit service to perform REST calls. */
+ private ManagedDatabaseVulnerabilityAssessmentScansService service;
+ /** The service client containing this operation class. */
+ private SqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of ManagedDatabaseVulnerabilityAssessmentScansInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public ManagedDatabaseVulnerabilityAssessmentScansInner(Retrofit retrofit, SqlManagementClientImpl client) {
+ this.service = retrofit.create(ManagedDatabaseVulnerabilityAssessmentScansService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ManagedDatabaseVulnerabilityAssessmentScans to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface ManagedDatabaseVulnerabilityAssessmentScansService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentScans listByDatabase" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans")
+ Observable> listByDatabase(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentScans get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentScans initiateScan" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan")
+ Observable> initiateScan(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentScans beginInitiateScan" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/initiateScan")
+ Observable> beginInitiateScan(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentScans export" })
+ @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}/vulnerabilityAssessments/{vulnerabilityAssessmentName}/scans/{scanId}/export")
+ Observable> export(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @Path("databaseName") String databaseName, @Path("vulnerabilityAssessmentName") String vulnerabilityAssessmentName, @Path("scanId") String scanId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentScans listByDatabaseNext" })
+ @GET
+ Observable> listByDatabaseNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Lists the vulnerability assessment scans of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PagedList<VulnerabilityAssessmentScanRecordInner> object if successful.
+ */
+ public PagedList listByDatabase(final String resourceGroupName, final String managedInstanceName, final String databaseName) {
+ ServiceResponse> response = listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists the vulnerability assessment scans of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture> listByDatabaseAsync(final String resourceGroupName, final String managedInstanceName, final String databaseName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists the vulnerability assessment scans of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<VulnerabilityAssessmentScanRecordInner> object
+ */
+ public Observable> listByDatabaseAsync(final String resourceGroupName, final String managedInstanceName, final String databaseName) {
+ return listByDatabaseWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists the vulnerability assessment scans of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<VulnerabilityAssessmentScanRecordInner> object
+ */
+ public Observable>> listByDatabaseWithServiceResponseAsync(final String resourceGroupName, final String managedInstanceName, final String databaseName) {
+ return listByDatabaseSinglePageAsync(resourceGroupName, managedInstanceName, databaseName)
+ .concatMap(new Func1>, Observable>>>() {
+ @Override
+ public Observable>> call(ServiceResponse> page) {
+ String nextPageLink = page.body().nextPageLink();
+ if (nextPageLink == null) {
+ return Observable.just(page);
+ }
+ return Observable.just(page).concatWith(listByDatabaseNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists the vulnerability assessment scans of a database.
+ *
+ ServiceResponse> * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ ServiceResponse> * @param managedInstanceName The name of the managed instance.
+ ServiceResponse> * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<VulnerabilityAssessmentScanRecordInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByDatabaseSinglePageAsync(final String resourceGroupName, final String managedInstanceName, final String databaseName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (managedInstanceName == null) {
+ throw new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String vulnerabilityAssessmentName = "default";
+ return service.listByDatabase(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByDatabaseDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByDatabaseDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken>() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Gets a vulnerability assessment scan record of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the VulnerabilityAssessmentScanRecordInner object if successful.
+ */
+ public VulnerabilityAssessmentScanRecordInner get(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ return getWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId).toBlocking().single().body();
+ }
+
+ /**
+ * Gets a vulnerability assessment scan record of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId), serviceCallback);
+ }
+
+ /**
+ * Gets a vulnerability assessment scan record of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the VulnerabilityAssessmentScanRecordInner object
+ */
+ public Observable getAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ return getWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId).map(new Func1, VulnerabilityAssessmentScanRecordInner>() {
+ @Override
+ public VulnerabilityAssessmentScanRecordInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a vulnerability assessment scan record of a database.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the VulnerabilityAssessmentScanRecordInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (managedInstanceName == null) {
+ throw new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (scanId == null) {
+ throw new IllegalArgumentException("Parameter scanId is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String vulnerabilityAssessmentName = "default";
+ return service.get(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void initiateScan(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ initiateScanWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId).toBlocking().last().body();
+ }
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture initiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(initiateScanWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId), serviceCallback);
+ }
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable initiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ return initiateScanWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ public Observable> initiateScanWithServiceResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (managedInstanceName == null) {
+ throw new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (scanId == null) {
+ throw new IllegalArgumentException("Parameter scanId is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String vulnerabilityAssessmentName = "default";
+ Observable> observable = service.initiateScan(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent());
+ return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType());
+ }
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void beginInitiateScan(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ beginInitiateScanWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId).toBlocking().single().body();
+ }
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture beginInitiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(beginInitiateScanWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId), serviceCallback);
+ }
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable beginInitiateScanAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ return beginInitiateScanWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Executes a Vulnerability Assessment database scan.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the database.
+ * @param scanId The vulnerability assessment scan Id of the scan to retrieve.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> beginInitiateScanWithServiceResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (managedInstanceName == null) {
+ throw new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (scanId == null) {
+ throw new IllegalArgumentException("Parameter scanId is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String vulnerabilityAssessmentName = "default";
+ return service.beginInitiateScan(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = beginInitiateScanDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse beginInitiateScanDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(202, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Convert an existing scan result to a human readable format. If already exists nothing happens.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the scanned database.
+ * @param scanId The vulnerability assessment scan Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the DatabaseVulnerabilityAssessmentScansExportInner object if successful.
+ */
+ public DatabaseVulnerabilityAssessmentScansExportInner export(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ return exportWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId).toBlocking().single().body();
+ }
+
+ /**
+ * Convert an existing scan result to a human readable format. If already exists nothing happens.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the scanned database.
+ * @param scanId The vulnerability assessment scan Id.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture exportAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(exportWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId), serviceCallback);
+ }
+
+ /**
+ * Convert an existing scan result to a human readable format. If already exists nothing happens.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the scanned database.
+ * @param scanId The vulnerability assessment scan Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseVulnerabilityAssessmentScansExportInner object
+ */
+ public Observable exportAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ return exportWithServiceResponseAsync(resourceGroupName, managedInstanceName, databaseName, scanId).map(new Func1, DatabaseVulnerabilityAssessmentScansExportInner>() {
+ @Override
+ public DatabaseVulnerabilityAssessmentScansExportInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Convert an existing scan result to a human readable format. If already exists nothing happens.
+ *
+ * @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
+ * @param managedInstanceName The name of the managed instance.
+ * @param databaseName The name of the scanned database.
+ * @param scanId The vulnerability assessment scan Id.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the DatabaseVulnerabilityAssessmentScansExportInner object
+ */
+ public Observable> exportWithServiceResponseAsync(String resourceGroupName, String managedInstanceName, String databaseName, String scanId) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (managedInstanceName == null) {
+ throw new IllegalArgumentException("Parameter managedInstanceName is required and cannot be null.");
+ }
+ if (databaseName == null) {
+ throw new IllegalArgumentException("Parameter databaseName is required and cannot be null.");
+ }
+ if (scanId == null) {
+ throw new IllegalArgumentException("Parameter scanId is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final String vulnerabilityAssessmentName = "default";
+ return service.export(resourceGroupName, managedInstanceName, databaseName, vulnerabilityAssessmentName, scanId, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse