diff --git a/sdk/sql/mgmt-v2017_03_01_preview/pom.xml b/sdk/sql/mgmt-v2017_03_01_preview/pom.xml
index cdd4f1bf9cd38..1d1bfe7ff99d3 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/pom.xml
+++ b/sdk/sql/mgmt-v2017_03_01_preview/pom.xml
@@ -11,8 +11,8 @@
com.microsoft.azure
azure-arm-parent
- 1.2.0
- ../../parents/azure-arm-parent
+ 1.1.0
+ ../../../pom.management.xml
azure-mgmt-sql
1.0.0-beta
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/DatabaseBlobAuditingPolicy.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/DatabaseBlobAuditingPolicy.java
index 8c34b03f2cbe5..8c285192e5d2b 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/DatabaseBlobAuditingPolicy.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/DatabaseBlobAuditingPolicy.java
@@ -54,6 +54,11 @@ public interface DatabaseBlobAuditingPolicy extends HasInner, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
+ interface WithCreate extends Creatable, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithQueueDelayMs, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
}
}
/**
* The template for a DatabaseBlobAuditingPolicy update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
+ interface Update extends Appliable, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithQueueDelayMs, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
}
/**
@@ -366,6 +389,19 @@ interface WithIsStorageSecondaryKeyInUse {
Update withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse);
}
+ /**
+ * The stage of the databaseblobauditingpolicy update allowing to specify QueueDelayMs.
+ */
+ interface WithQueueDelayMs {
+ /**
+ * Specifies queueDelayMs.
+ * @param queueDelayMs Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647
+ * @return the next update stage
+ */
+ Update withQueueDelayMs(Integer queueDelayMs);
+ }
+
/**
* The stage of the databaseblobauditingpolicy update allowing to specify RetentionDays.
*/
@@ -384,7 +420,12 @@ interface WithRetentionDays {
interface WithStorageAccountAccessKey {
/**
* Specifies storageAccountAccessKey.
- * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required
+ * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
* @return the next update stage
*/
Update withStorageAccountAccessKey(String storageAccountAccessKey);
@@ -408,7 +449,7 @@ interface WithStorageAccountSubscriptionId {
interface WithStorageEndpoint {
/**
* Specifies storageEndpoint.
- * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required
+ * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required
* @return the next update stage
*/
Update withStorageEndpoint(String storageEndpoint);
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/DatabasisServerSensitivityLabel.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/DatabasisServerSensitivityLabel.java
index 21c1e23aca524..c62bfaa2fd037 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/DatabasisServerSensitivityLabel.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/DatabasisServerSensitivityLabel.java
@@ -52,6 +52,11 @@ public interface DatabasisServerSensitivityLabel extends HasInner getAsync(String resourceGroupName, String serverName, String databaseName);
+ /**
+ * Lists extended auditing settings 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 serverName The name of the server.
+ * @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 serverName, final String databaseName);
+
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedDatabaseBlobAuditingPolicy.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedDatabaseBlobAuditingPolicy.java
index dbc72432a4064..9565393a1d5af 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedDatabaseBlobAuditingPolicy.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedDatabaseBlobAuditingPolicy.java
@@ -54,6 +54,11 @@ public interface ExtendedDatabaseBlobAuditingPolicy extends HasInner, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithPredicateExpression, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
+ interface WithCreate extends Creatable, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithPredicateExpression, DefinitionStages.WithQueueDelayMs, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
}
}
/**
* The template for a ExtendedDatabaseBlobAuditingPolicy update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithPredicateExpression, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
+ interface Update extends Appliable, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithPredicateExpression, UpdateStages.WithQueueDelayMs, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
}
/**
@@ -390,6 +413,19 @@ interface WithPredicateExpression {
Update withPredicateExpression(String predicateExpression);
}
+ /**
+ * The stage of the extendeddatabaseblobauditingpolicy update allowing to specify QueueDelayMs.
+ */
+ interface WithQueueDelayMs {
+ /**
+ * Specifies queueDelayMs.
+ * @param queueDelayMs Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647
+ * @return the next update stage
+ */
+ Update withQueueDelayMs(Integer queueDelayMs);
+ }
+
/**
* The stage of the extendeddatabaseblobauditingpolicy update allowing to specify RetentionDays.
*/
@@ -408,7 +444,12 @@ interface WithRetentionDays {
interface WithStorageAccountAccessKey {
/**
* Specifies storageAccountAccessKey.
- * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required
+ * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
* @return the next update stage
*/
Update withStorageAccountAccessKey(String storageAccountAccessKey);
@@ -432,7 +473,7 @@ interface WithStorageAccountSubscriptionId {
interface WithStorageEndpoint {
/**
* Specifies storageEndpoint.
- * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required
+ * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required
* @return the next update stage
*/
Update withStorageEndpoint(String storageEndpoint);
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedServerBlobAuditingPolicies.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedServerBlobAuditingPolicies.java
index 878d64fac3058..2e65a96781dee 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedServerBlobAuditingPolicies.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedServerBlobAuditingPolicies.java
@@ -27,4 +27,14 @@ public interface ExtendedServerBlobAuditingPolicies extends SupportsCreating getAsync(String resourceGroupName, String serverName);
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listByServerAsync(final String resourceGroupName, final String serverName);
+
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedServerBlobAuditingPolicy.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedServerBlobAuditingPolicy.java
index 40e44bbda5098..b3339587e9ea2 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedServerBlobAuditingPolicy.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ExtendedServerBlobAuditingPolicy.java
@@ -54,6 +54,11 @@ public interface ExtendedServerBlobAuditingPolicy extends HasInner, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithPredicateExpression, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
+ interface WithCreate extends Creatable, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithPredicateExpression, DefinitionStages.WithQueueDelayMs, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
}
}
/**
* The template for a ExtendedServerBlobAuditingPolicy update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithPredicateExpression, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
+ interface Update extends Appliable, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithPredicateExpression, UpdateStages.WithQueueDelayMs, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
}
/**
@@ -389,6 +412,19 @@ interface WithPredicateExpression {
Update withPredicateExpression(String predicateExpression);
}
+ /**
+ * The stage of the extendedserverblobauditingpolicy update allowing to specify QueueDelayMs.
+ */
+ interface WithQueueDelayMs {
+ /**
+ * Specifies queueDelayMs.
+ * @param queueDelayMs Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647
+ * @return the next update stage
+ */
+ Update withQueueDelayMs(Integer queueDelayMs);
+ }
+
/**
* The stage of the extendedserverblobauditingpolicy update allowing to specify RetentionDays.
*/
@@ -407,7 +443,12 @@ interface WithRetentionDays {
interface WithStorageAccountAccessKey {
/**
* Specifies storageAccountAccessKey.
- * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required
+ * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
* @return the next update stage
*/
Update withStorageAccountAccessKey(String storageAccountAccessKey);
@@ -431,7 +472,7 @@ interface WithStorageAccountSubscriptionId {
interface WithStorageEndpoint {
/**
* Specifies storageEndpoint.
- * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required
+ * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required
* @return the next update stage
*/
Update withStorageEndpoint(String storageEndpoint);
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/JobStepExecutions.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/JobStepExecutions.java
index 4296594557f9d..d096a4ddb832f 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/JobStepExecutions.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/JobStepExecutions.java
@@ -11,8 +11,6 @@
import rx.Observable;
import com.microsoft.azure.management.sql.v2017_03_01_preview.ExecutionJobJobAgentServerJobExecution;
-import java.util.UUID;
-
/**
* Type representing JobStepExecutions.
*/
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabase.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabase.java
index c41adf6979a48..489b39dcd56f9 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabase.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabase.java
@@ -69,6 +69,11 @@ public interface ManagedDatabase extends HasInner, Indexab
*/
String location();
+ /**
+ * @return the longTermRetentionBackupResourceId value.
+ */
+ String longTermRetentionBackupResourceId();
+
/**
* @return the name value.
*/
@@ -190,12 +195,24 @@ interface WithCollation {
interface WithCreateMode {
/**
* Specifies createMode.
- * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery'
+ * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'
* @return the next definition stage
*/
WithCreate withCreateMode(ManagedDatabaseCreateMode createMode);
}
+ /**
+ * The stage of the manageddatabase definition allowing to specify LongTermRetentionBackupResourceId.
+ */
+ interface WithLongTermRetentionBackupResourceId {
+ /**
+ * Specifies longTermRetentionBackupResourceId.
+ * @param longTermRetentionBackupResourceId The name of the Long Term Retention backup to be used for restore of this managed database
+ * @return the next definition stage
+ */
+ WithCreate withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId);
+ }
+
/**
* The stage of the manageddatabase definition allowing to specify RecoverableDatabaseId.
*/
@@ -285,13 +302,13 @@ interface WithTags {
* 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.WithRecoverableDatabaseId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithStorageContainerSasToken, DefinitionStages.WithStorageContainerUri, DefinitionStages.WithTags {
+ interface WithCreate extends Creatable, DefinitionStages.WithCatalogCollation, DefinitionStages.WithCollation, DefinitionStages.WithCreateMode, DefinitionStages.WithLongTermRetentionBackupResourceId, DefinitionStages.WithRecoverableDatabaseId, DefinitionStages.WithRestorableDroppedDatabaseId, DefinitionStages.WithRestorePointInTime, DefinitionStages.WithSourceDatabaseId, DefinitionStages.WithStorageContainerSasToken, DefinitionStages.WithStorageContainerUri, DefinitionStages.WithTags {
}
}
/**
* The template for a ManagedDatabase update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSourceDatabaseId, UpdateStages.WithStorageContainerSasToken, UpdateStages.WithStorageContainerUri, UpdateStages.WithTags {
+ interface Update extends Appliable, UpdateStages.WithCatalogCollation, UpdateStages.WithCollation, UpdateStages.WithCreateMode, UpdateStages.WithLongTermRetentionBackupResourceId, UpdateStages.WithRecoverableDatabaseId, UpdateStages.WithRestorableDroppedDatabaseId, UpdateStages.WithRestorePointInTime, UpdateStages.WithSourceDatabaseId, UpdateStages.WithStorageContainerSasToken, UpdateStages.WithStorageContainerUri, UpdateStages.WithTags {
}
/**
@@ -328,12 +345,24 @@ interface WithCollation {
interface WithCreateMode {
/**
* Specifies createMode.
- * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery'
+ * @param createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'
* @return the next update stage
*/
Update withCreateMode(ManagedDatabaseCreateMode createMode);
}
+ /**
+ * The stage of the manageddatabase update allowing to specify LongTermRetentionBackupResourceId.
+ */
+ interface WithLongTermRetentionBackupResourceId {
+ /**
+ * Specifies longTermRetentionBackupResourceId.
+ * @param longTermRetentionBackupResourceId The name of the Long Term Retention backup to be used for restore of this managed database
+ * @return the next update stage
+ */
+ Update withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId);
+ }
+
/**
* The stage of the manageddatabase update allowing to specify RecoverableDatabaseId.
*/
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabaseCreateMode.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabaseCreateMode.java
index f54d0ace4220f..09598fcc2ea10 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabaseCreateMode.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ManagedDatabaseCreateMode.java
@@ -28,6 +28,9 @@ public final class ManagedDatabaseCreateMode extends ExpandableStringEnum, Index
*/
String name();
+ /**
+ * @return the rank value.
+ */
+ SensitivityLabelRank rank();
+
/**
* @return the type value.
*/
@@ -143,18 +148,30 @@ interface WithLabelName {
WithCreate withLabelName(String labelName);
}
+ /**
+ * The stage of the sensitivitylabel definition allowing to specify Rank.
+ */
+ interface WithRank {
+ /**
+ * Specifies rank.
+ * @param rank Possible values include: 'None', 'Low', 'Medium', 'High', 'Critical'
+ * @return the next definition stage
+ */
+ WithCreate withRank(SensitivityLabelRank rank);
+ }
+
/**
* 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.WithInformationType, DefinitionStages.WithInformationTypeId, DefinitionStages.WithLabelId, DefinitionStages.WithLabelName {
+ interface WithCreate extends Creatable, DefinitionStages.WithInformationType, DefinitionStages.WithInformationTypeId, DefinitionStages.WithLabelId, DefinitionStages.WithLabelName, DefinitionStages.WithRank {
}
}
/**
* The template for a SensitivityLabel update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithInformationType, UpdateStages.WithInformationTypeId, UpdateStages.WithLabelId, UpdateStages.WithLabelName {
+ interface Update extends Appliable, UpdateStages.WithInformationType, UpdateStages.WithInformationTypeId, UpdateStages.WithLabelId, UpdateStages.WithLabelName, UpdateStages.WithRank {
}
/**
@@ -209,5 +226,17 @@ interface WithLabelName {
Update withLabelName(String labelName);
}
+ /**
+ * The stage of the sensitivitylabel update allowing to specify Rank.
+ */
+ interface WithRank {
+ /**
+ * Specifies rank.
+ * @param rank Possible values include: 'None', 'Low', 'Medium', 'High', 'Critical'
+ * @return the next update stage
+ */
+ Update withRank(SensitivityLabelRank rank);
+ }
+
}
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/SensitivityLabelRank.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/SensitivityLabelRank.java
new file mode 100644
index 0000000000000..06ecf37091c7e
--- /dev/null
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/SensitivityLabelRank.java
@@ -0,0 +1,62 @@
+/**
+ * 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_03_01_preview;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for SensitivityLabelRank.
+ */
+public enum SensitivityLabelRank {
+ /** Enum value None. */
+ NONE("None"),
+
+ /** Enum value Low. */
+ LOW("Low"),
+
+ /** Enum value Medium. */
+ MEDIUM("Medium"),
+
+ /** Enum value High. */
+ HIGH("High"),
+
+ /** Enum value Critical. */
+ CRITICAL("Critical");
+
+ /** The actual serialized value for a SensitivityLabelRank instance. */
+ private String value;
+
+ SensitivityLabelRank(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a SensitivityLabelRank instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed SensitivityLabelRank object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static SensitivityLabelRank fromString(String value) {
+ SensitivityLabelRank[] items = SensitivityLabelRank.values();
+ for (SensitivityLabelRank item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ServerBlobAuditingPolicy.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ServerBlobAuditingPolicy.java
index c7b80116c48b7..f8b98bac1d584 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ServerBlobAuditingPolicy.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/ServerBlobAuditingPolicy.java
@@ -49,6 +49,11 @@ public interface ServerBlobAuditingPolicy extends HasInner, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
+ interface WithCreate extends Creatable, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithQueueDelayMs, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
}
}
/**
* The template for a ServerBlobAuditingPolicy update operation, containing all the settings that can be modified.
*/
- interface Update extends Appliable, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
+ interface Update extends Appliable, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithQueueDelayMs, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
}
/**
@@ -360,6 +383,19 @@ interface WithIsStorageSecondaryKeyInUse {
Update withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse);
}
+ /**
+ * The stage of the serverblobauditingpolicy update allowing to specify QueueDelayMs.
+ */
+ interface WithQueueDelayMs {
+ /**
+ * Specifies queueDelayMs.
+ * @param queueDelayMs Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647
+ * @return the next update stage
+ */
+ Update withQueueDelayMs(Integer queueDelayMs);
+ }
+
/**
* The stage of the serverblobauditingpolicy update allowing to specify RetentionDays.
*/
@@ -378,7 +414,12 @@ interface WithRetentionDays {
interface WithStorageAccountAccessKey {
/**
* Specifies storageAccountAccessKey.
- * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required
+ * @param storageAccountAccessKey Specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
* @return the next update stage
*/
Update withStorageAccountAccessKey(String storageAccountAccessKey);
@@ -402,7 +443,7 @@ interface WithStorageAccountSubscriptionId {
interface WithStorageEndpoint {
/**
* Specifies storageEndpoint.
- * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required
+ * @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required
* @return the next update stage
*/
Update withStorageEndpoint(String storageEndpoint);
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseBlobAuditingPolicyImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseBlobAuditingPolicyImpl.java
index 4503419d93472..53adfb5a237a2 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseBlobAuditingPolicyImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseBlobAuditingPolicyImpl.java
@@ -102,6 +102,11 @@ public String name() {
return this.inner().name();
}
+ @Override
+ public Integer queueDelayMs() {
+ return this.inner().queueDelayMs();
+ }
+
@Override
public Integer retentionDays() {
return this.inner().retentionDays();
@@ -164,6 +169,12 @@ public DatabaseBlobAuditingPolicyImpl withIsStorageSecondaryKeyInUse(Boolean isS
return this;
}
+ @Override
+ public DatabaseBlobAuditingPolicyImpl withQueueDelayMs(Integer queueDelayMs) {
+ this.inner().withQueueDelayMs(queueDelayMs);
+ return this;
+ }
+
@Override
public DatabaseBlobAuditingPolicyImpl withRetentionDays(Integer retentionDays) {
this.inner().withRetentionDays(retentionDays);
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseBlobAuditingPolicyInner.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseBlobAuditingPolicyInner.java
index dc9f0fde563f7..98cfb665012c3 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseBlobAuditingPolicyInner.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseBlobAuditingPolicyInner.java
@@ -37,15 +37,23 @@ public class DatabaseBlobAuditingPolicyInner extends ProxyResource {
/**
* Specifies the blob storage endpoint (e.g.
* https://MyAccount.blob.core.windows.net). If state is Enabled,
- * storageEndpoint is required.
+ * storageEndpoint or isAzureMonitorTargetEnabled is required.
*/
@JsonProperty(value = "properties.storageEndpoint")
private String storageEndpoint;
/**
- * Specifies the identifier key of the auditing storage account. If state
- * is Enabled and storageEndpoint is specified, storageAccountAccessKey is
- * required.
+ * Specifies the identifier key of the auditing storage account.
+ * If state is Enabled and storageEndpoint is specified, not specifying the
+ * storageAccountAccessKey will use SQL server system-assigned managed
+ * identity to access the storage.
+ * Prerequisites for using managed identity authentication:
+ * 1. Assign SQL Server a system-assigned managed identity in Azure Active
+ * Directory (AAD).
+ * 2. Grant SQL Server identity access to the storage account by adding
+ * 'Storage Blob Data Contributor' RBAC role to the server identity.
+ * For more information, see [Auditing to storage using Managed Identity
+ * authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*/
@JsonProperty(value = "properties.storageAccountAccessKey")
private String storageAccountAccessKey;
@@ -169,6 +177,15 @@ public class DatabaseBlobAuditingPolicyInner extends ProxyResource {
@JsonProperty(value = "properties.isAzureMonitorTargetEnabled")
private Boolean isAzureMonitorTargetEnabled;
+ /**
+ * Specifies the amount of time in milliseconds that can elapse before
+ * audit actions are forced to be processed.
+ * The default minimum value is 1000 (1 second). The maximum is
+ * 2,147,483,647.
+ */
+ @JsonProperty(value = "properties.queueDelayMs")
+ private Integer queueDelayMs;
+
/**
* Get resource kind.
*
@@ -199,7 +216,7 @@ public DatabaseBlobAuditingPolicyInner withState(BlobAuditingPolicyState state)
}
/**
- * Get specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
+ * Get specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
*
* @return the storageEndpoint value
*/
@@ -208,7 +225,7 @@ public String storageEndpoint() {
}
/**
- * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
+ * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
*
* @param storageEndpoint the storageEndpoint value to set
* @return the DatabaseBlobAuditingPolicyInner object itself.
@@ -219,7 +236,12 @@ public DatabaseBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoin
}
/**
- * Get specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
+ * Get specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*
* @return the storageAccountAccessKey value
*/
@@ -228,7 +250,12 @@ public String storageAccountAccessKey() {
}
/**
- * Set specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
+ * Set specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*
* @param storageAccountAccessKey the storageAccountAccessKey value to set
* @return the DatabaseBlobAuditingPolicyInner object itself.
@@ -440,4 +467,26 @@ public DatabaseBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean i
return this;
}
+ /**
+ * Get specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
+ *
+ * @return the queueDelayMs value
+ */
+ public Integer queueDelayMs() {
+ return this.queueDelayMs;
+ }
+
+ /**
+ * Set specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
+ *
+ * @param queueDelayMs the queueDelayMs value to set
+ * @return the DatabaseBlobAuditingPolicyInner object itself.
+ */
+ public DatabaseBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) {
+ this.queueDelayMs = queueDelayMs;
+ return this;
+ }
+
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselineImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselineImpl.java
index ef7856abaed19..023610ad1fa24 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselineImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_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.valueOf(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.valueOf(inner.name());
+ this.baselineName = inner.name();
// set resource ancestor and positional variables
this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
this.serverName = IdParsingUtils.getValueFromIdByName(inner.id(), "servers");
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesImpl.java
index 1eef0059641f3..ab89c89b7f2f8 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabaseVulnerabilityAssessmentRuleBaselinesImpl.java
@@ -11,7 +11,6 @@
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import com.microsoft.azure.management.sql.v2017_03_01_preview.DatabaseVulnerabilityAssessmentRuleBaselines;
-import com.microsoft.azure.management.sql.v2017_03_01_preview.VulnerabilityAssessmentPolicyBaselineName;
import rx.Observable;
import rx.functions.Func1;
import com.microsoft.azure.management.sql.v2017_03_01_preview.DatabaseVulnerabilityAssessmentRuleBaseline;
@@ -47,7 +46,7 @@ private Observable getDatabase
String serverName = IdParsingUtils.getValueFromIdByName(id, "servers");
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"));
DatabaseVulnerabilityAssessmentRuleBaselinesInner client = this.inner();
return client.getAsync(resourceGroupName, serverName, databaseName, ruleId, baselineName);
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasisServerSensitivityLabelImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasisServerSensitivityLabelImpl.java
index e2c221572a2d0..644af26ecf878 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasisServerSensitivityLabelImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasisServerSensitivityLabelImpl.java
@@ -11,6 +11,7 @@
import com.microsoft.azure.management.sql.v2017_03_01_preview.DatabasisServerSensitivityLabel;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import rx.Observable;
+import com.microsoft.azure.management.sql.v2017_03_01_preview.SensitivityLabelRank;
class DatabasisServerSensitivityLabelImpl extends WrapperImpl implements DatabasisServerSensitivityLabel {
private final SqlManager manager;
@@ -62,6 +63,11 @@ public String name() {
return this.inner().name();
}
+ @Override
+ public SensitivityLabelRank rank() {
+ return this.inner().rank();
+ }
+
@Override
public String type() {
return this.inner().type();
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasisServerSensitivityLabelModelImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasisServerSensitivityLabelModelImpl.java
index 6757d22ea4541..96a2171deb242 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasisServerSensitivityLabelModelImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/DatabasisServerSensitivityLabelModelImpl.java
@@ -11,6 +11,7 @@
import com.microsoft.azure.management.sql.v2017_03_01_preview.DatabasisServerSensitivityLabelModel;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import rx.Observable;
+import com.microsoft.azure.management.sql.v2017_03_01_preview.SensitivityLabelRank;
class DatabasisServerSensitivityLabelModelImpl extends WrapperImpl implements DatabasisServerSensitivityLabelModel {
private final SqlManager manager;
@@ -62,6 +63,11 @@ public String name() {
return this.inner().name();
}
+ @Override
+ public SensitivityLabelRank rank() {
+ return this.inner().rank();
+ }
+
@Override
public String type() {
return this.inner().type();
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesImpl.java
index 1cef5dd6778f6..ea5a340dc7c64 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesImpl.java
@@ -13,6 +13,7 @@
import com.microsoft.azure.management.sql.v2017_03_01_preview.ExtendedDatabaseBlobAuditingPolicies;
import rx.Observable;
import rx.functions.Func1;
+import com.microsoft.azure.Page;
import com.microsoft.azure.management.sql.v2017_03_01_preview.ExtendedDatabaseBlobAuditingPolicy;
class ExtendedDatabaseBlobAuditingPoliciesImpl extends WrapperImpl implements ExtendedDatabaseBlobAuditingPolicies {
@@ -40,6 +41,24 @@ private ExtendedDatabaseBlobAuditingPolicyImpl wrapModel(String name) {
return new ExtendedDatabaseBlobAuditingPolicyImpl(name, this.manager());
}
+ @Override
+ public Observable listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName) {
+ ExtendedDatabaseBlobAuditingPoliciesInner client = this.inner();
+ return client.listByDatabaseAsync(resourceGroupName, serverName, databaseName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public ExtendedDatabaseBlobAuditingPolicy call(ExtendedDatabaseBlobAuditingPolicyInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
@Override
public Observable getAsync(String resourceGroupName, String serverName, String databaseName) {
ExtendedDatabaseBlobAuditingPoliciesInner client = this.inner();
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesInner.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesInner.java
index 0c36196f92369..b49da35ae37d5 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesInner.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPoliciesInner.java
@@ -10,12 +10,17 @@
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 com.microsoft.rest.Validator;
import java.io.IOException;
+import java.util.List;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
@@ -24,6 +29,7 @@
import retrofit2.http.Path;
import retrofit2.http.PUT;
import retrofit2.http.Query;
+import retrofit2.http.Url;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;
@@ -62,6 +68,14 @@ interface ExtendedDatabaseBlobAuditingPoliciesService {
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings/{blobAuditingPolicyName}")
Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @Path("blobAuditingPolicyName") String blobAuditingPolicyName, @Path("subscriptionId") String subscriptionId, @Body ExtendedDatabaseBlobAuditingPolicyInner parameters, @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_03_01_preview.ExtendedDatabaseBlobAuditingPolicies listByDatabase" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/extendedAuditingSettings")
+ Observable> listByDatabase(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("databaseName") String databaseName, @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_03_01_preview.ExtendedDatabaseBlobAuditingPolicies listByDatabaseNext" })
+ @GET
+ Observable> listByDatabaseNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
}
/**
@@ -261,4 +275,246 @@ private ServiceResponse createOrUpdateD
.build(response);
}
+ /**
+ * Lists extended auditing settings 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 serverName The name of the server.
+ * @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<ExtendedDatabaseBlobAuditingPolicyInner> object if successful.
+ */
+ public PagedList listByDatabase(final String resourceGroupName, final String serverName, final String databaseName) {
+ ServiceResponse> response = listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists extended auditing settings 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 serverName The name of the server.
+ * @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 serverName, final String databaseName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByDatabaseSinglePageAsync(resourceGroupName, serverName, databaseName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists extended auditing settings 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 serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ExtendedDatabaseBlobAuditingPolicyInner> object
+ */
+ public Observable> listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName) {
+ return listByDatabaseWithServiceResponseAsync(resourceGroupName, serverName, databaseName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists extended auditing settings 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 serverName The name of the server.
+ * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ExtendedDatabaseBlobAuditingPolicyInner> object
+ */
+ public Observable>> listByDatabaseWithServiceResponseAsync(final String resourceGroupName, final String serverName, final String databaseName) {
+ return listByDatabaseSinglePageAsync(resourceGroupName, serverName, 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 extended auditing settings 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 serverName The name of the server.
+ ServiceResponse> * @param databaseName The name of the database.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ExtendedDatabaseBlobAuditingPolicyInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByDatabaseSinglePageAsync(final String resourceGroupName, final String serverName, final String databaseName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName 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.");
+ }
+ return service.listByDatabase(resourceGroupName, serverName, databaseName, 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);
+ }
+
+ /**
+ * Lists extended auditing settings of a database.
+ *
+ * @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<ExtendedDatabaseBlobAuditingPolicyInner> object if successful.
+ */
+ public PagedList listByDatabaseNext(final String nextPageLink) {
+ ServiceResponse> response = listByDatabaseNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists extended auditing settings of a database.
+ *
+ * @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> listByDatabaseNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByDatabaseNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists extended auditing settings of a database.
+ *
+ * @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<ExtendedDatabaseBlobAuditingPolicyInner> object
+ */
+ public Observable> listByDatabaseNextAsync(final String nextPageLink) {
+ return listByDatabaseNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists extended auditing settings of a database.
+ *
+ * @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<ExtendedDatabaseBlobAuditingPolicyInner> object
+ */
+ public Observable>> listByDatabaseNextWithServiceResponseAsync(final String nextPageLink) {
+ return listByDatabaseNextSinglePageAsync(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(listByDatabaseNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists extended auditing settings of a database.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ExtendedDatabaseBlobAuditingPolicyInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByDatabaseNextSinglePageAsync(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.listByDatabaseNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByDatabaseNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByDatabaseNextDelegate(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/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPolicyImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPolicyImpl.java
index 99262e9e82058..f72b7d00e111a 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPolicyImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPolicyImpl.java
@@ -102,6 +102,11 @@ public String predicateExpression() {
return this.inner().predicateExpression();
}
+ @Override
+ public Integer queueDelayMs() {
+ return this.inner().queueDelayMs();
+ }
+
@Override
public Integer retentionDays() {
return this.inner().retentionDays();
@@ -170,6 +175,12 @@ public ExtendedDatabaseBlobAuditingPolicyImpl withPredicateExpression(String pre
return this;
}
+ @Override
+ public ExtendedDatabaseBlobAuditingPolicyImpl withQueueDelayMs(Integer queueDelayMs) {
+ this.inner().withQueueDelayMs(queueDelayMs);
+ return this;
+ }
+
@Override
public ExtendedDatabaseBlobAuditingPolicyImpl withRetentionDays(Integer retentionDays) {
this.inner().withRetentionDays(retentionDays);
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPolicyInner.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPolicyInner.java
index a7c294fea9d70..82fc9a481739f 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPolicyInner.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedDatabaseBlobAuditingPolicyInner.java
@@ -37,15 +37,23 @@ public class ExtendedDatabaseBlobAuditingPolicyInner extends ProxyResource {
/**
* Specifies the blob storage endpoint (e.g.
* https://MyAccount.blob.core.windows.net). If state is Enabled,
- * storageEndpoint is required.
+ * storageEndpoint or isAzureMonitorTargetEnabled is required.
*/
@JsonProperty(value = "properties.storageEndpoint")
private String storageEndpoint;
/**
- * Specifies the identifier key of the auditing storage account. If state
- * is Enabled and storageEndpoint is specified, storageAccountAccessKey is
- * required.
+ * Specifies the identifier key of the auditing storage account.
+ * If state is Enabled and storageEndpoint is specified, not specifying the
+ * storageAccountAccessKey will use SQL server system-assigned managed
+ * identity to access the storage.
+ * Prerequisites for using managed identity authentication:
+ * 1. Assign SQL Server a system-assigned managed identity in Azure Active
+ * Directory (AAD).
+ * 2. Grant SQL Server identity access to the storage account by adding
+ * 'Storage Blob Data Contributor' RBAC role to the server identity.
+ * For more information, see [Auditing to storage using Managed Identity
+ * authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*/
@JsonProperty(value = "properties.storageAccountAccessKey")
private String storageAccountAccessKey;
@@ -169,6 +177,15 @@ public class ExtendedDatabaseBlobAuditingPolicyInner extends ProxyResource {
@JsonProperty(value = "properties.isAzureMonitorTargetEnabled")
private Boolean isAzureMonitorTargetEnabled;
+ /**
+ * Specifies the amount of time in milliseconds that can elapse before
+ * audit actions are forced to be processed.
+ * The default minimum value is 1000 (1 second). The maximum is
+ * 2,147,483,647.
+ */
+ @JsonProperty(value = "properties.queueDelayMs")
+ private Integer queueDelayMs;
+
/**
* Get specifies condition of where clause when creating an audit.
*
@@ -210,7 +227,7 @@ public ExtendedDatabaseBlobAuditingPolicyInner withState(BlobAuditingPolicyState
}
/**
- * Get specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
+ * Get specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
*
* @return the storageEndpoint value
*/
@@ -219,7 +236,7 @@ public String storageEndpoint() {
}
/**
- * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
+ * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
*
* @param storageEndpoint the storageEndpoint value to set
* @return the ExtendedDatabaseBlobAuditingPolicyInner object itself.
@@ -230,7 +247,12 @@ public ExtendedDatabaseBlobAuditingPolicyInner withStorageEndpoint(String storag
}
/**
- * Get specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
+ * Get specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*
* @return the storageAccountAccessKey value
*/
@@ -239,7 +261,12 @@ public String storageAccountAccessKey() {
}
/**
- * Set specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
+ * Set specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*
* @param storageAccountAccessKey the storageAccountAccessKey value to set
* @return the ExtendedDatabaseBlobAuditingPolicyInner object itself.
@@ -451,4 +478,26 @@ public ExtendedDatabaseBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(B
return this;
}
+ /**
+ * Get specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
+ *
+ * @return the queueDelayMs value
+ */
+ public Integer queueDelayMs() {
+ return this.queueDelayMs;
+ }
+
+ /**
+ * Set specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
+ *
+ * @param queueDelayMs the queueDelayMs value to set
+ * @return the ExtendedDatabaseBlobAuditingPolicyInner object itself.
+ */
+ public ExtendedDatabaseBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) {
+ this.queueDelayMs = queueDelayMs;
+ return this;
+ }
+
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesImpl.java
index 3537db4083508..2ef2d2aa76e45 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesImpl.java
@@ -13,6 +13,7 @@
import com.microsoft.azure.management.sql.v2017_03_01_preview.ExtendedServerBlobAuditingPolicies;
import rx.Observable;
import rx.functions.Func1;
+import com.microsoft.azure.Page;
import com.microsoft.azure.management.sql.v2017_03_01_preview.ExtendedServerBlobAuditingPolicy;
class ExtendedServerBlobAuditingPoliciesImpl extends WrapperImpl implements ExtendedServerBlobAuditingPolicies {
@@ -40,6 +41,24 @@ private ExtendedServerBlobAuditingPolicyImpl wrapModel(String name) {
return new ExtendedServerBlobAuditingPolicyImpl(name, this.manager());
}
+ @Override
+ public Observable listByServerAsync(final String resourceGroupName, final String serverName) {
+ ExtendedServerBlobAuditingPoliciesInner client = this.inner();
+ return client.listByServerAsync(resourceGroupName, serverName)
+ .flatMapIterable(new Func1, Iterable>() {
+ @Override
+ public Iterable call(Page page) {
+ return page.items();
+ }
+ })
+ .map(new Func1() {
+ @Override
+ public ExtendedServerBlobAuditingPolicy call(ExtendedServerBlobAuditingPolicyInner inner) {
+ return wrapModel(inner);
+ }
+ });
+ }
+
@Override
public Observable getAsync(String resourceGroupName, String serverName) {
ExtendedServerBlobAuditingPoliciesInner client = this.inner();
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesInner.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesInner.java
index 054eb61e81ee9..6c53d3f069c16 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesInner.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPoliciesInner.java
@@ -10,12 +10,17 @@
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 com.microsoft.rest.Validator;
import java.io.IOException;
+import java.util.List;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
@@ -24,6 +29,7 @@
import retrofit2.http.Path;
import retrofit2.http.PUT;
import retrofit2.http.Query;
+import retrofit2.http.Url;
import retrofit2.Response;
import rx.functions.Func1;
import rx.Observable;
@@ -66,6 +72,14 @@ interface ExtendedServerBlobAuditingPoliciesService {
@PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings/{blobAuditingPolicyName}")
Observable> beginCreateOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @Path("blobAuditingPolicyName") String blobAuditingPolicyName, @Path("subscriptionId") String subscriptionId, @Body ExtendedServerBlobAuditingPolicyInner parameters, @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_03_01_preview.ExtendedServerBlobAuditingPolicies listByServer" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/extendedAuditingSettings")
+ Observable> listByServer(@Path("resourceGroupName") String resourceGroupName, @Path("serverName") String serverName, @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_03_01_preview.ExtendedServerBlobAuditingPolicies listByServerNext" })
+ @GET
+ Observable> listByServerNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
}
/**
@@ -329,4 +343,238 @@ private ServiceResponse beginCreateOrUpda
.build(response);
}
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @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.
+ * @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<ExtendedServerBlobAuditingPolicyInner> object if successful.
+ */
+ public PagedList listByServer(final String resourceGroupName, final String serverName) {
+ ServiceResponse> response = listByServerSinglePageAsync(resourceGroupName, serverName).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByServerNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @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 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> listByServerAsync(final String resourceGroupName, final String serverName, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByServerSinglePageAsync(resourceGroupName, serverName),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByServerNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ExtendedServerBlobAuditingPolicyInner> object
+ */
+ public Observable> listByServerAsync(final String resourceGroupName, final String serverName) {
+ return listByServerWithServiceResponseAsync(resourceGroupName, serverName)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @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.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PagedList<ExtendedServerBlobAuditingPolicyInner> object
+ */
+ public Observable>> listByServerWithServiceResponseAsync(final String resourceGroupName, final String serverName) {
+ return listByServerSinglePageAsync(resourceGroupName, serverName)
+ .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(listByServerNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ 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 serverName The name of the server.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ExtendedServerBlobAuditingPolicyInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByServerSinglePageAsync(final String resourceGroupName, final String serverName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (serverName == null) {
+ throw new IllegalArgumentException("Parameter serverName 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.listByServer(resourceGroupName, serverName, 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 = listByServerDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByServerDelegate(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);
+ }
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @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<ExtendedServerBlobAuditingPolicyInner> object if successful.
+ */
+ public PagedList listByServerNext(final String nextPageLink) {
+ ServiceResponse> response = listByServerNextSinglePageAsync(nextPageLink).toBlocking().single();
+ return new PagedList(response.body()) {
+ @Override
+ public Page nextPage(String nextPageLink) {
+ return listByServerNextSinglePageAsync(nextPageLink).toBlocking().single().body();
+ }
+ };
+ }
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @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> listByServerNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) {
+ return AzureServiceFuture.fromPageResponse(
+ listByServerNextSinglePageAsync(nextPageLink),
+ new Func1>>>() {
+ @Override
+ public Observable>> call(String nextPageLink) {
+ return listByServerNextSinglePageAsync(nextPageLink);
+ }
+ },
+ serviceCallback);
+ }
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @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<ExtendedServerBlobAuditingPolicyInner> object
+ */
+ public Observable> listByServerNextAsync(final String nextPageLink) {
+ return listByServerNextWithServiceResponseAsync(nextPageLink)
+ .map(new Func1>, Page>() {
+ @Override
+ public Page call(ServiceResponse> response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ * @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<ExtendedServerBlobAuditingPolicyInner> object
+ */
+ public Observable>> listByServerNextWithServiceResponseAsync(final String nextPageLink) {
+ return listByServerNextSinglePageAsync(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(listByServerNextWithServiceResponseAsync(nextPageLink));
+ }
+ });
+ }
+
+ /**
+ * Lists extended auditing settings of a server.
+ *
+ ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the PagedList<ExtendedServerBlobAuditingPolicyInner> object wrapped in {@link ServiceResponse} if successful.
+ */
+ public Observable>> listByServerNextSinglePageAsync(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.listByServerNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>>() {
+ @Override
+ public Observable>> call(Response response) {
+ try {
+ ServiceResponse> result = listByServerNextDelegate(response);
+ return Observable.just(new ServiceResponse>(result.body(), result.response()));
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse> listByServerNextDelegate(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/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPolicyImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPolicyImpl.java
index fcb17e6eb92dc..e7e7aa478aff3 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPolicyImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPolicyImpl.java
@@ -100,6 +100,11 @@ public String predicateExpression() {
return this.inner().predicateExpression();
}
+ @Override
+ public Integer queueDelayMs() {
+ return this.inner().queueDelayMs();
+ }
+
@Override
public Integer retentionDays() {
return this.inner().retentionDays();
@@ -167,6 +172,12 @@ public ExtendedServerBlobAuditingPolicyImpl withPredicateExpression(String predi
return this;
}
+ @Override
+ public ExtendedServerBlobAuditingPolicyImpl withQueueDelayMs(Integer queueDelayMs) {
+ this.inner().withQueueDelayMs(queueDelayMs);
+ return this;
+ }
+
@Override
public ExtendedServerBlobAuditingPolicyImpl withRetentionDays(Integer retentionDays) {
this.inner().withRetentionDays(retentionDays);
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPolicyInner.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPolicyInner.java
index 415c84123878a..6a11cb776fc92 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPolicyInner.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ExtendedServerBlobAuditingPolicyInner.java
@@ -37,15 +37,23 @@ public class ExtendedServerBlobAuditingPolicyInner extends ProxyResource {
/**
* Specifies the blob storage endpoint (e.g.
* https://MyAccount.blob.core.windows.net). If state is Enabled,
- * storageEndpoint is required.
+ * storageEndpoint or isAzureMonitorTargetEnabled is required.
*/
@JsonProperty(value = "properties.storageEndpoint")
private String storageEndpoint;
/**
- * Specifies the identifier key of the auditing storage account. If state
- * is Enabled and storageEndpoint is specified, storageAccountAccessKey is
- * required.
+ * Specifies the identifier key of the auditing storage account.
+ * If state is Enabled and storageEndpoint is specified, not specifying the
+ * storageAccountAccessKey will use SQL server system-assigned managed
+ * identity to access the storage.
+ * Prerequisites for using managed identity authentication:
+ * 1. Assign SQL Server a system-assigned managed identity in Azure Active
+ * Directory (AAD).
+ * 2. Grant SQL Server identity access to the storage account by adding
+ * 'Storage Blob Data Contributor' RBAC role to the server identity.
+ * For more information, see [Auditing to storage using Managed Identity
+ * authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*/
@JsonProperty(value = "properties.storageAccountAccessKey")
private String storageAccountAccessKey;
@@ -169,6 +177,15 @@ public class ExtendedServerBlobAuditingPolicyInner extends ProxyResource {
@JsonProperty(value = "properties.isAzureMonitorTargetEnabled")
private Boolean isAzureMonitorTargetEnabled;
+ /**
+ * Specifies the amount of time in milliseconds that can elapse before
+ * audit actions are forced to be processed.
+ * The default minimum value is 1000 (1 second). The maximum is
+ * 2,147,483,647.
+ */
+ @JsonProperty(value = "properties.queueDelayMs")
+ private Integer queueDelayMs;
+
/**
* Get specifies condition of where clause when creating an audit.
*
@@ -210,7 +227,7 @@ public ExtendedServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState s
}
/**
- * Get specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
+ * Get specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
*
* @return the storageEndpoint value
*/
@@ -219,7 +236,7 @@ public String storageEndpoint() {
}
/**
- * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
+ * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
*
* @param storageEndpoint the storageEndpoint value to set
* @return the ExtendedServerBlobAuditingPolicyInner object itself.
@@ -230,7 +247,12 @@ public ExtendedServerBlobAuditingPolicyInner withStorageEndpoint(String storageE
}
/**
- * Get specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
+ * Get specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*
* @return the storageAccountAccessKey value
*/
@@ -239,7 +261,12 @@ public String storageAccountAccessKey() {
}
/**
- * Set specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
+ * Set specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*
* @param storageAccountAccessKey the storageAccountAccessKey value to set
* @return the ExtendedServerBlobAuditingPolicyInner object itself.
@@ -451,4 +478,26 @@ public ExtendedServerBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boo
return this;
}
+ /**
+ * Get specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
+ *
+ * @return the queueDelayMs value
+ */
+ public Integer queueDelayMs() {
+ return this.queueDelayMs;
+ }
+
+ /**
+ * Set specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
+ *
+ * @param queueDelayMs the queueDelayMs value to set
+ * @return the ExtendedServerBlobAuditingPolicyInner object itself.
+ */
+ public ExtendedServerBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) {
+ this.queueDelayMs = queueDelayMs;
+ return this;
+ }
+
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentServerJobExecutionImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentServerJobExecutionImpl.java
index 4e0e2e0cdc69a..e6525639104e1 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentServerJobExecutionImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobAgentServerJobExecutionImpl.java
@@ -29,7 +29,7 @@ class JobAgentServerJobExecutionImpl extends CreatableUpdatableImpl implements JobStepExecutions {
private final SqlManager manager;
@@ -39,7 +37,7 @@ private Observable getJobExecutionInnerUsingJobStepExecutions
String serverName = IdParsingUtils.getValueFromIdByName(id, "servers");
String jobAgentName = IdParsingUtils.getValueFromIdByName(id, "jobAgents");
String jobName = IdParsingUtils.getValueFromIdByName(id, "jobs");
- UUID jobExecutionId = UUID.fromString(IdParsingUtils.getValueFromIdByName(id, "executions"));
+ String jobExecutionId = UUID.fromString(IdParsingUtils.getValueFromIdByName(id, "executions"));
String stepName = IdParsingUtils.getValueFromIdByName(id, "steps");
JobStepExecutionsInner client = this.inner();
return client.getAsync(resourceGroupName, serverName, jobAgentName, jobName, jobExecutionId, stepName);
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobStepImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobStepImpl.java
index 4c57c31d99fb4..324af6f0ef570 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobStepImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/JobStepImpl.java
@@ -67,7 +67,7 @@ public Observable updateResourceAsync() {
@Override
protected Observable getInnerAsync() {
JobStepsInner client = this.manager().inner().jobSteps();
- return client.getAsync(this.resourceGroupName, this.serverName, this.jobAgentName, this.jobName, this.stepName);
+ return client.getByVersionAsync(this.resourceGroupName, this.serverName, this.jobAgentName, this.jobName, this.stepName);
}
@Override
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseImpl.java
index 1ccab4d6b2ec4..e8470d5d7b5db 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseImpl.java
@@ -141,6 +141,11 @@ public String location() {
return this.inner().location();
}
+ @Override
+ public String longTermRetentionBackupResourceId() {
+ return this.inner().longTermRetentionBackupResourceId();
+ }
+
@Override
public String name() {
return this.inner().name();
@@ -234,6 +239,16 @@ public ManagedDatabaseImpl withCreateMode(ManagedDatabaseCreateMode createMode)
return this;
}
+ @Override
+ public ManagedDatabaseImpl withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId) {
+ if (isInCreateMode()) {
+ this.inner().withLongTermRetentionBackupResourceId(longTermRetentionBackupResourceId);
+ } else {
+ this.updateParameter.withLongTermRetentionBackupResourceId(longTermRetentionBackupResourceId);
+ }
+ return this;
+ }
+
@Override
public ManagedDatabaseImpl withRecoverableDatabaseId(String recoverableDatabaseId) {
if (isInCreateMode()) {
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseInner.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseInner.java
index d02e6a1de06e0..806d6c3934e29 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseInner.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ManagedDatabaseInner.java
@@ -29,7 +29,7 @@ public class ManagedDatabaseInner extends Resource {
/**
* Status of the database. Possible values include: 'Online', 'Offline',
- * 'Shutdown', 'Creating', 'Inaccessible', 'Updating'.
+ * 'Shutdown', 'Creating', 'Inaccessible', 'Restoring', 'Updating'.
*/
@JsonProperty(value = "properties.status", access = JsonProperty.Access.WRITE_ONLY)
private ManagedDatabaseStatus status;
@@ -77,7 +77,7 @@ public class ManagedDatabaseInner extends Resource {
* by restoring a geo-replicated backup. RecoverableDatabaseId must be
* specified as the recoverable database resource ID to restore. Possible
* values include: 'Default', 'RestoreExternalBackup',
- * 'PointInTimeRestore', 'Recovery'.
+ * 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'.
*/
@JsonProperty(value = "properties.createMode")
private ManagedDatabaseCreateMode createMode;
@@ -125,6 +125,13 @@ public class ManagedDatabaseInner extends Resource {
@JsonProperty(value = "properties.recoverableDatabaseId")
private String recoverableDatabaseId;
+ /**
+ * The name of the Long Term Retention backup to be used for restore of
+ * this managed database.
+ */
+ @JsonProperty(value = "properties.longTermRetentionBackupResourceId")
+ private String longTermRetentionBackupResourceId;
+
/**
* Get collation of the managed database.
*
@@ -146,7 +153,7 @@ public ManagedDatabaseInner withCollation(String collation) {
}
/**
- * Get status of the database. Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Updating'.
+ * Get status of the database. Possible values include: 'Online', 'Offline', 'Shutdown', 'Creating', 'Inaccessible', 'Restoring', 'Updating'.
*
* @return the status value
*/
@@ -222,7 +229,7 @@ public ManagedDatabaseInner withCatalogCollation(CatalogCollationType catalogCol
}
/**
- * Get managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery'.
+ * Get managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'.
*
* @return the createMode value
*/
@@ -231,7 +238,7 @@ public ManagedDatabaseCreateMode createMode() {
}
/**
- * Set managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery'.
+ * Set managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. Possible values include: 'Default', 'RestoreExternalBackup', 'PointInTimeRestore', 'Recovery', 'RestoreLongTermRetentionBackup'.
*
* @param createMode the createMode value to set
* @return the ManagedDatabaseInner object itself.
@@ -350,4 +357,24 @@ public ManagedDatabaseInner withRecoverableDatabaseId(String recoverableDatabase
return this;
}
+ /**
+ * Get the name of the Long Term Retention backup to be used for restore of this managed database.
+ *
+ * @return the longTermRetentionBackupResourceId value
+ */
+ public String longTermRetentionBackupResourceId() {
+ return this.longTermRetentionBackupResourceId;
+ }
+
+ /**
+ * Set the name of the Long Term Retention backup to be used for restore of this managed database.
+ *
+ * @param longTermRetentionBackupResourceId the longTermRetentionBackupResourceId value to set
+ * @return the ManagedDatabaseInner object itself.
+ */
+ public ManagedDatabaseInner withLongTermRetentionBackupResourceId(String longTermRetentionBackupResourceId) {
+ this.longTermRetentionBackupResourceId = longTermRetentionBackupResourceId;
+ return this;
+ }
+
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelImpl.java
index 2479cc3ff241c..8754a664e7d3e 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelImpl.java
@@ -10,8 +10,8 @@
import com.microsoft.azure.management.sql.v2017_03_01_preview.SensitivityLabel;
import com.microsoft.azure.arm.model.implementation.CreatableUpdatableImpl;
-import com.microsoft.azure.management.sql.v2017_03_01_preview.SensitivityLabelSource;
import rx.Observable;
+import com.microsoft.azure.management.sql.v2017_03_01_preview.SensitivityLabelRank;
class SensitivityLabelImpl extends CreatableUpdatableImpl implements SensitivityLabel, SensitivityLabel.Definition, SensitivityLabel.Update {
private final SqlManager manager;
@@ -21,7 +21,6 @@ class SensitivityLabelImpl extends CreatableUpdatableImpl updateResourceAsync() {
@Override
protected Observable getInnerAsync() {
SensitivityLabelsInner client = this.manager().inner().sensitivityLabels();
- return client.getAsync(this.resourceGroupName, this.serverName, this.databaseName, this.schemaName, this.tableName, this.columnName, this.sensitivityLabelSource);
+ return client.getAsync(this.resourceGroupName, this.serverName, this.databaseName, this.schemaName, this.tableName, this.columnName);
}
@Override
@@ -113,6 +111,11 @@ public String name() {
return this.inner().name();
}
+ @Override
+ public SensitivityLabelRank rank() {
+ return this.inner().rank();
+ }
+
@Override
public String type() {
return this.inner().type();
@@ -153,4 +156,10 @@ public SensitivityLabelImpl withLabelName(String labelName) {
return this;
}
+ @Override
+ public SensitivityLabelImpl withRank(SensitivityLabelRank rank) {
+ this.inner().withRank(rank);
+ return this;
+ }
+
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelInner.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelInner.java
index 521015f7fb240..9554dd9f0ea20 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelInner.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelInner.java
@@ -8,6 +8,7 @@
package com.microsoft.azure.management.sql.v2017_03_01_preview.implementation;
+import com.microsoft.azure.management.sql.v2017_03_01_preview.SensitivityLabelRank;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
import com.microsoft.azure.ProxyResource;
@@ -49,6 +50,12 @@ public class SensitivityLabelInner extends ProxyResource {
@JsonProperty(value = "properties.isDisabled", access = JsonProperty.Access.WRITE_ONLY)
private Boolean isDisabled;
+ /**
+ * Possible values include: 'None', 'Low', 'Medium', 'High', 'Critical'.
+ */
+ @JsonProperty(value = "properties.rank")
+ private SensitivityLabelRank rank;
+
/**
* Get the label name.
*
@@ -138,4 +145,24 @@ public Boolean isDisabled() {
return this.isDisabled;
}
+ /**
+ * Get possible values include: 'None', 'Low', 'Medium', 'High', 'Critical'.
+ *
+ * @return the rank value
+ */
+ public SensitivityLabelRank rank() {
+ return this.rank;
+ }
+
+ /**
+ * Set possible values include: 'None', 'Low', 'Medium', 'High', 'Critical'.
+ *
+ * @param rank the rank value to set
+ * @return the SensitivityLabelInner object itself.
+ */
+ public SensitivityLabelInner withRank(SensitivityLabelRank rank) {
+ this.rank = rank;
+ return this;
+ }
+
}
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelsImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelsImpl.java
index 54e8c11323e04..e3e500d584b2a 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelsImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/SensitivityLabelsImpl.java
@@ -10,7 +10,6 @@
package com.microsoft.azure.management.sql.v2017_03_01_preview.implementation;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
-import com.microsoft.azure.management.sql.v2017_03_01_preview.SensitivityLabelSource;
import com.microsoft.azure.management.sql.v2017_03_01_preview.SensitivityLabels;
import rx.Completable;
import rx.Observable;
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerBlobAuditingPolicyImpl.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerBlobAuditingPolicyImpl.java
index aeaef86f68f08..8ef4adc3f43bb 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerBlobAuditingPolicyImpl.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerBlobAuditingPolicyImpl.java
@@ -95,6 +95,11 @@ public String name() {
return this.inner().name();
}
+ @Override
+ public Integer queueDelayMs() {
+ return this.inner().queueDelayMs();
+ }
+
@Override
public Integer retentionDays() {
return this.inner().retentionDays();
@@ -156,6 +161,12 @@ public ServerBlobAuditingPolicyImpl withIsStorageSecondaryKeyInUse(Boolean isSto
return this;
}
+ @Override
+ public ServerBlobAuditingPolicyImpl withQueueDelayMs(Integer queueDelayMs) {
+ this.inner().withQueueDelayMs(queueDelayMs);
+ return this;
+ }
+
@Override
public ServerBlobAuditingPolicyImpl withRetentionDays(Integer retentionDays) {
this.inner().withRetentionDays(retentionDays);
diff --git a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerBlobAuditingPolicyInner.java b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerBlobAuditingPolicyInner.java
index d2e3e69e66c42..07d7822d56ebc 100644
--- a/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerBlobAuditingPolicyInner.java
+++ b/sdk/sql/mgmt-v2017_03_01_preview/src/main/java/com/microsoft/azure/management/sql/v2017_03_01_preview/implementation/ServerBlobAuditingPolicyInner.java
@@ -31,15 +31,23 @@ public class ServerBlobAuditingPolicyInner extends ProxyResource {
/**
* Specifies the blob storage endpoint (e.g.
* https://MyAccount.blob.core.windows.net). If state is Enabled,
- * storageEndpoint is required.
+ * storageEndpoint or isAzureMonitorTargetEnabled is required.
*/
@JsonProperty(value = "properties.storageEndpoint")
private String storageEndpoint;
/**
- * Specifies the identifier key of the auditing storage account. If state
- * is Enabled and storageEndpoint is specified, storageAccountAccessKey is
- * required.
+ * Specifies the identifier key of the auditing storage account.
+ * If state is Enabled and storageEndpoint is specified, not specifying the
+ * storageAccountAccessKey will use SQL server system-assigned managed
+ * identity to access the storage.
+ * Prerequisites for using managed identity authentication:
+ * 1. Assign SQL Server a system-assigned managed identity in Azure Active
+ * Directory (AAD).
+ * 2. Grant SQL Server identity access to the storage account by adding
+ * 'Storage Blob Data Contributor' RBAC role to the server identity.
+ * For more information, see [Auditing to storage using Managed Identity
+ * authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*/
@JsonProperty(value = "properties.storageAccountAccessKey")
private String storageAccountAccessKey;
@@ -163,6 +171,15 @@ public class ServerBlobAuditingPolicyInner extends ProxyResource {
@JsonProperty(value = "properties.isAzureMonitorTargetEnabled")
private Boolean isAzureMonitorTargetEnabled;
+ /**
+ * Specifies the amount of time in milliseconds that can elapse before
+ * audit actions are forced to be processed.
+ * The default minimum value is 1000 (1 second). The maximum is
+ * 2,147,483,647.
+ */
+ @JsonProperty(value = "properties.queueDelayMs")
+ private Integer queueDelayMs;
+
/**
* Get specifies the state of the policy. If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled are required. Possible values include: 'Enabled', 'Disabled'.
*
@@ -184,7 +201,7 @@ public ServerBlobAuditingPolicyInner withState(BlobAuditingPolicyState state) {
}
/**
- * Get specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
+ * Get specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
*
* @return the storageEndpoint value
*/
@@ -193,7 +210,7 @@ public String storageEndpoint() {
}
/**
- * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required.
+ * Set specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required.
*
* @param storageEndpoint the storageEndpoint value to set
* @return the ServerBlobAuditingPolicyInner object itself.
@@ -204,7 +221,12 @@ public ServerBlobAuditingPolicyInner withStorageEndpoint(String storageEndpoint)
}
/**
- * Get specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
+ * Get specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*
* @return the storageAccountAccessKey value
*/
@@ -213,7 +235,12 @@ public String storageAccountAccessKey() {
}
/**
- * Set specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required.
+ * Set specifies the identifier key of the auditing storage account.
+ If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
+ Prerequisites for using managed identity authentication:
+ 1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
+ 2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
+ For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355).
*
* @param storageAccountAccessKey the storageAccountAccessKey value to set
* @return the ServerBlobAuditingPolicyInner object itself.
@@ -425,4 +452,26 @@ public ServerBlobAuditingPolicyInner withIsAzureMonitorTargetEnabled(Boolean isA
return this;
}
+ /**
+ * Get specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
+ *
+ * @return the queueDelayMs value
+ */
+ public Integer queueDelayMs() {
+ return this.queueDelayMs;
+ }
+
+ /**
+ * Set specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
+ The default minimum value is 1000 (1 second). The maximum is 2,147,483,647.
+ *
+ * @param queueDelayMs the queueDelayMs value to set
+ * @return the ServerBlobAuditingPolicyInner object itself.
+ */
+ public ServerBlobAuditingPolicyInner withQueueDelayMs(Integer queueDelayMs) {
+ this.queueDelayMs = queueDelayMs;
+ return this;
+ }
+
}