Skip to content

Commit 4268bfc

Browse files
committed
2 parents c64b91c + a1068ad commit 4268bfc

File tree

95 files changed

+102651
-59839
lines changed

Some content is hidden

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

95 files changed

+102651
-59839
lines changed

src/GuestConfiguration/GuestConfiguration/help/Get-AzVMGuestPolicyStatus.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ Get-AzVMGuestPolicyStatus [-ResourceGroupName] <String> [-VMName] <String> [-Ini
3030
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3131
```
3232

33-
### ReportIdScope
33+
### IdScope
3434
```
35-
Get-AzVMGuestPolicyStatus [-ReportId] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
35+
Get-AzVMGuestPolicyStatus [-Id] <String> [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
3636
```
3737

3838
## DESCRIPTION
@@ -115,13 +115,13 @@ Accept pipeline input: False
115115
Accept wildcard characters: False
116116
```
117117
118-
### -ReportId
119-
Report Id of a Guest Configuration policy report.
120-
A policy whose definition type is Initiative and category is Guest Configuration must be assigned to a scope to get reports.
118+
### -Id
119+
Id of a Guest Configuration policy status.
120+
A policy where definition type is Initiative and category is Guest Configuration must be assigned to a scope to get statuses.
121121
122122
```yaml
123123
Type: System.String
124-
Parameter Sets: ReportIdScope
124+
Parameter Sets: IdScope
125125
Aliases:
126126

127127
Required: True
@@ -172,9 +172,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
172172
173173
## OUTPUTS
174174
175-
### System.Collections.Generic.IList`1[[Microsoft.Azure.Management.GuestConfiguration.Models.GuestConfigurationAssignment, Microsoft.Azure.Management.GuestConfiguration, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
176-
177-
### System.Collections.Generic.IList`1[[Microsoft.Azure.Management.GuestConfiguration.Models.GuestConfigurationAssignmentReport, Microsoft.Azure.Management.GuestConfiguration, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
175+
### [Microsoft.Azure.Management.GuestConfiguration.Models.PolicyStatusDetailed, Microsoft.Azure.Management.GuestConfiguration, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]
178176
179177
## NOTES
180178

src/GuestConfiguration/GuestConfiguration/help/Get-AzVMGuestPolicyStatusHistory.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ An initiative is a policy of definition type "Initiative".
1515

1616
### VmScope (Default)
1717
```
18-
Get-AzVMGuestPolicyStatusHistory [-ResourceGroupName] <String> [-VMName] <String> [-ShowOnlyChange]
19-
[-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
18+
Get-AzVMGuestPolicyStatusHistory [-ResourceGroupName] <String> [-VMName] <String>
19+
[-ShowOnlyChange] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]
2020
```
2121

2222
### InitiativeIdScope
@@ -40,29 +40,29 @@ Use Get-AzVMGuestPolicyStatus cmdlet to get details of a single compliance statu
4040

4141
### Example 1
4242
```
43-
PS C:\> Get-AzVMGuestPolicyStatusHistory -ResourceGroupName "MyResourceGroupName" -VMName "MyVMName" -InitiativeId "/providers/Microsoft.Authorization/policySetDefinitions/3fa7cbf5-c0a4-4a59-85a5-cca4d996d5af" -ShowOnlyChanges
43+
PS C:\> Get-AzVMGuestPolicyStatusHistory -ResourceGroupName "MyResourceGroupName" -VMName "MyVMName" -InitiativeId "/providers/Microsoft.Authorization/policySetDefinitions/3fa7cbf5-c0a4-4a59-85a5-cca4d996d5af" -ShowOnlyChange
4444
```
4545

4646
Gets compliance status history by initiative Id.
47-
ShowOnlyChanges switch shows only historical status changes.
47+
ShowOnlyChange switch shows only historical status changes.
4848
Skips statuses that have not changed between two compliance checks.
4949

5050
### Example 2
5151
```
52-
PS C:\> Get-AzVMGuestPolicyStatusHistory -ResourceGroupName "MyResourceGroupName" -VMName "MyVMName" -InitiativeName "b5a822e0-ba98-4e54-9278-5d9833aa9b17" -ShowOnlyChanges
52+
PS C:\> Get-AzVMGuestPolicyStatusHistory -ResourceGroupName "MyResourceGroupName" -VMName "MyVMName" -InitiativeName "b5a822e0-ba98-4e54-9278-5d9833aa9b17" -ShowOnlyChange
5353
```
5454

5555
Gets compliance status history by initiative name.
56-
ShowOnlyChanges switch shows only historical status changes.
56+
ShowOnlyChange switch shows only historical status changes.
5757
Skips statuses that have not changed between two compliance checks.
5858

5959
### Example 3
6060
```
61-
PS C:\> Get-AzVMGuestPolicyStatusHistory -ResourceGroupName "MyResourceGroupName" -VMName "MyVMName" -ShowOnlyChanges
61+
PS C:\> Get-AzVMGuestPolicyStatusHistory -ResourceGroupName "MyResourceGroupName" -VMName "MyVMName" -ShowOnlyChange
6262
```
6363

6464
Gets compliance status history for all guest configuration policies assigned to the VM.
65-
ShowOnlyChanges switch shows only historical status changes.
65+
ShowOnlyChange switch shows only historical status changes.
6666
Skips statuses that have not changed between two compliance checks.
6767

6868
### Example 4
@@ -195,8 +195,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
195195
### System.Management.Automation.SwitchParameter
196196
## OUTPUTS
197197
198-
### System.Collections.Generic.IList`1[[Microsoft.Azure.Management.GuestConfiguration.Models.GuestConfigurationAssignment, Microsoft.Azure.Management.GuestConfiguration, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
199-
### System.Collections.Generic.IList`1[[Microsoft.Azure.Management.GuestConfiguration.Models.GuestConfigurationAssignmentReport, Microsoft.Azure.Management.GuestConfiguration, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]
198+
### [Microsoft.Azure.Management.GuestConfiguration.Models.PolicyStatus, Microsoft.Azure.Management.GuestConfiguration, Version=0.9.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]
200199
## NOTES
201200
202201
## RELATED LINKS

src/Sql/Sql.Test/ScenarioTests/BlobAuditingTests.cs renamed to src/Sql/Sql.Test/ScenarioTests/AuditingTests.cs

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,22 @@
2020

2121
namespace Microsoft.Azure.Commands.Sql.Test.ScenarioTests
2222
{
23-
public class BlobAuditingTests : SqlTestsBase
23+
public class AuditingTests : SqlTestsBase
2424
{
2525
protected override void SetupManagementClients(RestTestFramework.MockContext context)
2626
{
2727
var sqlClient = GetSqlClient(context);
2828
var storageV2Client = GetStorageManagementClient(context);
2929
var newResourcesClient = GetResourcesClient(context);
30-
Helper.SetupSomeOfManagementClients(sqlClient, storageV2Client, newResourcesClient);
30+
var monitorManagementClient = GetMonitorManagementClient(context);
31+
var eventHubManagementClient = GetEventHubManagementClient(context);
32+
var operationalInsightsManagementClient = GetOperationalInsightsManagementClient(context);
33+
Helper.SetupSomeOfManagementClients(sqlClient, storageV2Client, storageV2Client,
34+
newResourcesClient, monitorManagementClient, eventHubManagementClient,
35+
operationalInsightsManagementClient);
3136
}
3237

33-
public BlobAuditingTests(ITestOutputHelper output) : base(output)
38+
public AuditingTests(ITestOutputHelper output) : base(output)
3439
{
3540
}
3641

@@ -173,5 +178,35 @@ public void TestExtendedAuditingOnServer()
173178
{
174179
RunPowerShellTest("Test-ExtendedAuditingOnServer");
175180
}
181+
182+
[Fact]
183+
[Trait(Category.AcceptanceType, Category.CheckIn)]
184+
[Trait(Category.RunType, Category.LiveOnly)]
185+
public void TestAuditingOnDatabase()
186+
{
187+
RunPowerShellTest("Test-AuditingOnDatabase");
188+
}
189+
190+
[Fact]
191+
[Trait(Category.AcceptanceType, Category.CheckIn)]
192+
[Trait(Category.RunType, Category.LiveOnly)]
193+
public void TestAuditingOnServer()
194+
{
195+
RunPowerShellTest("Test-AuditingOnServer");
196+
}
197+
198+
[Fact]
199+
[Trait(Category.AcceptanceType, Category.CheckIn)]
200+
public void TestNewDatabaseDiagnosticsAreCreatedOnNeed()
201+
{
202+
RunPowerShellTest("Test-NewDatabaseDiagnosticsAreCreatedOnNeed");
203+
}
204+
205+
[Fact]
206+
[Trait(Category.AcceptanceType, Category.CheckIn)]
207+
public void TestNewServerDiagnosticsAreCreatedOnNeed()
208+
{
209+
RunPowerShellTest("Test-NewServerDiagnosticsAreCreatedOnNeed");
210+
}
176211
}
177212
}

0 commit comments

Comments
 (0)