Skip to content

Commit d4fd33a

Browse files
committed
Update help files.
Update help files.
1 parent 8788cc2 commit d4fd33a

File tree

7 files changed

+124
-140
lines changed

7 files changed

+124
-140
lines changed

src/ResourceManager/Sql/Commands.Sql/Auditing/AuditingHelpMessages.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This parameter is not required.
1010
If you do not specify this parameter, the cmdlet uses the storage account that was defined previously as part of the auditing policy.
1111
If this is the first time an auditing policy is defined and you do not specify this parameter, the cmdlet fails.";
1212

13-
public const string AuditStorageAccountSubscriptionIdHelpMessage = "Specifies the id of the storage account subscription";
13+
public const string AuditStorageAccountSubscriptionIdHelpMessage = "Specifies storage account subscription id";
1414

1515
public const string StorageKeyTypeHelpMessage = "Specifies which of the storage access keys to use.";
1616

src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/AuditingSettings/SetAzureSqlDatabaseAuditing.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class SetAzureSqlDatabaseAuditing : SqlDatabaseAuditingSettingsCmdletBase
6161
public string StorageAccountName { get; set; }
6262

6363
/// <summary>
64-
/// Gets or sets the id of the storage account subscription to use.
64+
/// Gets or sets storage account subscription id.
6565
/// </summary>
6666
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = AuditingHelpMessages.AuditStorageAccountSubscriptionIdHelpMessage)]
6767
[ValidateNotNullOrEmpty]

src/ResourceManager/Sql/Commands.Sql/Auditing/Cmdlet/AuditingSettings/SetAzureSqlServerAuditing.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public class SetAzureSqlServerAuditing : SqlServerAuditingSettingsCmdletBase
5555
public string StorageAccountName { get; set; }
5656

5757
/// <summary>
58-
/// Gets or sets the id of the storage account subscription to use.
58+
/// Gets or sets storage account subscription id.
5959
/// </summary>
6060
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = AuditingHelpMessages.AuditStorageAccountSubscriptionIdHelpMessage)]
6161
[ValidateNotNullOrEmpty]

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlDatabaseAuditing.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,17 @@ To use the cmdlet, use the *ResourceGroupName*, *ServerName*, and *DatabaseName*
2727
### Example 1: Get the auditing settings of an Azure SQL database
2828
```
2929
PS C:\>Get-AzureRmSqlDatabaseAuditing -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01"
30-
DatabaseName : database01
31-
AuditAction : {}
32-
AuditActionGroup : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP,
33-
BATCH_COMPLETED_GROUP, ...}
34-
ResourceGroupName : resourcegroup01
35-
ServerName : server01
36-
AuditState : Enabled
37-
StorageAccountName : mystorage
38-
StorageKeyType : Primary
39-
RetentionInDays : 0
30+
DatabaseName : database01
31+
AuditAction : {}
32+
AuditActionGroup : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP,
33+
BATCH_COMPLETED_GROUP, ...}
34+
ResourceGroupName : resourcegroup01
35+
ServerName : server01
36+
AuditState : Enabled
37+
StorageAccountName : mystorage
38+
StorageKeyType : Primary
39+
RetentionInDays : 0
40+
StorageAccountSubscriptionId : 7fe3301d-31d3-4668-af5e-211a890ba6e3
4041
```
4142

4243
## PARAMETERS

src/ResourceManager/Sql/Commands.Sql/help/Get-AzureRmSqlServerAuditing.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@ This cmdlet returns a policy that is used by the Azure SQL databases that are de
2828
### Example 1: Get the auditing settings of an Azure SQL server
2929
```
3030
PS C:\>Get-AzureRmSqlServerAuditing -ResourceGroupName "resourcegroup01" -ServerName "server01"
31-
AuditActionGroup : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP,
32-
BATCH_COMPLETED_GROUP, ...}
33-
ResourceGroupName : resourcegroup01
34-
ServerName : server01
35-
AuditState : Enabled
36-
StorageAccountName : mystorage
37-
StorageKeyType : Primary
38-
RetentionInDays : 0
31+
AuditActionGroup : {SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP, FAILED_DATABASE_AUTHENTICATION_GROUP,
32+
BATCH_COMPLETED_GROUP, ...}
33+
ResourceGroupName : resourcegroup01
34+
ServerName : server01
35+
AuditState : Enabled
36+
StorageAccountName : mystorage
37+
StorageKeyType : Primary
38+
RetentionInDays : 0
39+
StorageAccountSubscriptionId : 7fe3301d-31d3-4668-af5e-211a890ba6e3
3940
```
4041

4142
## PARAMETERS

src/ResourceManager/Sql/Commands.Sql/help/Set-AzureRmSqlDatabaseAuditing.md

