Skip to content

Commit dfecbc0

Browse files
haitchhaitch
authored andcommitted
deprecate and warning instead of remove
1 parent e8f4847 commit dfecbc0

File tree

6 files changed

+21
-2
lines changed

6 files changed

+21
-2
lines changed

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public class GetAzureOperationalInsightsDataSourceCommand : OperationalInsightsB
5757
HelpMessage = "The data source name.")]
5858
[Parameter(ParameterSetName = ByWorkspaceObjectByKind)]
5959
[ValidateSet(
60+
PSDataSourceKinds.AzureAuditLog,
6061
PSDataSourceKinds.AzureActivityLog,
6162
PSDataSourceKinds.CustomLog,
6263
PSDataSourceKinds.LinuxPerformanceObject,
@@ -99,6 +100,11 @@ public override void ExecuteCmdlet()
99100
}
100101

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

src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Microsoft.Azure.Commands.OperationalInsights.dll-Help.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1910,7 +1910,7 @@
19101910
<command:details><command:name>Get-AzureRmOperationalInsightsDataSource</command:name>
19111911
<command:verb>Get</command:verb>
19121912
<command:noun>AzureRmOperationalInsightsDataSource</command:noun>
1913-
<maml:description><maml:para>Gets data sources.
1913+
<maml:description><maml:para>Get datasources under Azure Log Analytics workspace.
19141914
</maml:para>
19151915
</maml:description>
19161916
</command:details>

src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Models/PSDataSource.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public override string ToString()
3535
}
3636

3737
public class PSDataSourceKinds {
38+
public const string AzureAuditLog = "AzureAuditLog";
3839
public const string AzureActivityLog = "AzureActivityLog";
3940
public const string IISLogs = "IISLogs";
4041
public const string WindowsEvent = "WindowsEvent";

src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Properties/Resources.Designer.cs

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ResourceManager/OperationalInsights/Commands.OperationalInsights/Properties/Resources.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,9 @@ Are you sure you want to continue?</value>
158158
<data name="DataSourceWindowsEventNoEventTypeSelected" xml:space="preserve">
159159
<value>Please at least select one type of event to collect by using -CollectErrors -CollectWarnings -CollectInformation</value>
160160
</data>
161+
<data name="DeprecateAzureAuditLogDataSource" xml:space="preserve">
162+
<value>AzureAuditLog datasource has been deprecated, all your existing AzureAuditLog datasource has been migrated to AzureActivityLog.</value>
163+
</data>
161164
<data name="FormattedCloudExceptionMessageTemplate" xml:space="preserve">
162165
<value>HTTP Status Code: {0}
163166
Error Code: {1}

src/ResourceManager/OperationalInsights/Commands.OperationalInsights/help/Get-AzureRmOperationalInsightsDataSource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ schema: 2.0.0
88
# Get-AzureRmOperationalInsightsDataSource
99

1010
## SYNOPSIS
11-
Gets data sources.
11+
Get datasources under Azure Log Analytics workspace.
1212

1313
## SYNTAX
1414

0 commit comments

Comments
 (0)