Skip to content

Commit 82b7021

Browse files
author
SDKAuto
committed
CodeGen from PR 11880 in Azure/azure-rest-api-specs
Merge cd6b8e22f4cc45c247eacb631c012f75cd4b47e8 into 61ab5c845163e77cbdf2acecd5fc305307899a1c
1 parent 33362b5 commit 82b7021

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+3440
-270
lines changed

sdk/sql/mgmt-v2015_05_01_preview/pom.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<parent>
1212
<groupId>com.microsoft.azure</groupId>
1313
<artifactId>azure-arm-parent</artifactId>
14-
<version>1.2.0</version>
15-
<relativePath>../../parents/azure-arm-parent</relativePath>
14+
<version>1.1.0</version>
15+
<relativePath>../../../pom.management.xml</relativePath>
1616
</parent>
1717
<artifactId>azure-mgmt-sql</artifactId>
1818
<version>1.0.0-beta</version>
@@ -71,6 +71,8 @@
7171
<artifactId>azure-arm-client-runtime</artifactId>
7272
<type>test-jar</type>
7373
<scope>test</scope>
74+
<!--Below version for test jar needs to be removed, this will be done as part of v1-runtime 1.6.7-->
75+
<version>1.6.5</version>
7476
</dependency>
7577
</dependencies>
7678
<build>

sdk/sql/mgmt-v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/DatabaseBlobAuditingPolicies.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,15 @@ public interface DatabaseBlobAuditingPolicies extends SupportsCreating<DatabaseB
2828
*/
2929
Observable<DatabaseBlobAuditingPolicy> getAsync(String resourceGroupName, String serverName, String databaseName);
3030

31+
/**
32+
* Lists auditing settings of a database.
33+
*
34+
* @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.
35+
* @param serverName The name of the server.
36+
* @param databaseName The name of the database.
37+
* @throws IllegalArgumentException thrown if parameters fail the validation
38+
* @return the observable for the request
39+
*/
40+
Observable<DatabaseBlobAuditingPolicy> listByDatabaseAsync(final String resourceGroupName, final String serverName, final String databaseName);
41+
3142
}

sdk/sql/mgmt-v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/DatabaseBlobAuditingPolicy.java

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ public interface DatabaseBlobAuditingPolicy extends HasInner<DatabaseBlobAuditin
5454
*/
5555
String name();
5656

