public override void ExecuteCmdlet() { PSDataSource dataSource = OperationalInsightsClient.GetSingletonDataSource( this.ResourceGroupName, this.WorkspaceName, PSDataSourceKinds.LinuxSyslogCollection); if (null == dataSource) { var dsProperties = new PSLinuxSyslogCollectionDataSourceProperties { State = CollectionState.Disabled }; CreatePSDataSourceWithProperties(dsProperties, Resources.SingletonDataSourceLinuxSyslogCollectionDefaultName); } else { PSLinuxSyslogCollectionDataSourceProperties dsProperties = dataSource.Properties as PSLinuxSyslogCollectionDataSourceProperties; dsProperties.State = CollectionState.Disabled; UpdatePSDataSourceParameters parameters = new UpdatePSDataSourceParameters { ResourceGroupName = dataSource.ResourceGroupName, WorkspaceName = dataSource.WorkspaceName, Name = dataSource.Name, Properties = dsProperties }; WriteObject(OperationalInsightsClient.UpdatePSDataSource(parameters)); } }
public override void ExecuteCmdlet() { PSDataSource dataSource = OperationalInsightsClient.GetSingletonDataSource( this.ResourceGroupName, this.WorkspaceName, PSDataSourceKinds.LinuxSyslogCollection); if (null == dataSource) { var dsProperties = new PSLinuxSyslogCollectionDataSourceProperties { State = CollectionState.Enabled }; CreatePSDataSourceWithProperties(dsProperties, Resources.SingletonDataSourceLinuxSyslogCollectionDefaultName); } else { PSLinuxSyslogCollectionDataSourceProperties dsProperties = dataSource.Properties as PSLinuxSyslogCollectionDataSourceProperties; dsProperties.State = CollectionState.Enabled; UpdatePSDataSourceParameters parameters = new UpdatePSDataSourceParameters { ResourceGroupName = dataSource.ResourceGroupName, WorkspaceName = dataSource.WorkspaceName, Name = dataSource.Name, Properties = dsProperties }; WriteObject(OperationalInsightsClient.UpdatePSDataSource(parameters)); } }
public override void ExecuteCmdlet() { UpdatePSDataSourceParameters parameters = new UpdatePSDataSourceParameters { ResourceGroupName = DataSource.ResourceGroupName, WorkspaceName = DataSource.WorkspaceName, Name = DataSource.Name, Properties= DataSource.Properties }; WriteObject(OperationalInsightsClient.UpdatePSDataSource(parameters)); }
public override void ExecuteCmdlet() { UpdatePSDataSourceParameters parameters = new UpdatePSDataSourceParameters { ResourceGroupName = DataSource.ResourceGroupName, WorkspaceName = DataSource.WorkspaceName, Name = DataSource.Name, Properties = DataSource.Properties }; WriteObject(OperationalInsightsClient.UpdatePSDataSource(parameters)); }