// This is an automatically generated code sample.
// To make this code sample work in your Oracle Cloud tenancy,
// please replace the values for any parameters whose current values do not fit
// your use case (such as resource IDs, strings containing ‘EXAMPLE’ or ‘unique_id’, and
// boolean, number, and enum parameters with values not fitting your use case).
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Oci.LoganalyticsService;
using Oci.Common;
using Oci.Common.Auth;
namespace Oci.Sdk.DotNet.Example.Loganalytics
{
public class TestParserExample
{
public static async Task Main()
{
// Create a request and dependent object(s).
var testParserPayloadDetails = new Oci.LoganalyticsService.Models.TestParserPayloadDetails
{
Content = "EXAMPLE-content-Value",
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
Encoding = "EXAMPLE-encoding-Value",
ExampleContent = "EXAMPLE-exampleContent-Value",
FieldMaps = new List<Oci.LoganalyticsService.Models.LogAnalyticsParserField>
{
new Oci.LoganalyticsService.Models.LogAnalyticsParserField
{
Field = new Oci.LoganalyticsService.Models.LogAnalyticsField
{
CeeAlias = "EXAMPLE-ceeAlias-Value",
DataType = "EXAMPLE-dataType-Value",
RegularExpression = "EXAMPLE-regularExpression-Value",
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
EditVersion = 519,
FacetPriority = 529,
Name = "EXAMPLE-name-Value",
IsFacetEligible = false,
IsHighCardinality = true,
IsLargeData = true,
IsMultiValued = true,
IsPrimary = true,
IsSystem = false,
IsSummarizable = false,
MappedValue = "EXAMPLE-mappedValue-Value",
IsMetricKeyEligible = true,
IsMetricValueEligible = false,
RangeFacetEligible = 259,
IsTableEligible = false,
UnitType = "EXAMPLE-unitType-Value",
TimeUpdated = DateTime.Parse("07/19/2032 18:08:27"),
IsKeepDuplicates = true
},
ParserFieldId = 417,
ParserFieldExpression = "EXAMPLE-parserFieldExpression-Value",
ParserFieldName = "EXAMPLE-parserFieldName-Value",
StorageFieldName = "EXAMPLE-storageFieldName-Value",
ParserFieldIntegratorName = "EXAMPLE-parserFieldIntegratorName-Value",
ParserName = "EXAMPLE-parserName-Value",
ParserFieldSequence = 837,
Parser = new Oci.LoganalyticsService.Models.LogAnalyticsParser
{
Content = "EXAMPLE-content-Value",
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
EditVersion = 678,
Encoding = "EXAMPLE-encoding-Value",
ExampleContent = "EXAMPLE-exampleContent-Value",
FooterContent = "EXAMPLE-footerContent-Value",
HeaderContent = "EXAMPLE-headerContent-Value",
Name = "EXAMPLE-name-Value",
IsDefault = false,
IsSingleLineContent = false,
IsSystem = false,
Language = "EXAMPLE-language-Value",
TimeUpdated = DateTime.Parse("09/26/2044 21:31:55"),
LogTypeTestRequestVersion = 881,
ParserIgnorelineCharacters = "EXAMPLE-parserIgnorelineCharacters-Value",
IsHidden = false,
ParserSequence = 802,
ParserTimezone = "EXAMPLE-parserTimezone-Value",
ParserFilter = new Oci.LoganalyticsService.Models.LogAnalyticsParserFilter
{
Id = "ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
AgentVersion = "EXAMPLE-agentVersion-Value",
IsInUse = 80,
OperatingSystem = "EXAMPLE-operatingSystem-Value",
ParserId = 963,
Version = "EXAMPLE-version-Value"
},
IsParserWrittenOnce = false,
ParserFunctions = new List<Oci.LoganalyticsService.Models.LogAnalyticsParserFunction>
{
new Oci.LoganalyticsService.Models.LogAnalyticsParserFunction
{
ParserMetaPlugin = new Oci.LoganalyticsService.Models.LogAnalyticsParserMetaPlugin
{
MetaPluginParameters = new List<Oci.LoganalyticsService.Models.LogAnalyticsParserMetaPluginParameter>
{
new Oci.LoganalyticsService.Models.LogAnalyticsParserMetaPluginParameter
{
Description = "EXAMPLE-description-Value",
Name = "EXAMPLE-name-Value",
IsMandatory = false,
IsRepeatable = true,
PluginName = "EXAMPLE-pluginName-Value",
Type = "EXAMPLE-type-Value"
}
},
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
Name = "EXAMPLE-name-Value"
},
ParserFunctionId = 565,
ParserFunctionName = "EXAMPLE-parserFunctionName-Value",
IsEnabled = true,
IsSystem = false,
ParserId = 542,
ParserName = "EXAMPLE-parserName-Value",
ParserMetaPluginName = "EXAMPLE-parserMetaPluginName-Value",
ParserFunctionPriority = 489,
ParserFunctionParameters = new List<Oci.LoganalyticsService.Models.LogAnalyticsParserFunctionParameter>
{
new Oci.LoganalyticsService.Models.LogAnalyticsParserFunctionParameter
{
ParserFunctionId = 230,
ParserFunctionParameterName = "EXAMPLE-parserFunctionParameterName-Value",
ParserFunctionParameterId = 606,
ParserMetaPluginParameterName = "EXAMPLE-parserMetaPluginParameterName-Value",
ParserMetaPluginParameterValue = "EXAMPLE-parserMetaPluginParameterValue-Value",
ParserName = "EXAMPLE-parserName-Value",
ParserMetaPluginParameter = new Oci.LoganalyticsService.Models.LogAnalyticsParserMetaPluginParameter
{
Description = "EXAMPLE-description-Value",
Name = "EXAMPLE-name-Value",
IsMandatory = false,
IsRepeatable = true,
PluginName = "EXAMPLE-pluginName-Value",
Type = "EXAMPLE-type-Value"
}
}
}
}
},
SourcesCount = 698,
Sources = new List<Oci.LoganalyticsService.Models.LogAnalyticsSource>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSource
{
LabelConditions = new List<Oci.LoganalyticsService.Models.LogAnalyticsSourceLabelCondition>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSourceLabelCondition
{
ConditionString = "EXAMPLE-conditionString-Value",
ConditionBlock = new Oci.LoganalyticsService.Models.ConditionBlock
{
ConditionBlocksOperator = Oci.LoganalyticsService.Models.ConditionBlock.ConditionBlocksOperatorEnum.Or,
FieldName = "EXAMPLE-fieldName-Value",
LabelConditionOperator = "EXAMPLE-labelConditionOperator-Value",
LabelConditionValue = "EXAMPLE-labelConditionValue-Value",
LabelConditionValues = new List<string>
{
"EXAMPLE--Value"
},
},
Message = "EXAMPLE-message-Value",
IsVisible = false,
BlockConditionField = "EXAMPLE-blockConditionField-Value",
BlockConditionOperator = "EXAMPLE-blockConditionOperator-Value",
BlockConditionValue = "EXAMPLE-blockConditionValue-Value",
LabelConditionValue = "EXAMPLE-labelConditionValue-Value",
LabelConditionValues = new List<string>
{
"EXAMPLE--Value"
},
ContentExample = "EXAMPLE-contentExample-Value",
IsEnabled = false,
FieldName = "EXAMPLE-fieldName-Value",
LabelConditionId = 375,
IsSystem = true,
LabelConditionOperator = "EXAMPLE-labelConditionOperator-Value",
SourceId = 807,
LabelDisplayName = "EXAMPLE-labelDisplayName-Value",
StorageField = "EXAMPLE-storageField-Value",
LabelName = "EXAMPLE-labelName-Value",
IsInlineLabelExistingInDatabase = false
}
},
AssociationCount = 751,
AssociationEntity = new List<Oci.LoganalyticsService.Models.LogAnalyticsAssociation>
{
new Oci.LoganalyticsService.Models.LogAnalyticsAssociation
{
FailureMessage = "EXAMPLE-failureMessage-Value",
AgentId = "ocid1.test.oc1..<unique_ID>EXAMPLE-agentId-Value",
TimeLastAttempted = DateTime.Parse("01/12/2002 23:22:14"),
RetryCount = 308,
SourceName = "EXAMPLE-sourceName-Value",
SourceDisplayName = "EXAMPLE-sourceDisplayName-Value",
SourceTypeName = "EXAMPLE-sourceTypeName-Value",
LifeCycleState = Oci.LoganalyticsService.Models.LogAnalyticsAssociation.LifeCycleStateEnum.Succeeded,
EntityId = "ocid1.test.oc1..<unique_ID>EXAMPLE-entityId-Value",
EntityName = "EXAMPLE-entityName-Value",
EntityTypeName = "EXAMPLE-entityTypeName-Value",
Host = "EXAMPLE-host-Value",
AgentEntityName = "EXAMPLE-agentEntityName-Value",
EntityTypeDisplayName = "EXAMPLE-entityTypeDisplayName-Value",
LogGroupId = "ocid1.test.oc1..<unique_ID>EXAMPLE-logGroupId-Value",
LogGroupName = "EXAMPLE-logGroupName-Value",
LogGroupCompartment = "EXAMPLE-logGroupCompartment-Value",
AssociationProperties = new List<Oci.LoganalyticsService.Models.AssociationProperty>
{
new Oci.LoganalyticsService.Models.AssociationProperty
{
Name = "EXAMPLE-name-Value",
Value = "EXAMPLE-value-Value",
Patterns = new List<Oci.LoganalyticsService.Models.PatternOverride>
{
new Oci.LoganalyticsService.Models.PatternOverride
{
Id = "ocid1.test.oc1..<unique_ID>EXAMPLE-id-Value",
Value = "EXAMPLE-value-Value",
EffectiveLevel = "EXAMPLE-effectiveLevel-Value"
}
}
}
}
}
},
DataFilterDefinitions = new List<Oci.LoganalyticsService.Models.LogAnalyticsSourceDataFilter>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSourceDataFilter
{
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
EditVersion = 360,
IsEnabled = true,
FieldName = "EXAMPLE-fieldName-Value",
HashType = 10,
DataFilterId = 230,
IsSystem = true,
MatchRegularExpression = "EXAMPLE-matchRegularExpression-Value",
Order = 242,
Path = "EXAMPLE-path-Value",
ReplacementString = "EXAMPLE-replacementString-Value",
SourceId = 373,
FilterType = Oci.LoganalyticsService.Models.LogAnalyticsSourceDataFilter.FilterTypeEnum.DropString
}
},
DatabaseCredential = "EXAMPLE-databaseCredential-Value",
ExtendedFieldDefinitions = new List<Oci.LoganalyticsService.Models.LogAnalyticsSourceExtendedFieldDefinition>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSourceExtendedFieldDefinition
{
Field = new Oci.LoganalyticsService.Models.LogAnalyticsField
{
CeeAlias = "EXAMPLE-ceeAlias-Value",
DataType = "EXAMPLE-dataType-Value",
RegularExpression = "EXAMPLE-regularExpression-Value",
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
EditVersion = 728,
FacetPriority = 845,
Name = "EXAMPLE-name-Value",
IsFacetEligible = true,
IsHighCardinality = true,
IsLargeData = true,
IsMultiValued = true,
IsPrimary = true,
IsSystem = false,
IsSummarizable = true,
MappedValue = "EXAMPLE-mappedValue-Value",
IsMetricKeyEligible = false,
IsMetricValueEligible = false,
RangeFacetEligible = 542,
IsTableEligible = false,
UnitType = "EXAMPLE-unitType-Value",
TimeUpdated = DateTime.Parse("08/14/2027 23:13:32"),
IsKeepDuplicates = true
},
DisplayRegularExpression = "EXAMPLE-displayRegularExpression-Value",
ExtendedFields = new List<Oci.LoganalyticsService.Models.LogAnalyticsExtendedField>
{
new Oci.LoganalyticsService.Models.LogAnalyticsExtendedField
{
Field = new Oci.LoganalyticsService.Models.LogAnalyticsField
{
CeeAlias = "EXAMPLE-ceeAlias-Value",
DataType = "EXAMPLE-dataType-Value",
RegularExpression = "EXAMPLE-regularExpression-Value",
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
EditVersion = 891,
FacetPriority = 448,
Name = "EXAMPLE-name-Value",
IsFacetEligible = false,
IsHighCardinality = false,
IsLargeData = true,
IsMultiValued = true,
IsPrimary = true,
IsSystem = false,
IsSummarizable = true,
MappedValue = "EXAMPLE-mappedValue-Value",
IsMetricKeyEligible = false,
IsMetricValueEligible = true,
RangeFacetEligible = 998,
IsTableEligible = true,
UnitType = "EXAMPLE-unitType-Value",
TimeUpdated = DateTime.Parse("07/19/2025 10:20:32"),
IsKeepDuplicates = false
},
ExtendedFieldDefinitionId = 312,
FieldName = "EXAMPLE-fieldName-Value",
FieldDisplayName = "EXAMPLE-fieldDisplayName-Value",
SavedRegularExpressionName = "EXAMPLE-savedRegularExpressionName-Value",
ExtendedFieldId = 271
}
},
BaseFieldName = "EXAMPLE-baseFieldName-Value",
BaseFieldLogText = "EXAMPLE-baseFieldLogText-Value",
ConditionDataType = "EXAMPLE-conditionDataType-Value",
ConditionField = "EXAMPLE-conditionField-Value",
ConditionOperator = "EXAMPLE-conditionOperator-Value",
ConditionValue = "EXAMPLE-conditionValue-Value",
ConvertedRegularExpression = "EXAMPLE-convertedRegularExpression-Value",
IsEnabled = true,
ExtendedFieldDefinitionId = 339,
IsSystem = true,
RegularExpression = "EXAMPLE-regularExpression-Value",
SourceId = 666,
TimeUpdated = DateTime.Parse("10/05/2006 10:22:06"),
ConditionString = "EXAMPLE-conditionString-Value",
ConditionBlock = new Oci.LoganalyticsService.Models.GenericConditionBlock
{
ConditionBlocksOperator = Oci.LoganalyticsService.Models.GenericConditionBlock.ConditionBlocksOperatorEnum.NotAnd,
Name = "EXAMPLE-name-Value",
Operator = "EXAMPLE-operator-Value",
Value = "EXAMPLE-value-Value",
Values = new List<string>
{
"EXAMPLE--Value"
},
}
}
},
IsForCloud = false,
Labels = new List<Oci.LoganalyticsService.Models.LogAnalyticsLabelView>
{
new Oci.LoganalyticsService.Models.LogAnalyticsLabelView
{
Aliases = new List<Oci.LoganalyticsService.Models.LogAnalyticsLabelAlias>
{
new Oci.LoganalyticsService.Models.LogAnalyticsLabelAlias
{
Alias = "EXAMPLE-alias-Value",
AliasDisplayName = "EXAMPLE-aliasDisplayName-Value",
IsSystem = false,
DisplayName = "EXAMPLE-displayName-Value",
Name = "EXAMPLE-name-Value",
Priority = Oci.LoganalyticsService.Models.LogAnalyticsLabelAlias.PriorityEnum.Low
}
},
CountUsageInAlertRule = 227,
CountUsageInSource = 473,
Id = "EXAMPLE-id-Value",
SuggestType = 225,
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
EditVersion = 680,
Impact = "EXAMPLE-impact-Value",
IsSystem = false,
Name = "EXAMPLE-name-Value",
Priority = Oci.LoganalyticsService.Models.LogAnalyticsLabelView.PriorityEnum.Low,
Recommendation = "EXAMPLE-recommendation-Value",
Type = 996,
IsUserDeleted = false
}
},
MetricDefinitions = new List<Oci.LoganalyticsService.Models.LogAnalyticsMetric>
{
new Oci.LoganalyticsService.Models.LogAnalyticsMetric
{
AggregationField = "EXAMPLE-aggregationField-Value",
BucketMetadata = "EXAMPLE-bucketMetadata-Value",
ClockPeriod = "EXAMPLE-clockPeriod-Value",
Description = "EXAMPLE-description-Value",
EditVersion = 64,
FieldName = "EXAMPLE-fieldName-Value",
FieldValues = new List<string>
{
"EXAMPLE--Value"
},
GroupingField = "EXAMPLE-groupingField-Value",
IsEnabled = false,
IsSystem = true,
DisplayName = "EXAMPLE-displayName-Value",
MetricReference = 509,
Name = "EXAMPLE-name-Value",
MetricType = Oci.LoganalyticsService.Models.LogAnalyticsMetric.MetricTypeEnum.Count,
IsMetricSourceEnabled = false,
Operator = Oci.LoganalyticsService.Models.LogAnalyticsMetric.OperatorEnum.ContainsIgnoreCase,
EntityType = "EXAMPLE-entityType-Value",
TimeUpdated = DateTime.Parse("11/08/2012 08:17:57"),
UnitType = "EXAMPLE-unitType-Value",
IsUserCustomized = true
}
},
Metrics = new List<Oci.LoganalyticsService.Models.LogAnalyticsSourceMetric>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSourceMetric
{
IsMetricSourceEnabled = true,
MetricName = "EXAMPLE-metricName-Value",
SourceName = "EXAMPLE-sourceName-Value",
EntityType = "EXAMPLE-entityType-Value"
}
},
Parameters = new List<Oci.LoganalyticsService.Models.LogAnalyticsParameter>
{
new Oci.LoganalyticsService.Models.LogAnalyticsParameter
{
DefaultValue = "EXAMPLE-defaultValue-Value",
Description = "EXAMPLE-description-Value",
IsActive = true,
Name = "EXAMPLE-name-Value",
SourceId = 21
}
},
PatternCount = 284,
Patterns = new List<Oci.LoganalyticsService.Models.LogAnalyticsSourcePattern>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSourcePattern
{
ConvertedText = "EXAMPLE-convertedText-Value",
DbParserId = 701,
DbPatternDateTimeColumns = "EXAMPLE-dbPatternDateTimeColumns-Value",
DbPatternDateTimeField = "EXAMPLE-dbPatternDateTimeField-Value",
DbPatternSequenceColumn = "EXAMPLE-dbPatternSequenceColumn-Value",
IsInclude = true,
IsDefault = false,
PatternFilter = new Oci.LoganalyticsService.Models.LogAnalyticsPatternFilter
{
AgentVersion = "EXAMPLE-agentVersion-Value",
IsInUse = false,
OperatingSystem = "EXAMPLE-operatingSystem-Value",
PatternId = 420,
SourceId = 42,
Version = "EXAMPLE-version-Value",
},
Alias = "EXAMPLE-alias-Value",
Description = "EXAMPLE-description-Value",
IsEnabled = true,
PatternId = 130,
IsSystem = true,
SourceId = 655,
IsAgentWarningSuppressed = true,
PatternText = "EXAMPLE-patternText-Value",
PatternType = 662,
EntityType = new List<string>
{
"EXAMPLE--Value"
},
PatternProperties = new List<Oci.LoganalyticsService.Models.LogAnalyticsProperty>
{
new Oci.LoganalyticsService.Models.LogAnalyticsProperty
{
Name = "EXAMPLE-name-Value",
Value = "EXAMPLE-value-Value"
}
}
}
},
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
EditVersion = 524,
Functions = new List<Oci.LoganalyticsService.Models.LogAnalyticsSourceFunction>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSourceFunction
{
Arguments = new List<Oci.LoganalyticsService.Models.LogAnalyticsMetaFunctionArgument>
{
new Oci.LoganalyticsService.Models.LogAnalyticsMetaFunctionArgument
{
IsOverrideOutputFields = false,
ArgumentDisplayName = "EXAMPLE-argumentDisplayName-Value",
ArgumentExample = "EXAMPLE-argumentExample-Value",
ArgumentService = "EXAMPLE-argumentService-Value",
ArgumentDataType = "EXAMPLE-argumentDataType-Value",
ArgumentDescription = "EXAMPLE-argumentDescription-Value",
ArgumentName = "EXAMPLE-argumentName-Value",
ArgumentOrder = 379,
ArgumentType = 272,
ArgumentId = 627,
ArgumentLookupColumn = "EXAMPLE-argumentLookupColumn-Value",
ArgumentLookupColumnPosition = 351,
ArgumentValue = "EXAMPLE-argumentValue-Value",
ArgumentReference = "EXAMPLE-argumentReference-Value"
}
},
IsEnabled = true,
Function = new Oci.LoganalyticsService.Models.LogAnalyticsMetaFunction
{
MetaFunctionArgument = new List<Oci.LoganalyticsService.Models.LogAnalyticsMetaFunctionArgument>
{
new Oci.LoganalyticsService.Models.LogAnalyticsMetaFunctionArgument
{
IsOverrideOutputFields = false,
ArgumentDisplayName = "EXAMPLE-argumentDisplayName-Value",
ArgumentExample = "EXAMPLE-argumentExample-Value",
ArgumentService = "EXAMPLE-argumentService-Value",
ArgumentDataType = "EXAMPLE-argumentDataType-Value",
ArgumentDescription = "EXAMPLE-argumentDescription-Value",
ArgumentName = "EXAMPLE-argumentName-Value",
ArgumentOrder = 442,
ArgumentType = 146,
ArgumentId = 74,
ArgumentLookupColumn = "EXAMPLE-argumentLookupColumn-Value",
ArgumentLookupColumnPosition = 268,
ArgumentValue = "EXAMPLE-argumentValue-Value",
ArgumentReference = "EXAMPLE-argumentReference-Value"
}
},
Component = "EXAMPLE-component-Value",
Description = "EXAMPLE-description-Value",
EditVersion = 852,
MetaFunctionId = 942,
JavaClassName = "EXAMPLE-javaClassName-Value",
Name = "EXAMPLE-name-Value"
},
FunctionName = Oci.LoganalyticsService.Models.LogAnalyticsSourceFunction.FunctionNameEnum.Lookup,
FunctionReference = "EXAMPLE-functionReference-Value",
SourceReference = "EXAMPLE-sourceReference-Value",
Features = new List<string>
{
"EXAMPLE--Value"
},
FunctionId = 175,
Order = 611,
IsSystem = true,
LookupColumn = "EXAMPLE-lookupColumn-Value",
LookupColumnPosition = 466,
LookupDisplayName = "EXAMPLE-lookupDisplayName-Value",
LookupMode = 804,
LookupTable = "EXAMPLE-lookupTable-Value",
SourceId = 206
}
},
SourceId = 344,
Name = "EXAMPLE-name-Value",
IsSecureContent = false,
IsSystem = false,
IsAutoAssociationEnabled = true,
IsAutoAssociationOverride = false,
RuleId = 33,
TypeName = "EXAMPLE-typeName-Value",
TypeDisplayName = "EXAMPLE-typeDisplayName-Value",
WarningConfig = 967,
MetadataFields = new List<Oci.LoganalyticsService.Models.LogAnalyticsSourceMetadataField>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSourceMetadataField
{
FieldName = "EXAMPLE-fieldName-Value",
IsEnabled = false,
IsSystem = true,
Key = "EXAMPLE-key-Value",
SourceName = "EXAMPLE-sourceName-Value"
}
},
LabelDefinitions = new List<Oci.LoganalyticsService.Models.LogAnalyticsLabelDefinition>
{
new Oci.LoganalyticsService.Models.LogAnalyticsLabelDefinition
{
EditVersion = 583,
IsSystem = true,
SourceId = 76,
LabelName = "EXAMPLE-labelName-Value"
}
},
EntityTypes = new List<Oci.LoganalyticsService.Models.LogAnalyticsSourceEntityType>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSourceEntityType
{
SourceId = 261,
EntityType = "EXAMPLE-entityType-Value",
EntityTypeCategory = "EXAMPLE-entityTypeCategory-Value",
EntityTypeDisplayName = "EXAMPLE-entityTypeDisplayName-Value"
}
},
IsTimezoneOverride = true,
TimeUpdated = DateTime.Parse("06/05/2005 18:55:33"),
EventTypes = new List<Oci.LoganalyticsService.Models.EventType>
{
new Oci.LoganalyticsService.Models.EventType
{
EventTypeName = "EXAMPLE-eventTypeName-Value",
SpecVersion = "EXAMPLE-specVersion-Value",
IsEnabled = false,
IsSystem = true,
TimeUpdated = DateTime.Parse("05/29/2046 10:59:14")
}
},
Categories = new List<Oci.LoganalyticsService.Models.LogAnalyticsCategory>
{
new Oci.LoganalyticsService.Models.LogAnalyticsCategory
{
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
Type = "EXAMPLE-type-Value",
IsSystem = true
}
},
Endpoints = new List<Oci.LoganalyticsService.Models.LogAnalyticsEndpoint>
{
new Oci.LoganalyticsService.Models.LogTypeEndpoint
{
LogEndpoint = new Oci.LoganalyticsService.Models.LogEndpoint
{
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value",
Model = "EXAMPLE-model-Value",
EndpointId = 709,
Request = new Oci.LoganalyticsService.Models.EndpointRequest
{
Method = Oci.LoganalyticsService.Models.EndpointRequest.MethodEnum.Get,
Url = "EXAMPLE-url-Value",
ContentType = "EXAMPLE-contentType-Value",
Payload = "EXAMPLE-payload-Value",
Headers = new List<Oci.LoganalyticsService.Models.NameValuePair>
{
new Oci.LoganalyticsService.Models.NameValuePair
{
Name = "EXAMPLE-name-Value",
Value = "EXAMPLE-value-Value"
}
},
FormParameters = new List<Oci.LoganalyticsService.Models.NameValuePair>
{
new Oci.LoganalyticsService.Models.NameValuePair
{
Name = "EXAMPLE-name-Value",
Value = "EXAMPLE-value-Value"
}
}
},
Response = new Oci.LoganalyticsService.Models.EndpointResponse
{
ContentType = "EXAMPLE-contentType-Value",
Example = "EXAMPLE-example-Value"
},
Credentials = new Oci.LoganalyticsService.Models.EndpointCredentials
{
CredentialType = Oci.LoganalyticsService.Models.EndpointCredentials.CredentialTypeEnum.None,
CredentialName = "EXAMPLE-credentialName-Value",
CredentialEndpoint = new Oci.LoganalyticsService.Models.CredentialEndpoint
{
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value",
Model = "EXAMPLE-model-Value",
EndpointId = 771,
Response = new Oci.LoganalyticsService.Models.EndpointResponse
{
ContentType = "EXAMPLE-contentType-Value",
Example = "EXAMPLE-example-Value"
},
Proxy = new Oci.LoganalyticsService.Models.EndpointProxy
{
Url = "EXAMPLE-url-Value",
CredentialName = "EXAMPLE-credentialName-Value",
CredentialType = Oci.LoganalyticsService.Models.EndpointProxy.CredentialTypeEnum.BasicAuth
}
}
},
Proxy = new Oci.LoganalyticsService.Models.EndpointProxy
{
Url = "EXAMPLE-url-Value",
CredentialName = "EXAMPLE-credentialName-Value",
CredentialType = Oci.LoganalyticsService.Models.EndpointProxy.CredentialTypeEnum.BasicAuth
},
IsEnabled = false,
IsSystem = false,
EndpointProperties = new List<Oci.LoganalyticsService.Models.LogAnalyticsProperty>
{
new Oci.LoganalyticsService.Models.LogAnalyticsProperty
{
Name = "EXAMPLE-name-Value",
Value = "EXAMPLE-value-Value"
}
}
}
}
},
SourceProperties = new List<Oci.LoganalyticsService.Models.LogAnalyticsProperty>
{
new Oci.LoganalyticsService.Models.LogAnalyticsProperty
{
Name = "EXAMPLE-name-Value",
Value = "EXAMPLE-value-Value"
}
},
LifecycleState = Oci.LoganalyticsService.Models.LogAnalyticsSource.LifecycleStateEnum.Deleted
}
},
ShouldTokenizeOriginalText = false,
FieldDelimiter = "EXAMPLE-fieldDelimiter-Value",
FieldQualifier = "EXAMPLE-fieldQualifier-Value",
Type = Oci.LoganalyticsService.Models.LogAnalyticsParser.TypeEnum.Regex,
IsUserDeleted = false,
IsNamespaceAware = false,
Categories = new List<Oci.LoganalyticsService.Models.LogAnalyticsCategory>
{
new Oci.LoganalyticsService.Models.LogAnalyticsCategory
{
Name = "EXAMPLE-name-Value",
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
Type = "EXAMPLE-type-Value",
IsSystem = false
}
},
IsPositionAware = true,
DependentSources = new List<Oci.LoganalyticsService.Models.DependentSource>
{
new Oci.LoganalyticsService.Models.DependentSource
{
SourceName = "EXAMPLE-sourceName-Value",
SourceDisplayName = "EXAMPLE-sourceDisplayName-Value",
SourceId = 42,
SourceType = "EXAMPLE-sourceType-Value",
IsSystem = false,
IsAutoAssociationEnabled = false,
EntityTypes = new List<Oci.LoganalyticsService.Models.LogAnalyticsSourceEntityType>
{
new Oci.LoganalyticsService.Models.LogAnalyticsSourceEntityType
{
SourceId = 499,
EntityType = "EXAMPLE-entityType-Value",
EntityTypeCategory = "EXAMPLE-entityTypeCategory-Value",
EntityTypeDisplayName = "EXAMPLE-entityTypeDisplayName-Value"
}
},
Dependencies = new List<Oci.LoganalyticsService.Models.Dependency>
{
new Oci.LoganalyticsService.Models.Dependency
{
Type = "EXAMPLE-type-Value",
ReferenceType = "EXAMPLE-referenceType-Value",
ReferenceId = 222,
ReferenceName = "EXAMPLE-referenceName-Value",
ReferenceDisplayName = "EXAMPLE-referenceDisplayName-Value"
}
}
}
},
DependentParsers = new List<Oci.LoganalyticsService.Models.DependentParser>
{
new Oci.LoganalyticsService.Models.DependentParser
{
ParserName = "EXAMPLE-parserName-Value",
ParserDisplayName = "EXAMPLE-parserDisplayName-Value",
ParserId = 677,
IsSystem = false,
ParserType = Oci.LoganalyticsService.Models.DependentParser.ParserTypeEnum.Delimited,
Dependencies = new List<Oci.LoganalyticsService.Models.Dependency>
{
new Oci.LoganalyticsService.Models.Dependency
{
Type = "EXAMPLE-type-Value",
ReferenceType = "EXAMPLE-referenceType-Value",
ReferenceId = 848,
ReferenceName = "EXAMPLE-referenceName-Value",
ReferenceDisplayName = "EXAMPLE-referenceDisplayName-Value"
}
}
}
}
},
StructuredColumnInfo = "EXAMPLE-structuredColumnInfo-Value",
Actions = new List<Oci.LoganalyticsService.Models.ParserAction>
{
new Oci.LoganalyticsService.Models.ParserAction
{
Name = "EXAMPLE-name-Value",
Order = 585
}
}
}
},
FooterContent = "EXAMPLE-footerContent-Value",
HeaderContent = "EXAMPLE-headerContent-Value",
Name = "EXAMPLE-name-Value",
IsDefault = false,
IsSingleLineContent = false,
IsSystem = false,
Language = "EXAMPLE-language-Value",
TimeUpdated = DateTime.Parse("03/24/2019 12:15:09"),
LogTypeTestRequestVersion = 842,
Metadata = new Oci.LoganalyticsService.Models.UiParserTestMetadata
{
LastModifiedTime = "EXAMPLE-lastModifiedTime-Value",
LogFileName = "EXAMPLE-logFileName-Value",
TimeZone = DateTime.Parse("08/26/2005 13:33:43")
},
ParserIgnorelineCharacters = "EXAMPLE-parserIgnorelineCharacters-Value",
IsHidden = 423,
ParserSequence = 229,
ParserTimezone = "EXAMPLE-parserTimezone-Value",
IsParserWrittenOnce = true,
ParserFunctions = new List<Oci.LoganalyticsService.Models.LogAnalyticsParserFunction>
{
new Oci.LoganalyticsService.Models.LogAnalyticsParserFunction
{
ParserMetaPlugin = new Oci.LoganalyticsService.Models.LogAnalyticsParserMetaPlugin
{
MetaPluginParameters = new List<Oci.LoganalyticsService.Models.LogAnalyticsParserMetaPluginParameter>
{
new Oci.LoganalyticsService.Models.LogAnalyticsParserMetaPluginParameter
{
Description = "EXAMPLE-description-Value",
Name = "EXAMPLE-name-Value",
IsMandatory = true,
IsRepeatable = false,
PluginName = "EXAMPLE-pluginName-Value",
Type = "EXAMPLE-type-Value"
}
},
Description = "EXAMPLE-description-Value",
DisplayName = "EXAMPLE-displayName-Value",
Name = "EXAMPLE-name-Value"
},
ParserFunctionId = 701,
ParserFunctionName = "EXAMPLE-parserFunctionName-Value",
IsEnabled = false,
IsSystem = false,
ParserId = 330,
ParserName = "EXAMPLE-parserName-Value",
ParserMetaPluginName = "EXAMPLE-parserMetaPluginName-Value",
ParserFunctionPriority = 631,
ParserFunctionParameters = new List<Oci.LoganalyticsService.Models.LogAnalyticsParserFunctionParameter>
{
new Oci.LoganalyticsService.Models.LogAnalyticsParserFunctionParameter
{
ParserFunctionId = 882,
ParserFunctionParameterName = "EXAMPLE-parserFunctionParameterName-Value",
ParserFunctionParameterId = 28,
ParserMetaPluginParameterName = "EXAMPLE-parserMetaPluginParameterName-Value",
ParserMetaPluginParameterValue = "EXAMPLE-parserMetaPluginParameterValue-Value",
ParserName = "EXAMPLE-parserName-Value",
ParserMetaPluginParameter = new Oci.LoganalyticsService.Models.LogAnalyticsParserMetaPluginParameter
{
Description = "EXAMPLE-description-Value",
Name = "EXAMPLE-name-Value",
IsMandatory = false,
IsRepeatable = true,
PluginName = "EXAMPLE-pluginName-Value",
Type = "EXAMPLE-type-Value"
}
}
}
}
},
ShouldTokenizeOriginalText = false,
FieldDelimiter = "EXAMPLE-fieldDelimiter-Value",
FieldQualifier = "EXAMPLE-fieldQualifier-Value",
Type = Oci.LoganalyticsService.Models.TestParserPayloadDetails.TypeEnum.Xml,
IsNamespaceAware = true,
IsPositionAware = false
};
var testParserRequest = new Oci.LoganalyticsService.Requests.TestParserRequest
{
NamespaceName = "EXAMPLE-namespaceName-Value",
TestParserPayloadDetails = testParserPayloadDetails,
Scope = Oci.LoganalyticsService.Requests.TestParserRequest.ScopeEnum.LogLines,
ReqOriginModule = "EXAMPLE-reqOriginModule-Value",
OpcRetryToken = "EXAMPLE-opcRetryToken-Value",
OpcRequestId = "QLDG5MCPGKXUHFJD1Z4B<unique_ID>"
};
// Create a default authentication provider that uses the DEFAULT
// profile in the configuration file.
// Refer to <see href="https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/sdkconfig.htm#SDK_and_CLI_Configuration_File>the public documentation</see> on how to prepare a configuration file.
var provider = new ConfigFileAuthenticationDetailsProvider("DEFAULT");
try
{
// Create a service client and send the request.
using (var client = new LogAnalyticsClient(provider, new ClientConfiguration()))
{
var response = await client.TestParser(testParserRequest);
// Retrieve value from the response.
var additionalInfoValue = response.ParserTestResult.AdditionalInfo;
}
}
catch (Exception e)
{
Console.WriteLine($"TestParser Failed with {e.Message}");
throw e;
}
}
}
}