Lines changed: 58 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
---
1+
---
22
external help file: Microsoft.Azure.Commands.Sql.dll-Help.xml
33
Module Name: AzureRM.Sql
44
ms.assetid: F7EF35E3-BC53-43D9-A71E-0B4316260A08
@@ -15,9 +15,10 @@ Changes the auditing settings for an Azure SQL database.
1515

1616
```
1717
Set-AzureRmSqlDatabaseAuditing -State <String> [-PassThru] [-AuditActionGroup <AuditActionGroups[]>]
18-
[-AuditAction <String[]>] [-StorageAccountName <String>] [-StorageKeyType <String>]
19-
[-RetentionInDays <UInt32>] [-ServerName] <String> [-DatabaseName] <String> [-ResourceGroupName] <String>
20-
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
18+
[-AuditAction <String[]>] [-StorageAccountName <String>] [-StorageAccountSubscriptionId <Guid>]
19+
[-StorageKeyType <String>] [-RetentionInDays <UInt32>] [-ServerName] <String> [-DatabaseName] <String>
20+
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
21+
[<CommonParameters>]
2122
```
2223

2324
## DESCRIPTION
@@ -44,33 +45,33 @@ PS C:\>Set-AzureRmSqlDatabaseAuditing -State Enabled -ResourceGroupName "Resourc
4445
PS C:\>Set-AzureRmSqlDatabaseAuditing -State Disabled -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01"
4546
```
4647

48+
### Example 3: Enable the auditing policy of an Azure SQL database using a storage account from a different subscription
49+
```
50+
PS C:\>Set-AzureRmSqlDatabaseAuditing -State Enabled -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -StorageAccountName "Storage22" -StorageAccountSubscriptionId "7fe3301d-31d3-4668-af5e-211a890ba6e3"
51+
4752
## PARAMETERS
4853
4954
### -AuditAction
50-
The set of audit actions.
51-
The supported actions to audit are:
52-
SELECT
53-
UPDATE
54-
INSERT
55-
DELETE
56-
EXECUTE
57-
RECEIVE
58-
REFERENCES
59-
55+
The set of audit actions.
56+
The supported actions to audit are:
57+
SELECT
58+
UPDATE
59+
INSERT
60+
DELETE
61+
EXECUTE
62+
RECEIVE
63+
REFERENCES
6064
The general form for defining an action to be audited is:
6165
6266
[action] ON [object] BY [principal]
6367
6468
Note that [object] in the above format can refer to an object like a table, view, or stored procedure, or an entire database or schema. For the latter cases, the forms DATABASE::[dbname] and SCHEMA::[schemaname] are used, respectively.
6569
66-
For example:
67-
SELECT on dbo.myTable by public
68-
SELECT on DATABASE::myDatabase by public
69-
SELECT on SCHEMA::mySchema by public
70-
71-
For more information, see https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions.
72-
73-
```yaml
70+
For example:
71+
SELECT on dbo.myTable by public
72+
SELECT on DATABASE::myDatabase by public
73+
SELECT on SCHEMA::mySchema by public
74+
For more information, see https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-actions.```yaml
7475
Type: String[]
7576
Parameter Sets: (All)
7677
Aliases:
@@ -83,16 +84,12 @@ Accept wildcard characters: False
8384
```
8485

8586
### -AuditActionGroup
86-
The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:
87-
88-
"BATCH_COMPLETED_GROUP",
89-
"SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP",
90-
"FAILED_DATABASE_AUTHENTICATION_GROUP"
87+
The recommended set of action groups to use is the following combination - this will audit all the queries and stored procedures executed against the database, as well as successful and failed logins:
9188

92-
This above combination is also the set that is configured by default. These groups cover all SQL statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs.
93-
For more information, see https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups.
94-
95-
```yaml
89+
"BATCH_COMPLETED_GROUP",
90+
"SUCCESSFUL_DATABASE_AUTHENTICATION_GROUP",
91+
"FAILED_DATABASE_AUTHENTICATION_GROUP"
92+
This above combination is also the set that is configured by default. These groups cover all SQL statements and stored procedures executed against the database, and should not be used in combination with other groups as this will result in duplicate audit logs. For more information, see https://docs.microsoft.com/en-us/sql/relational-databases/security/auditing/sql-server-audit-action-groups-and-actions#database-level-audit-action-groups.```yaml
9693
Type: AuditActionGroups[]
9794
Parameter Sets: (All)
9895
Aliases:
@@ -106,9 +103,7 @@ Accept wildcard characters: False
106103
```
107104
108105
### -DatabaseName
109-
SQL Database name.
110-
111-
```yaml
106+
SQL Database name.```yaml
112107
Type: String
113108
Parameter Sets: (All)
114109
Aliases:
@@ -121,9 +116,7 @@ Accept wildcard characters: False
121116
```
122117

