Skip to content

Remove AzureAuditLog as a valid kind of datasource as it's been replaced by AzureActivityLog #3379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/ResourceManager/OperationalInsights/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
-->
## Current Release
* Get-AzureRmOperationalInsightsSearchResults no longer requires the Top parameter to retrieve results
* AzureAuditLog is nolonger a kind for Get-AzureRmOperationalInsightsDataSource.
- Use AzureActivityLog instead.
- All existing datasource has been migrated over to AzureActivityLog.

## Version 2.4.0

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<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">
<Name>AzureRM.OperationalInsights</Name>
<Version>1.0.11</Version>
Expand Down Expand Up @@ -949,18 +949,16 @@
<ReturnTypeDescription />
</GeneralHelp>
<ParamSets>
<CommandParameterSetInfo2 Name="ByWorkspaceName" Params="Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
<CommandParameterSetInfo2 Name="ByWorkspaceObjectByName" Params="Workspace Name Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
<CommandParameterSetInfo2 Name="ByWorkspaceObjectByKind" Params="Workspace Kind Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
<CommandParameterSetInfo2 Name="ByWorkspaceNameByName" Params="ResourceGroupName WorkspaceName Name Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
<CommandParameterSetInfo2 Name="ByWorkspaceNameByKind" Params="ResourceGroupName WorkspaceName Kind Verbose Debug ErrorAction WarningAction InformationAction ErrorVariable WarningVariable InformationVariable OutVariable OutBuffer PipelineVariable" />
</ParamSets>
<Syntax>
<string>Get-AzureRmOperationalInsightsDataSource [-InformationAction &lt;ActionPreference&gt;] [-InformationVariable &lt;String&gt;]</string>
<string>Get-AzureRmOperationalInsightsDataSource [-Workspace] &lt;PSWorkspace&gt; [-Name &lt;String&gt;] [-InformationAction &lt;ActionPreference&gt;] [-InformationVariable &lt;String&gt;]</string>
<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>
<string>Get-AzureRmOperationalInsightsDataSource [-ResourceGroupName] &lt;String&gt; [-WorkspaceName] &lt;String&gt; [-Name] &lt;String&gt; [-InformationAction &lt;ActionPreference&gt;] [-InformationVariable &lt;String&gt;]</string>
<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>
<string>Get-AzureRmOperationalInsightsDataSource [-Workspace] &lt;PSWorkspace&gt; [-Name &lt;String&gt;] </string>
<string>Get-AzureRmOperationalInsightsDataSource [-Workspace &lt;PSWorkspace&gt;] [-Kind &lt;String&gt; {AzureActivityLog | CustomLog | LinuxPerformanceObject | LinuxSyslog | WindowsEvent | WindowsPerformanceCounter} ]</string>
<string>Get-AzureRmOperationalInsightsDataSource [-ResourceGroupName] &lt;String&gt; [-WorkspaceName] &lt;String&gt; [-Name] &lt;String&gt;</string>
<string>Get-AzureRmOperationalInsightsDataSource [-ResourceGroupName &lt;String&gt;] [-WorkspaceName &lt;String&gt;] [-Kind] &lt;String&gt; {AzureActivityLog | CustomLog | LinuxPerformanceObject | LinuxSyslog | WindowsEvent | WindowsPerformanceCounter} </string>
</Syntax>
<Parameters>
<ParameterDescription type="ActionPreference" varLen="false" required="false" dynamic="false" pipeRemaining="false" pipe="false" pipeProp="false" isPos="false" pos="named" globbing="false">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
<Compile Include="Models\DataSourcePropertiesPerKind\PSLinuxSyslogDataSourceProperties.cs" />
<Compile Include="Models\DataSourcePropertiesPerKind\PSLinuxSyslogCollectionDataSourceProperties.cs" />
<Compile Include="Models\DataSourcePropertiesPerKind\PSWindowsEventDataSourceProperties.cs" />
<Compile Include="Models\DataSourcePropertiesPerKind\PSAzureAuditLogDataSourceProperties.cs" />
<Compile Include="Models\PSCoreSummary.cs" />
<Compile Include="Models\PSDataSource.cs" />
<Compile Include="Models\PSSearchError.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ public class GetAzureOperationalInsightsDataSourceCommand : OperationalInsightsB

public override void ExecuteCmdlet()
{
if (ParameterSetName == ByWorkspaceName)
{
WriteWarning(Properties.Resources.GetWorkspaceDataSourceParameterSetWarning);
return;
}
if (ParameterSetName == ByWorkspaceObjectByName || ParameterSetName == ByWorkspaceObjectByKind)
{
ResourceGroupName = Workspace.ResourceGroupName;
Expand All @@ -95,6 +100,11 @@ public override void ExecuteCmdlet()
}

if (ParameterSetName == ByWorkspaceObjectByKind || ParameterSetName == ByWorkspaceNameByKind) {
if (Kind == PSDataSourceKinds.AzureAuditLog)
{
WriteWarning(Properties.Resources.DeprecateAzureAuditLogDataSource);
return;
}
WriteObject(OperationalInsightsClient.FilterPSDataSources(ResourceGroupName, WorkspaceName, Kind), true);
return;
}
Expand Down
Loading