57+
/**
58+
* @return the queueDelayMs value.
59+
*/
60+
Integer queueDelayMs();
61+
5762
/**
5863
* @return the retentionDays value.
5964
*/
@@ -189,7 +194,7 @@ interface WithIsAzureMonitorTargetEnabled {
189194
/**
190195
* Specifies isAzureMonitorTargetEnabled.
191196
* @param isAzureMonitorTargetEnabled Specifies whether audit events are sent to Azure Monitor.
192-
In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.
197+
In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true.
193198
When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.
194199
Note that for server level audit you should use the 'master' database as {databaseName}.
195200
Diagnostic Settings URI format:
@@ -213,6 +218,19 @@ interface WithIsStorageSecondaryKeyInUse {
213218
WithCreate withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse);
214219
}
215220

221+
/**
222+
* The stage of the databaseblobauditingpolicy definition allowing to specify QueueDelayMs.
223+
*/
224+
interface WithQueueDelayMs {
225+
/**
226+
* Specifies queueDelayMs.
227+
* @param queueDelayMs Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
228+
The default minimum value is 1000 (1 second). The maximum is 2,147,483,647
229+
* @return the next definition stage
230+
*/
231+
WithCreate withQueueDelayMs(Integer queueDelayMs);
232+
}
233+
216234
/**
217235
* The stage of the databaseblobauditingpolicy definition allowing to specify RetentionDays.
218236
*/
@@ -231,7 +249,12 @@ interface WithRetentionDays {
231249
interface WithStorageAccountAccessKey {
232250
/**
233251
* Specifies storageAccountAccessKey.
234-
* @param storageAccountAccessKey Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required
252+
* @param storageAccountAccessKey Specifies the identifier key of the auditing storage account.
253+
If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
254+
Prerequisites for using managed identity authentication:
255+
1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
256+
2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
257+
For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
235258
* @return the next definition stage
236259
*/
237260
WithCreate withStorageAccountAccessKey(String storageAccountAccessKey);
@@ -255,7 +278,7 @@ interface WithStorageAccountSubscriptionId {
255278
interface WithStorageEndpoint {
256279
/**
257280
* Specifies storageEndpoint.
258-
* @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required
281+
* @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required
259282
* @return the next definition stage
260283
*/
261284
WithCreate withStorageEndpoint(String storageEndpoint);
@@ -266,13 +289,13 @@ interface WithStorageEndpoint {
266289
* the resource to be created (via {@link WithCreate#create()}), but also allows
267290
* for any other optional settings to be specified.
268291
*/
269-
interface WithCreate extends Creatable<DatabaseBlobAuditingPolicy>, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
292+
interface WithCreate extends Creatable<DatabaseBlobAuditingPolicy>, DefinitionStages.WithAuditActionsAndGroups, DefinitionStages.WithIsAzureMonitorTargetEnabled, DefinitionStages.WithIsStorageSecondaryKeyInUse, DefinitionStages.WithQueueDelayMs, DefinitionStages.WithRetentionDays, DefinitionStages.WithStorageAccountAccessKey, DefinitionStages.WithStorageAccountSubscriptionId, DefinitionStages.WithStorageEndpoint {
270293
}
271294
}
272295
/**
273296
* The template for a DatabaseBlobAuditingPolicy update operation, containing all the settings that can be modified.
274297
*/
275-
interface Update extends Appliable<DatabaseBlobAuditingPolicy>, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
298+
interface Update extends Appliable<DatabaseBlobAuditingPolicy>, UpdateStages.WithAuditActionsAndGroups, UpdateStages.WithIsAzureMonitorTargetEnabled, UpdateStages.WithIsStorageSecondaryKeyInUse, UpdateStages.WithQueueDelayMs, UpdateStages.WithRetentionDays, UpdateStages.WithStorageAccountAccessKey, UpdateStages.WithStorageAccountSubscriptionId, UpdateStages.WithStorageEndpoint {
276299
}
277300

278301
/**
@@ -342,7 +365,7 @@ interface WithIsAzureMonitorTargetEnabled {
342365
/**
343366
* Specifies isAzureMonitorTargetEnabled.
344367
* @param isAzureMonitorTargetEnabled Specifies whether audit events are sent to Azure Monitor.
345-
In order to send the events to Azure Monitor, specify 'State' as 'Enabled' and 'IsAzureMonitorTargetEnabled' as true.
368+
In order to send the events to Azure Monitor, specify 'state' as 'Enabled' and 'isAzureMonitorTargetEnabled' as true.
346369
When using REST API to configure auditing, Diagnostic Settings with 'SQLSecurityAuditEvents' diagnostic logs category on the database should be also created.
347370
Note that for server level audit you should use the 'master' database as {databaseName}.
348371
Diagnostic Settings URI format:
@@ -366,6 +389,19 @@ interface WithIsStorageSecondaryKeyInUse {
366389
Update withIsStorageSecondaryKeyInUse(Boolean isStorageSecondaryKeyInUse);
367390
}
368391

392+
/**
393+
* The stage of the databaseblobauditingpolicy update allowing to specify QueueDelayMs.
394+
*/
395+
interface WithQueueDelayMs {
396+
/**
397+
* Specifies queueDelayMs.
398+
* @param queueDelayMs Specifies the amount of time in milliseconds that can elapse before audit actions are forced to be processed.
399+
The default minimum value is 1000 (1 second). The maximum is 2,147,483,647
400+
* @return the next update stage
401+
*/
402+
Update withQueueDelayMs(Integer queueDelayMs);
403+
}
404+
369405
/**
370406
* The stage of the databaseblobauditingpolicy update allowing to specify RetentionDays.
371407
*/
@@ -384,7 +420,12 @@ interface WithRetentionDays {
384420
interface WithStorageAccountAccessKey {
385421
/**
386422
* Specifies storageAccountAccessKey.
387-
* @param storageAccountAccessKey Specifies the identifier key of the auditing storage account. If state is Enabled and storageEndpoint is specified, storageAccountAccessKey is required
423+
* @param storageAccountAccessKey Specifies the identifier key of the auditing storage account.
424+
If state is Enabled and storageEndpoint is specified, not specifying the storageAccountAccessKey will use SQL server system-assigned managed identity to access the storage.
425+
Prerequisites for using managed identity authentication:
426+
1. Assign SQL Server a system-assigned managed identity in Azure Active Directory (AAD).
427+
2. Grant SQL Server identity access to the storage account by adding 'Storage Blob Data Contributor' RBAC role to the server identity.
428+
For more information, see [Auditing to storage using Managed Identity authentication](https://go.microsoft.com/fwlink/?linkid=2114355)
388429
* @return the next update stage
389430
*/
390431
Update withStorageAccountAccessKey(String storageAccountAccessKey);
@@ -408,7 +449,7 @@ interface WithStorageAccountSubscriptionId {
408449
interface WithStorageEndpoint {
409450
/**
410451
* Specifies storageEndpoint.
411-
* @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint is required
452+
* @param storageEndpoint Specifies the blob storage endpoint (e.g. https://MyAccount.blob.core.windows.net). If state is Enabled, storageEndpoint or isAzureMonitorTargetEnabled is required
412453
* @return the next update stage
413454
*/
414455
Update withStorageEndpoint(String storageEndpoint);

sdk/sql/mgmt-v2015_05_01_preview/src/main/java/com/microsoft/azure/management/sql/v2015_05_01_preview/EncryptionProtectors.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
package com.microsoft.azure.management.sql.v2015_05_01_preview;
1010

11+
import rx.Completable;
1112
import rx.Observable;
1213
import com.microsoft.azure.management.sql.v2015_05_01_preview.implementation.EncryptionProtectorInner;
1314
import com.microsoft.azure.management.sql.v2015_05_01_preview.implementation.EncryptionProtectorsInner;
@@ -17,6 +18,16 @@
1718
* Type representing EncryptionProtectors.
1819
*/
1920
public interface EncryptionProtectors extends HasInner<EncryptionProtectorsInner> {
21+
/**
22+
* Revalidates an existing encryption protector.
23+
*
24+
* @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.
25+
* @param serverName The name of the server.
26+
* @throws IllegalArgumentException thrown if parameters fail the validation
27+
* @return the observable for the request
28+
*/
29+
Completable revalidateAsync(String resourceGroupName, String serverName);
30+
2031
/**
2132
* Gets a list of server encryption protectors.
2233
*

0 commit comments

Comments
 (0)