diff --git a/sql/resource-manager/v2017_10_01_preview/pom.xml b/sql/resource-manager/v2017_10_01_preview/pom.xml
index db97895f8b5c..99b5452880c0 100644
--- a/sql/resource-manager/v2017_10_01_preview/pom.xml
+++ b/sql/resource-manager/v2017_10_01_preview/pom.xml
@@ -11,8 +11,8 @@
com.microsoft.azure
azure-arm-parent
- 1.1.0
- ../../../pom.management.xml
+ 0.0.3-beta
+ ../../../pom.xml
azure-mgmt-sql
1.0.0-beta
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 966ec7467b22..1032f3897e2b 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
@@ -25,6 +25,11 @@
* Type representing Database.
*/
public interface Database extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the autoPauseDelay value.
+ */
+ Integer autoPauseDelay();
+
/**
* @return the catalogCollation value.
*/
@@ -120,6 +125,11 @@ public interface Database extends HasInner, Indexable, Refreshabl
*/
Long maxSizeBytes();
+ /**
+ * @return the minCapacity value.
+ */
+ Double minCapacity();
+
/**
* @return the name value.
*/
@@ -236,6 +246,18 @@ interface WithLocation {
WithCreate withLocation(String location);
}
+ /**
+ * The stage of the database definition allowing to specify AutoPauseDelay.
+ */
+ interface WithAutoPauseDelay {
+ /**
+ * Specifies autoPauseDelay.
+ * @param autoPauseDelay Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled
+ * @return the next definition stage
+ */
+ WithCreate withAutoPauseDelay(Integer autoPauseDelay);
+ }
+
/**
* The stage of the database definition allowing to specify CatalogCollation.
*/
@@ -328,6 +350,18 @@ interface WithMaxSizeBytes {
WithCreate withMaxSizeBytes(Long maxSizeBytes);
}
+ /**
+ * The stage of the database definition allowing to specify MinCapacity.
+ */
+ interface WithMinCapacity {
+ /**
+ * Specifies minCapacity.
+ * @param minCapacity Minimal capacity that database will always have allocated, if not paused
+ * @return the next definition stage
+ */
+ WithCreate withMinCapacity(Double minCapacity);
+ }
+
/**
* The stage of the database definition allowing to specify ReadScale.
*/
@@ -406,7 +440,14 @@ interface WithSampleName {
interface WithSku {
/**
* Specifies sku.
- * @param sku The name and tier of the SKU
+ * @param sku The database SKU.
+ The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:
+ ```azurecli
+ az sql db list-editions -l <location> -o table
+ ````
+ ```powershell
+ Get-AzSqlServerServiceObjective -Location <location>
+ ````
* @return the next definition stage
*/
WithCreate withSku(Sku sku);
@@ -465,19 +506,31 @@ interface WithZoneRedundant {
* 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.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithElasticPoolId, DefinitionStages.WithLicenseType, DefinitionStages.WithLongTermRetentionBackupResourceId, DefinitionStages.WithMaxSizeBytes, DefinitionStages.WithReadScale, DefinitionStages.WithRecoverableDatabaseId, DefinitionStages.WithRecoveryServicesRecoveryPointId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSampleName, DefinitionStages.WithSku, DefinitionStages.WithSourceDatabaseDeletionDate, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithTags, DefinitionStages.WithZoneRedundant {
+ interface WithCreate extends Creatable, DefinitionStages.WithAutoPauseDelay, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithElasticPoolId, DefinitionStages.WithLicenseType, DefinitionStages.WithLongTermRetentionBackupResourceId, DefinitionStages.WithMaxSizeBytes, DefinitionStages.WithMinCapacity, DefinitionStages.WithReadScale, DefinitionStages.WithRecoverableDatabaseId, DefinitionStages.WithRecoveryServicesRecoveryPointId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSampleName, DefinitionStages.WithSku, DefinitionStages.WithSourceDatabaseDeletionDate, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithTags, DefinitionStages.WithZoneRedundant {
}
}
/**
* The template for a Database update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithElasticPoolId, UpdateStages.WithLicenseType, UpdateStages.WithLongTermRetentionBackupResourceId, UpdateStages.WithMaxSizeBytes, UpdateStages.WithReadScale, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRecoveryServicesRecoveryPointId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSampleName, UpdateStages.WithSku, UpdateStages.WithSourceDatabaseDeletionDate, UpdateStages.WithSourceDatabaseId, UpdateStages.WithTags, UpdateStages.WithZoneRedundant {
+ interface Update extends Appliable, UpdateStages.WithAutoPauseDelay, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithElasticPoolId, UpdateStages.WithLicenseType, UpdateStages.WithLongTermRetentionBackupResourceId, UpdateStages.WithMaxSizeBytes, UpdateStages.WithMinCapacity, UpdateStages.WithReadScale, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRecoveryServicesRecoveryPointId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSampleName, UpdateStages.WithSku, UpdateStages.WithSourceDatabaseDeletionDate, UpdateStages.WithSourceDatabaseId, UpdateStages.WithTags, UpdateStages.WithZoneRedundant {
}
/**
* Grouping of Database update stages.
*/
interface UpdateStages {
+ /**
+ * The stage of the database update allowing to specify AutoPauseDelay.
+ */
+ interface WithAutoPauseDelay {
+ /**
+ * Specifies autoPauseDelay.
+ * @param autoPauseDelay Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled
+ * @return the next update stage
+ */
+ Update withAutoPauseDelay(Integer autoPauseDelay);
+ }
+
/**
* The stage of the database update allowing to specify CatalogCollation.
*/
@@ -570,6 +623,18 @@ interface WithMaxSizeBytes {
Update withMaxSizeBytes(Long maxSizeBytes);
}
+ /**
+ * The stage of the database update allowing to specify MinCapacity.
+ */
+ interface WithMinCapacity {
+ /**
+ * Specifies minCapacity.
+ * @param minCapacity Minimal capacity that database will always have allocated, if not paused
+ * @return the next update stage
+ */
+ Update withMinCapacity(Double minCapacity);
+ }
+
/**
* The stage of the database update allowing to specify ReadScale.
*/
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseStatus.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseStatus.java
index 9f978f320c7d..3fb2f98287b2 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseStatus.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseStatus.java
@@ -70,6 +70,12 @@ public final class DatabaseStatus extends ExpandableStringEnum {
/** Static value Scaling for DatabaseStatus. */
public static final DatabaseStatus SCALING = fromString("Scaling");
+ /** Static value OfflineChangingDwPerformanceTiers for DatabaseStatus. */
+ public static final DatabaseStatus OFFLINE_CHANGING_DW_PERFORMANCE_TIERS = fromString("OfflineChangingDwPerformanceTiers");
+
+ /** Static value OnlineChangingDwPerformanceTiers for DatabaseStatus. */
+ public static final DatabaseStatus ONLINE_CHANGING_DW_PERFORMANCE_TIERS = fromString("OnlineChangingDwPerformanceTiers");
+
/**
* Creates or finds a DatabaseStatus from its string representation.
* @param name a name to look for
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseUpdate.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseUpdate.java
index eafe8ef45060..ac090462a514 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseUpdate.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/DatabaseUpdate.java
@@ -106,7 +106,8 @@ public class DatabaseUpdate {
* 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', 'Offline',
* 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying',
* 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused',
- * 'Resuming', 'Scaling'.
+ * 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
+ * 'OnlineChangingDwPerformanceTiers'.
*/
@JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
private DatabaseStatus status;
@@ -237,6 +238,20 @@ public class DatabaseUpdate {
@JsonProperty(value = "properties.currentSku", access = JsonProperty.Access.WRITE_ONLY)
private Sku currentSku;
+ /**
+ * Time in minutes after which database is automatically paused. A value of
+ * -1 means that automatic pause is disabled.
+ */
+ @JsonProperty(value = "properties.autoPauseDelay")
+ private Integer autoPauseDelay;
+
+ /**
+ * Minimal capacity that database will always have allocated, if not
+ * paused.
+ */
+ @JsonProperty(value = "properties.minCapacity")
+ private Double minCapacity;
+
/**
* Resource tags.
*/
@@ -400,7 +415,7 @@ public DatabaseUpdate withSourceDatabaseId(String sourceDatabaseId) {
}
/**
- * Get the status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling'.
+ * Get the status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', 'OnlineChangingDwPerformanceTiers'.
*
* @return the status value
*/
@@ -689,6 +704,46 @@ public Sku currentSku() {
return this.currentSku;
}
+ /**
+ * Get time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.
+ *
+ * @return the autoPauseDelay value
+ */
+ public Integer autoPauseDelay() {
+ return this.autoPauseDelay;
+ }
+
+ /**
+ * Set time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.
+ *
+ * @param autoPauseDelay the autoPauseDelay value to set
+ * @return the DatabaseUpdate object itself.
+ */
+ public DatabaseUpdate withAutoPauseDelay(Integer autoPauseDelay) {
+ this.autoPauseDelay = autoPauseDelay;
+ return this;
+ }
+
+ /**
+ * Get minimal capacity that database will always have allocated, if not paused.
+ *
+ * @return the minCapacity value
+ */
+ public Double minCapacity() {
+ return this.minCapacity;
+ }
+
+ /**
+ * Set minimal capacity that database will always have allocated, if not paused.
+ *
+ * @param minCapacity the minCapacity value to set
+ * @return the DatabaseUpdate object itself.
+ */
+ public DatabaseUpdate withMinCapacity(Double minCapacity) {
+ this.minCapacity = minCapacity;
+ return this;
+ }
+
/**
* Get resource tags.
*
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 c7b12d377c52..fa4d492b98f7 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
@@ -172,7 +172,11 @@ interface WithPerDatabaseSettings {
interface WithSku {
/**
* Specifies sku.
- * @param sku the sku parameter value
+ * @param sku The elastic pool SKU.
+ The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command:
+ ```azurecli
+ az sql elastic-pool list-editions -l <location> -o table
+ ````
* @return the next definition stage
*/
WithCreate withSku(Sku sku);
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/RecoverableManagedDatabase.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/RecoverableManagedDatabase.java
new file mode 100644
index 000000000000..eca31ea91304
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/RecoverableManagedDatabase.java
@@ -0,0 +1,42 @@
+/**
+ * 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.RecoverableManagedDatabaseInner;
+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;
+
+/**
+ * Type representing RecoverableManagedDatabase.
+ */
+public interface RecoverableManagedDatabase extends HasInner, Indexable, Refreshable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the lastAvailableBackupDate value.
+ */
+ String lastAvailableBackupDate();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @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/RecoverableManagedDatabases.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/RecoverableManagedDatabases.java
new file mode 100644
index 000000000000..c73338b1d549
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/RecoverableManagedDatabases.java
@@ -0,0 +1,40 @@
+/**
+ * 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.RecoverableManagedDatabasesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing RecoverableManagedDatabases.
+ */
+public interface RecoverableManagedDatabases extends HasInner {
+ /**
+ * Gets a recoverable managed 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 recoverableDatabaseName the String value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String managedInstanceName, String recoverableDatabaseName);
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ * @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);
+
+}
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 57538e6de24c..821c2b33747f 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
@@ -101,6 +101,11 @@ private void resetCreateUpdateParameters() {
this.updateParameter = new DatabaseUpdate();
}
+ @Override
+ public Integer autoPauseDelay() {
+ return this.inner().autoPauseDelay();
+ }
+
@Override
public CatalogCollationType catalogCollation() {
return this.inner().catalogCollation();
@@ -196,6 +201,11 @@ public Long maxSizeBytes() {
return this.inner().maxSizeBytes();
}
+ @Override
+ public Double minCapacity() {
+ return this.inner().minCapacity();
+ }
+
@Override
public String name() {
return this.inner().name();
@@ -284,6 +294,16 @@ public DatabaseImpl withLocation(String location) {
return this;
}
+ @Override
+ public DatabaseImpl withAutoPauseDelay(Integer autoPauseDelay) {
+ if (isInCreateMode()) {
+ this.inner().withAutoPauseDelay(autoPauseDelay);
+ } else {
+ this.updateParameter.withAutoPauseDelay(autoPauseDelay);
+ }
+ return this;
+ }
+
@Override
public DatabaseImpl withCatalogCollation(CatalogCollationType catalogCollation) {
if (isInCreateMode()) {
@@ -354,6 +374,16 @@ public DatabaseImpl withMaxSizeBytes(Long maxSizeBytes) {
return this;
}
+ @Override
+ public DatabaseImpl withMinCapacity(Double minCapacity) {
+ if (isInCreateMode()) {
+ this.inner().withMinCapacity(minCapacity);
+ } else {
+ this.updateParameter.withMinCapacity(minCapacity);
+ }
+ return this;
+ }
+
@Override
public DatabaseImpl withReadScale(DatabaseReadScale readScale) {
if (isInCreateMode()) {
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseInner.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseInner.java
index 9c0e11f49b7f..d9598a583582 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseInner.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/DatabaseInner.java
@@ -27,7 +27,20 @@
@JsonFlatten
public class DatabaseInner extends Resource {
/**
- * The name and tier of the SKU.
+ * The database SKU.
+ *
+ * The list of SKUs may vary by region and support offer. To determine the
+ * SKUs (including the SKU name, tier/edition, family, and capacity) that
+ * are available to your subscription in an Azure region, use the
+ * `Capabilities_ListByLocation` REST API or one of the following commands:
+ *
+ * ```azurecli
+ * az sql db list-editions -l <location> -o table
+ * ````
+ *
+ * ```powershell
+ * Get-AzSqlServerServiceObjective -Location <location>
+ * ````.
*/
@JsonProperty(value = "sku")
private Sku sku;
@@ -125,7 +138,8 @@ public class DatabaseInner extends Resource {
* 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', 'Offline',
* 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying',
* 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused',
- * 'Resuming', 'Scaling'.
+ * 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers',
+ * 'OnlineChangingDwPerformanceTiers'.
*/
@JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
private DatabaseStatus status;
@@ -257,7 +271,28 @@ public class DatabaseInner extends Resource {
private Sku currentSku;
/**
- * Get the name and tier of the SKU.
+ * Time in minutes after which database is automatically paused. A value of
+ * -1 means that automatic pause is disabled.
+ */
+ @JsonProperty(value = "properties.autoPauseDelay")
+ private Integer autoPauseDelay;
+
+ /**
+ * Minimal capacity that database will always have allocated, if not
+ * paused.
+ */
+ @JsonProperty(value = "properties.minCapacity")
+ private Double minCapacity;
+
+ /**
+ * Get the database SKU.
+ The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:
+ ```azurecli
+ az sql db list-editions -l <location> -o table
+ ````
+ ```powershell
+ Get-AzSqlServerServiceObjective -Location <location>
+ ````.
*
* @return the sku value
*/
@@ -266,7 +301,14 @@ public Sku sku() {
}
/**
- * Set the name and tier of the SKU.
+ * Set the database SKU.
+ The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or one of the following commands:
+ ```azurecli
+ az sql db list-editions -l <location> -o table
+ ````
+ ```powershell
+ Get-AzSqlServerServiceObjective -Location <location>
+ ````.
*
* @param sku the sku value to set
* @return the DatabaseInner object itself.
@@ -431,7 +473,7 @@ public DatabaseInner withSourceDatabaseId(String sourceDatabaseId) {
}
/**
- * Get the status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling'.
+ * Get the status of the database. Possible values include: 'Online', 'Restoring', 'RecoveryPending', 'Recovering', 'Suspect', 'Offline', 'Standby', 'Shutdown', 'EmergencyMode', 'AutoClosed', 'Copying', 'Creating', 'Inaccessible', 'OfflineSecondary', 'Pausing', 'Paused', 'Resuming', 'Scaling', 'OfflineChangingDwPerformanceTiers', 'OnlineChangingDwPerformanceTiers'.
*
* @return the status value
*/
@@ -720,4 +762,44 @@ public Sku currentSku() {
return this.currentSku;
}
+ /**
+ * Get time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.
+ *
+ * @return the autoPauseDelay value
+ */
+ public Integer autoPauseDelay() {
+ return this.autoPauseDelay;
+ }
+
+ /**
+ * Set time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled.
+ *
+ * @param autoPauseDelay the autoPauseDelay value to set
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withAutoPauseDelay(Integer autoPauseDelay) {
+ this.autoPauseDelay = autoPauseDelay;
+ return this;
+ }
+
+ /**
+ * Get minimal capacity that database will always have allocated, if not paused.
+ *
+ * @return the minCapacity value
+ */
+ public Double minCapacity() {
+ return this.minCapacity;
+ }
+
+ /**
+ * Set minimal capacity that database will always have allocated, if not paused.
+ *
+ * @param minCapacity the minCapacity value to set
+ * @return the DatabaseInner object itself.
+ */
+ public DatabaseInner withMinCapacity(Double minCapacity) {
+ this.minCapacity = minCapacity;
+ 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
index cdae43ef347f..7c4b03e3bda7 100644
--- 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
@@ -29,7 +29,7 @@ class DatabaseVulnerabilityAssessmentRuleBaselineImpl extends CreatableUpdatable
super(name, new DatabaseVulnerabilityAssessmentRuleBaselineInner());
this.manager = manager;
// Set resource name
- this.baselineName = VulnerabilityAssessmentPolicyBaselineName.fromString(name);
+ this.baselineName = name;
//
}
@@ -37,7 +37,7 @@ class DatabaseVulnerabilityAssessmentRuleBaselineImpl extends CreatableUpdatable
super(inner.name(), inner);
this.manager = manager;
// Set resource name
- this.baselineName = VulnerabilityAssessmentPolicyBaselineName.fromString(inner.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");
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ElasticPoolInner.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ElasticPoolInner.java
index e7e1135945e9..d5a449ff60bd 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ElasticPoolInner.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ElasticPoolInner.java
@@ -23,7 +23,16 @@
@JsonFlatten
public class ElasticPoolInner extends Resource {
/**
- * The sku property.
+ * The elastic pool SKU.
+ *
+ * The list of SKUs may vary by region and support offer. To determine the
+ * SKUs (including the SKU name, tier/edition, family, and capacity) that
+ * are available to your subscription in an Azure region, use the
+ * `Capabilities_ListByLocation` REST API or the following command:
+ *
+ * ```azurecli
+ * az sql elastic-pool list-editions -l <location> -o table
+ * ````.
*/
@JsonProperty(value = "sku")
private Sku sku;
@@ -76,7 +85,11 @@ public class ElasticPoolInner extends Resource {
private ElasticPoolLicenseType licenseType;
/**
- * Get the sku value.
+ * Get the elastic pool SKU.
+ The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command:
+ ```azurecli
+ az sql elastic-pool list-editions -l <location> -o table
+ ````.
*
* @return the sku value
*/
@@ -85,7 +98,11 @@ public Sku sku() {
}
/**
- * Set the sku value.
+ * Set the elastic pool SKU.
+ The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API or the following command:
+ ```azurecli
+ az sql elastic-pool list-editions -l <location> -o table
+ ````.
*
* @param sku the sku value to set
* @return the ElasticPoolInner object itself.
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesImpl.java
index 7b7f4ee69543..251a0a223bfc 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesImpl.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/ManagedDatabaseVulnerabilityAssessmentRuleBaselinesImpl.java
@@ -11,7 +11,6 @@
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedDatabaseVulnerabilityAssessmentRuleBaselines;
-import com.microsoft.azure.management.sql.v2017_10_01_preview.VulnerabilityAssessmentPolicyBaselineName;
import rx.Observable;
import rx.functions.Func1;
import com.microsoft.azure.management.sql.v2017_10_01_preview.DatabaseVulnerabilityAssessmentRuleBaseline;
@@ -47,7 +46,7 @@ private Observable getDatabase
String managedInstanceName = IdParsingUtils.getValueFromIdByName(id, "managedInstances");
String databaseName = IdParsingUtils.getValueFromIdByName(id, "databases");
String ruleId = IdParsingUtils.getValueFromIdByName(id, "rules");
- VulnerabilityAssessmentPolicyBaselineName baselineName = VulnerabilityAssessmentPolicyBaselineName.valueOf(IdParsingUtils.getValueFromIdByName(id, "baselines"));
+ String baselineName = VulnerabilityAssessmentPolicyBaselineName.valueOf(IdParsingUtils.getValueFromIdByName(id, "baselines"));
ManagedDatabaseVulnerabilityAssessmentRuleBaselinesInner client = this.inner();
return client.getAsync(resourceGroupName, managedInstanceName, databaseName, ruleId, baselineName);
}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabaseImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabaseImpl.java
new file mode 100644
index 000000000000..9dbd7757bdf5
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabaseImpl.java
@@ -0,0 +1,63 @@
+/**
+ * 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.RecoverableManagedDatabase;
+import com.microsoft.azure.arm.model.implementation.IndexableRefreshableWrapperImpl;
+import rx.Observable;
+
+class RecoverableManagedDatabaseImpl extends IndexableRefreshableWrapperImpl implements RecoverableManagedDatabase {
+ private final SqlManager manager;
+ private String resourceGroupName;
+ private String managedInstanceName;
+ private String recoverableDatabaseName;
+
+ RecoverableManagedDatabaseImpl(RecoverableManagedDatabaseInner inner, SqlManager manager) {
+ super(null, inner);
+ this.manager = manager;
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.managedInstanceName = IdParsingUtils.getValueFromIdByName(inner.id(), "managedInstances");
+ this.recoverableDatabaseName = IdParsingUtils.getValueFromIdByName(inner.id(), "recoverableDatabases");
+ }
+
+ @Override
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ RecoverableManagedDatabasesInner client = this.manager().inner().recoverableManagedDatabases();
+ return client.getAsync(this.resourceGroupName, this.managedInstanceName, this.recoverableDatabaseName);
+ }
+
+
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String lastAvailableBackupDate() {
+ return this.inner().lastAvailableBackupDate();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabaseInner.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabaseInner.java
new file mode 100644
index 000000000000..08d0cf8784a1
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabaseInner.java
@@ -0,0 +1,35 @@
+/**
+ * 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.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.rest.serializer.JsonFlatten;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * A recoverable managed database resource.
+ */
+@JsonFlatten
+public class RecoverableManagedDatabaseInner extends ProxyResource {
+ /**
+ * The last available backup date.
+ */
+ @JsonProperty(value = "properties.lastAvailableBackupDate", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastAvailableBackupDate;
+
+ /**
+ * Get the last available backup date.
+ *
+ * @return the lastAvailableBackupDate value
+ */
+ public String lastAvailableBackupDate() {
+ return this.lastAvailableBackupDate;
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabasesImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabasesImpl.java
new file mode 100644
index 000000000000..119953c77ec6
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabasesImpl.java
@@ -0,0 +1,65 @@
+/**
+ * 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.RecoverableManagedDatabases;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.Page;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.RecoverableManagedDatabase;
+
+class RecoverableManagedDatabasesImpl extends WrapperImpl implements RecoverableManagedDatabases {
+ private final SqlManager manager;
+
+ RecoverableManagedDatabasesImpl(SqlManager manager) {
+ super(manager.inner().recoverableManagedDatabases());
+ this.manager = manager;
+ }
+
+ public SqlManager manager() {
+ return this.manager;
+ }
+
+ private RecoverableManagedDatabaseImpl wrapModel(RecoverableManagedDatabaseInner inner) {
+ return new RecoverableManagedDatabaseImpl(inner, manager());
+ }
+
+ @Override
+ public Observable listByInstanceAsync(final String resourceGroupName, final String managedInstanceName) {
+ RecoverableManagedDatabasesInner client = this.inner();
+ return client.listByInstanceAsync(resourceGroupName, managedInstanceName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public RecoverableManagedDatabase call(RecoverableManagedDatabaseInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String managedInstanceName, String recoverableDatabaseName) {
+ RecoverableManagedDatabasesInner client = this.inner();
+ return client.getAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName)
+ .map(new Func1() {
+ @Override
+ public RecoverableManagedDatabase call(RecoverableManagedDatabaseInner 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/RecoverableManagedDatabasesInner.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabasesInner.java
new file mode 100644
index 000000000000..741eb5979e22
--- /dev/null
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/RecoverableManagedDatabasesInner.java
@@ -0,0 +1,401 @@
+/**
+ * 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.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 RecoverableManagedDatabases.
+ */
+public class RecoverableManagedDatabasesInner {
+ /** The Retrofit service to perform REST calls. */
+ private RecoverableManagedDatabasesService service;
+ /** The service client containing this operation class. */
+ private SqlManagementClientImpl client;
+
+ /**
+ * Initializes an instance of RecoverableManagedDatabasesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public RecoverableManagedDatabasesInner(Retrofit retrofit, SqlManagementClientImpl client) {
+ this.service = retrofit.create(RecoverableManagedDatabasesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for RecoverableManagedDatabases to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface RecoverableManagedDatabasesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.sql.v2017_10_01_preview.RecoverableManagedDatabases listByInstance" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases")
+ Observable> listByInstance(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @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.RecoverableManagedDatabases get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/recoverableDatabases/{recoverableDatabaseName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("managedInstanceName") String managedInstanceName, @Path("recoverableDatabaseName") String recoverableDatabaseName, @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.RecoverableManagedDatabases listByInstanceNext" })
+ @GET
+ Observable> listByInstanceNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ * @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
+ * @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<RecoverableManagedDatabaseInner> object if successful.
+ */
+ public PagedList listByInstance(final String resourceGroupName, final String managedInstanceName) {
+ ServiceResponse> response = listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByInstanceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ * @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 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> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByInstanceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ * @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 to the PagedList<RecoverableManagedDatabaseInner> object
+ */
+ public Observable> listByInstanceAsync(final String resourceGroupName, final String managedInstanceName) {
+ return listByInstanceWithServiceResponseAsync(resourceGroupName, managedInstanceName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ * @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 to the PagedList<RecoverableManagedDatabaseInner> object
+ */
+ public Observable>> listByInstanceWithServiceResponseAsync(final String resourceGroupName, final String managedInstanceName) {
+ return listByInstanceSinglePageAsync(resourceGroupName, managedInstanceName)
+ .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(listByInstanceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ 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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<RecoverableManagedDatabaseInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByInstanceSinglePageAsync(final String resourceGroupName, final String managedInstanceName) {
+ 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 (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.");
+ }
+ return service.listByInstance(resourceGroupName, managedInstanceName, 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 = listByInstanceDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByInstanceDelegate(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 recoverable managed 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 recoverableDatabaseName the String value
+ * @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 RecoverableManagedDatabaseInner object if successful.
+ */
+ public RecoverableManagedDatabaseInner get(String resourceGroupName, String managedInstanceName, String recoverableDatabaseName) {
+ return getWithServiceResponseAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets a recoverable managed 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 recoverableDatabaseName the String value
+ * @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 recoverableDatabaseName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName), serviceCallback);
+ }
+
+ /**
+ * Gets a recoverable managed 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 recoverableDatabaseName the String value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RecoverableManagedDatabaseInner object
+ */
+ public Observable getAsync(String resourceGroupName, String managedInstanceName, String recoverableDatabaseName) {
+ return getWithServiceResponseAsync(resourceGroupName, managedInstanceName, recoverableDatabaseName).map(new Func1, RecoverableManagedDatabaseInner>() {
+ @Override
+ public RecoverableManagedDatabaseInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a recoverable managed 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 recoverableDatabaseName the String value
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the RecoverableManagedDatabaseInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String managedInstanceName, String recoverableDatabaseName) {
+ 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 (recoverableDatabaseName == null) {
+ throw new IllegalArgumentException("Parameter recoverableDatabaseName 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.");
+ }
+ return service.get(resourceGroupName, managedInstanceName, recoverableDatabaseName, 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);
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @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<RecoverableManagedDatabaseInner> object if successful.
+ */
+ public PagedList listByInstanceNext(final String nextPageLink) {
+ ServiceResponse> response = listByInstanceNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByInstanceNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @param serviceFuture the ServiceFuture object tracking the Retrofit calls
+ * @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> listByInstanceNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByInstanceNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByInstanceNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<RecoverableManagedDatabaseInner> object
+ */
+ public Observable> listByInstanceNextAsync(final String nextPageLink) {
+ return listByInstanceNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<RecoverableManagedDatabaseInner> object
+ */
+ public Observable>> listByInstanceNextWithServiceResponseAsync(final String nextPageLink) {
+ return listByInstanceNextSinglePageAsync(nextPageLink)
+ .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(listByInstanceNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Gets a list of recoverable managed databases.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<RecoverableManagedDatabaseInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByInstanceNextSinglePageAsync(final String nextPageLink) {
+ if (nextPageLink == null) {
+ throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.");
+ }
+ String nextUrl = String.format("%s", nextPageLink);
+ return service.listByInstanceNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByInstanceNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByInstanceNextDelegate(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);
+ }
+
+}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/SqlManagementClientImpl.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/SqlManagementClientImpl.java
index d32e61c6610d..ad2a3c376e69 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/SqlManagementClientImpl.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/SqlManagementClientImpl.java
@@ -327,6 +327,19 @@ public ManagedInstanceEncryptionProtectorsInner managedInstanceEncryptionProtect
return this.managedInstanceEncryptionProtectors;
}
+ /**
+ * The RecoverableManagedDatabasesInner object to access its operations.
+ */
+ private RecoverableManagedDatabasesInner recoverableManagedDatabases;
+
+ /**
+ * Gets the RecoverableManagedDatabasesInner object to access its operations.
+ * @return the RecoverableManagedDatabasesInner object.
+ */
+ public RecoverableManagedDatabasesInner recoverableManagedDatabases() {
+ return this.recoverableManagedDatabases;
+ }
+
/**
* Initializes an instance of SqlManagementClient client.
*
@@ -377,6 +390,7 @@ protected void initialize() {
this.managedInstanceTdeCertificates = new ManagedInstanceTdeCertificatesInner(restClient().retrofit(), this);
this.managedInstanceKeys = new ManagedInstanceKeysInner(restClient().retrofit(), this);
this.managedInstanceEncryptionProtectors = new ManagedInstanceEncryptionProtectorsInner(restClient().retrofit(), this);
+ this.recoverableManagedDatabases = new RecoverableManagedDatabasesInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
}
diff --git a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/SqlManager.java b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/SqlManager.java
index f76a2962112b..aeddeb2596b2 100644
--- a/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/SqlManager.java
+++ b/sql/resource-manager/v2017_10_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_10_01_preview/implementation/SqlManager.java
@@ -31,6 +31,7 @@
import com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedInstanceTdeCertificates;
import com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedInstanceKeys;
import com.microsoft.azure.management.sql.v2017_10_01_preview.ManagedInstanceEncryptionProtectors;
+import com.microsoft.azure.management.sql.v2017_10_01_preview.RecoverableManagedDatabases;
import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
import com.microsoft.azure.arm.resources.implementation.ManagerCore;
@@ -53,6 +54,7 @@ public final class SqlManager extends ManagerCore