Skip to content

Commit ae9ff9f

Browse files
authored
Merge pull request Azure#3379 from haitch/dev
Remove AzureAuditLog as a valid kind of datasource as it's been replaced by AzureActivityLog
2 parents 9fbf679 + c6de42e commit ae9ff9f

11 files changed

+1813
-1697
lines changed

src/ResourceManager/OperationalInsights/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
-->
2020
## Current Release
2121
* Get-AzureRmOperationalInsightsSearchResults no longer requires the Top parameter to retrieve results
22+
* AzureAuditLog is nolonger a kind for Get-AzureRmOperationalInsightsDataSource.
23+
- Use AzureActivityLog instead.
24+
- All existing datasource has been migrated over to AzureActivityLog.
2225

2326
## Version 2.4.0
2427

src/ResourceManager/OperationalInsights/Commands.OperationalInsights/AzureRM.OperationalInsights.Help.pshproj

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0"?>
1+
<?xml version="1.0"?>
22
<ModuleObject xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" fVersion="1.1" type="Manifest" mclass="Module" useSupports="false">
33
<Name>AzureRM.OperationalInsights</Name>
44
<Version>1.0.11</Version>
@@ -949,18 +949,16 @@
949949
<ReturnTypeDescription />
950950
</GeneralHelp>
951951
<ParamSets>
952-
<CommandParameterSetInfo2 Name="ByWorkspaceName" Params="Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
953952
<CommandParameterSetInfo2 Name="ByWorkspaceObjectByName" Params="Workspace Name Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
954953
<CommandParameterSetInfo2 Name="ByWorkspaceObjectByKind" Params="Workspace Kind Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
955954
<CommandParameterSetInfo2 Name="ByWorkspaceNameByName" Params="ResourceGroupName WorkspaceName Name Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
956955
<CommandParameterSetInfo2 Name="ByWorkspaceNameByKind" Params="ResourceGroupName WorkspaceName Kind Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
957956
</ParamSets>
958957
<Syntax>
959-
<string>Get-AzureRmOperationalInsightsDataSource [-InformationAction &lt;ActionPreference&gt;] [-InformationVariable &lt;String&gt;]</string>
960-
<string>Get-AzureRmOperationalInsightsDataSource [-Workspace] &lt;PSWorkspace&gt; [-Name &lt;String&gt;] [-InformationAction &lt;ActionPreference&gt;] [-InformationVariable &lt;String&gt;]</string>
961-
<string>Get-AzureRmOperationalInsightsDataSource [-Workspace &lt;PSWorkspace&gt;] [-Kind &lt;String&gt; {AzureAuditLog | CustomLog | LinuxPerformanceObject | LinuxSyslog | WindowsEvent | WindowsPerformanceCounter} ] [-InformationAction &lt;ActionPreference&gt;] [-InformationVariable &lt;String&gt;]</string>
962-
<string>Get-AzureRmOperationalInsightsDataSource [-ResourceGroupName] &lt;String&gt; [-WorkspaceName] &lt;String&gt; [-Name] &lt;String&gt; [-InformationAction &lt;ActionPreference&gt;] [-InformationVariable &lt;String&gt;]</string>
963-
<string>Get-AzureRmOperationalInsightsDataSource [-ResourceGroupName &lt;String&gt;] [-WorkspaceName &lt;String&gt;] [-Kind] &lt;String&gt; {AzureAuditLog | CustomLog | LinuxPerformanceObject | LinuxSyslog | WindowsEvent | WindowsPerformanceCounter} [-InformationAction &lt;ActionPreference&gt;] [-InformationVariable &lt;String&gt;]</string>
958+
<string>Get-AzureRmOperationalInsightsDataSource [-Workspace] &lt;PSWorkspace&gt; [-Name &lt;String&gt;] </string>
959+
<string>Get-AzureRmOperationalInsightsDataSource [-Workspace &lt;PSWorkspace&gt;] [-Kind &lt;String&gt; {AzureActivityLog | CustomLog | LinuxPerformanceObject | LinuxSyslog | WindowsEvent | WindowsPerformanceCounter} ]</string>
960+
<string>Get-AzureRmOperationalInsightsDataSource [-ResourceGroupName] &lt;String&gt; [-WorkspaceName] &lt;String&gt; [-Name] &lt;String&gt;</string>
961+
<string>Get-AzureRmOperationalInsightsDataSource [-ResourceGroupName &lt;String&gt;] [-WorkspaceName &lt;String&gt;] [-Kind] &lt;String&gt; {AzureActivityLog | CustomLog | LinuxPerformanceObject | LinuxSyslog | WindowsEvent | WindowsPerformanceCounter} </string>
964962
</Syntax>
965963
<Parameters>
966964
<ParameterDescription type="ActionPreference" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">

src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Commands.OperationalInsights.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@
154154
<Compile Include="Models\DataSourcePropertiesPerKind\PSLinuxSyslogDataSourceProperties.cs" />
155155
<Compile Include="Models\DataSourcePropertiesPerKind\PSLinuxSyslogCollectionDataSourceProperties.cs" />
156156
<Compile Include="Models\DataSourcePropertiesPerKind\PSWindowsEventDataSourceProperties.cs" />
157-
<Compile Include="Models\DataSourcePropertiesPerKind\PSAzureAuditLogDataSourceProperties.cs" />
158157
<Compile Include="Models\PSCoreSummary.cs" />
159158
<Compile Include="Models\PSDataSource.cs" />
160159
<Compile Include="Models\PSSearchError.cs" />

src/ResourceManager/OperationalInsights/Commands.OperationalInsights/DataSources/GetAzureOperationalInsightsDataSourceCommand.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ public class GetAzureOperationalInsightsDataSourceCommand : OperationalInsightsB
6969

7070
public override void ExecuteCmdlet()
7171
{
72+
if (ParameterSetName == ByWorkspaceName)
73+
{
74+
WriteWarning(Properties.Resources.GetWorkspaceDataSourceParameterSetWarning);
75+
return;
76+
}
7277
if (ParameterSetName == ByWorkspaceObjectByName || ParameterSetName == ByWorkspaceObjectByKind)
7378
{
7479
ResourceGroupName = Workspace.ResourceGroupName;
@@ -95,6 +100,11 @@ public override void ExecuteCmdlet()
95100
}
96101

97102
if (ParameterSetName == ByWorkspaceObjectByKind || ParameterSetName == ByWorkspaceNameByKind) {
103+
if (Kind == PSDataSourceKinds.AzureAuditLog)
104+
{
105+
WriteWarning(Properties.Resources.DeprecateAzureAuditLogDataSource);
106+
return;
107+
}
98108
WriteObject(OperationalInsightsClient.FilterPSDataSources(ResourceGroupName, WorkspaceName, Kind), true);
99109
return;
100110
}

0 commit comments

Comments
 (0)