123118
### -DefaultProfile
124-
The credentials, account, tenant, and subscription used for communication with azure.
125-
126-
```yaml
119+
The credentials, account, tenant, and subscription used for communication with azure.```yaml
127120
Type: IAzureContextContainer
128121
Parameter Sets: (All)
129122
Aliases: AzureRmContext, AzureCredential
@@ -136,24 +129,20 @@ Accept wildcard characters: False
136129
```
137130
138131
### -PassThru
139-
{{Fill PassThru Description}}
140-
141-
```yaml
132+
{{Fill PassThru Description}}```yaml
142133
Type: SwitchParameter
143134
Parameter Sets: (All)
144135
Aliases:
145136
146137
Required: False
147138
Position: Named
148-
Default value: None
139+
Default value: False
149140
Accept pipeline input: False
150141
Accept wildcard characters: False
151142
```
152143

153144
### -ResourceGroupName
154-
The name of the resource group.
155-
156-
```yaml
145+
The name of the resource group.```yaml
157146
Type: String
158147
Parameter Sets: (All)
159148
Aliases:
@@ -166,9 +155,7 @@ Accept wildcard characters: False
166155
```
167156
168157
### -RetentionInDays
169-
The number of retention days for the audit logs.
170-
171-
```yaml
158+
The number of retention days for the audit logs.```yaml
172159
Type: UInt32
173160
Parameter Sets: (All)
174161
Aliases:
@@ -181,9 +168,7 @@ Accept wildcard characters: False
181168
```
182169

183170
### -ServerName
184-
SQL Database server name.
185-
186-
```yaml
171+
SQL Database server name.```yaml
187172
Type: String
188173
Parameter Sets: (All)
189174
Aliases:
@@ -196,9 +181,7 @@ Accept wildcard characters: False
196181
```
197182
198183
### -State
199-
The state of the policy.
200-
201-
```yaml
184+
The state of the policy.```yaml
202185
Type: String
203186
Parameter Sets: (All)
204187
Aliases:
@@ -212,12 +195,10 @@ Accept wildcard characters: False
212195
```
213196

214197
### -StorageAccountName
215-
The name of the storage account. Wildcard characters are not permitted.
216-
This parameter is not required.
217-
If you do not specify this parameter, the cmdlet uses the storage account that was defined previously as part of the auditing policy.
218-
If this is the first time an auditing policy is defined and you do not specify this parameter, the cmdlet fails.
219-
220-
```yaml
198+
The name of the storage account. Wildcard characters are not permitted.
199+
This parameter is not required.
200+
If you do not specify this parameter, the cmdlet uses the storage account that was defined previously as part of the auditing policy.
201+
If this is the first time an auditing policy is defined and you do not specify this parameter, the cmdlet fails.```yaml
221202
Type: String
222203
Parameter Sets: (All)
223204
Aliases:
@@ -229,10 +210,21 @@ Accept pipeline input: True (ByPropertyName)
229210
Accept wildcard characters: False
230211
```
231212
232-
### -StorageKeyType
233-
Specifies which of the storage access keys to use.
213+
### -StorageAccountSubscriptionId
214+
Specifies storage account subscription id```yaml
215+
Type: Guid
216+
Parameter Sets: (All)
217+
Aliases:
234218
235-
```yaml
219+
Required: False
220+
Position: Named
221+
Default value: None
222+
Accept pipeline input: True (ByPropertyName)
223+
Accept wildcard characters: False
224+
```
225+
226+
### -StorageKeyType
227+
Specifies which of the storage access keys to use.```yaml
236228
Type: String
237229
Parameter Sets: (All)
238230
Aliases:
@@ -246,31 +238,27 @@ Accept wildcard characters: False
246238
```
247239
248240
### -Confirm
249-
Prompts you for confirmation before running the cmdlet.
250-
251-
```yaml
241+
Prompts you for confirmation before running the cmdlet.```yaml
252242
Type: SwitchParameter
253243
Parameter Sets: (All)
254244
Aliases: cf
255245
256246
Required: False
257247
Position: Named
258-
Default value: None
248+
Default value: False
259249
Accept pipeline input: False
260250
Accept wildcard characters: False
261251
```
262252

263253
### -WhatIf
264-
Shows what would happen if the cmdlet runs. The cmdlet is not run.
265-
266-
```yaml
254+
Shows what would happen if the cmdlet runs. The cmdlet is not run.```yaml
267255
Type: SwitchParameter
268256
Parameter Sets: (All)
269257
Aliases: wi
270258

271259
Required: False
272260
Position: Named
273-
Default value: None
261+
Default value: False
274262
Accept pipeline input: False
275263
Accept wildcard characters: False
276264
```

0 commit comments

Comments
 (0)