BatchGetTraces

valid {
    input.Body.TraceIds[_] == STRING
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CancelTraceRetrieval

valid {
    input.Body.RetrievalToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateGroup

valid {
    input.Body.GroupName == STRING
    input.Body.FilterExpression == STRING
    input.Body.InsightsConfiguration.InsightsEnabled == BOOLEAN
    input.Body.InsightsConfiguration.NotificationsEnabled == BOOLEAN
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateSamplingRule

valid {
    input.Body.SamplingRule.RuleName == STRING
    input.Body.SamplingRule.RuleARN == STRING
    input.Body.SamplingRule.ResourceARN == STRING
    input.Body.SamplingRule.Priority == INTEGER
    input.Body.SamplingRule.FixedRate == DOUBLE
    input.Body.SamplingRule.ReservoirSize == INTEGER
    input.Body.SamplingRule.ServiceName == STRING
    input.Body.SamplingRule.ServiceType == STRING
    input.Body.SamplingRule.Host == STRING
    input.Body.SamplingRule.HTTPMethod == STRING
    input.Body.SamplingRule.URLPath == STRING
    input.Body.SamplingRule.Version == INTEGER
    input.Body.SamplingRule.Attributes.STRING == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteGroup

valid {
    input.Body.GroupName == STRING
    input.Body.GroupARN == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteResourcePolicy

valid {
    input.Body.PolicyName == STRING
    input.Body.PolicyRevisionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteSamplingRule

valid {
    input.Body.RuleName == STRING
    input.Body.RuleARN == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetEncryptionConfig

valid {
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetGroup

valid {
    input.Body.GroupName == STRING
    input.Body.GroupARN == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetGroups

valid {
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetIndexingRules

valid {
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetInsight

valid {
    input.Body.InsightId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetInsightEvents

valid {
    input.Body.InsightId == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetInsightImpactGraph

valid {
    input.Body.InsightId == STRING
    input.Body.StartTime == TIMESTAMP
    input.Body.EndTime == TIMESTAMP
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetInsightSummaries

enum_InsightState := [ "ACTIVE", "CLOSED" ]

valid {
    input.Body.States[_] == enum_InsightState[_]
    input.Body.GroupARN == STRING
    input.Body.GroupName == STRING
    input.Body.StartTime == TIMESTAMP
    input.Body.EndTime == TIMESTAMP
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetRetrievedTracesGraph

valid {
    input.Body.RetrievalToken == STRING
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetSamplingRules

valid {
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetSamplingStatisticSummaries

valid {
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetSamplingTargets

valid {
    input.Body.SamplingStatisticsDocuments[_].RuleName == STRING
    input.Body.SamplingStatisticsDocuments[_].ClientID == STRING
    input.Body.SamplingStatisticsDocuments[_].Timestamp == TIMESTAMP
    input.Body.SamplingStatisticsDocuments[_].RequestCount == INTEGER
    input.Body.SamplingStatisticsDocuments[_].SampledCount == INTEGER
    input.Body.SamplingStatisticsDocuments[_].BorrowCount == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetServiceGraph

valid {
    input.Body.StartTime == TIMESTAMP
    input.Body.EndTime == TIMESTAMP
    input.Body.GroupName == STRING
    input.Body.GroupARN == STRING
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetTimeSeriesServiceStatistics

valid {
    input.Body.StartTime == TIMESTAMP
    input.Body.EndTime == TIMESTAMP
    input.Body.GroupName == STRING
    input.Body.GroupARN == STRING
    input.Body.EntitySelectorExpression == STRING
    input.Body.Period == INTEGER
    input.Body.ForecastStatistics == BOOLEAN
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetTraceGraph

valid {
    input.Body.TraceIds[_] == STRING
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetTraceSegmentDestination

valid {
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetTraceSummaries

enum_SamplingStrategyName := [ "PartialScan", "FixedRate" ]
enum_TimeRangeType := [ "TraceId", "Event", "Service" ]

valid {
    input.Body.StartTime == TIMESTAMP
    input.Body.EndTime == TIMESTAMP
    input.Body.TimeRangeType == enum_TimeRangeType[_]
    input.Body.Sampling == BOOLEAN
    input.Body.SamplingStrategy.Name == enum_SamplingStrategyName[_]
    input.Body.SamplingStrategy.Value == DOUBLE
    input.Body.FilterExpression == STRING
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListResourcePolicies

valid {
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRetrievedTraces

enum_TraceFormatType := [ "XRAY", "OTEL" ]

valid {
    input.Body.RetrievalToken == STRING
    input.Body.TraceFormat == enum_TraceFormatType[_]
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

valid {
    input.Body.ResourceARN == STRING
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutEncryptionConfig

enum_EncryptionType := [ "NONE", "KMS" ]

valid {
    input.Body.KeyId == STRING
    input.Body.Type == enum_EncryptionType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutResourcePolicy

valid {
    input.Body.PolicyName == STRING
    input.Body.PolicyDocument == STRING
    input.Body.PolicyRevisionId == STRING
    input.Body.BypassPolicyLockoutCheck == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutTelemetryRecords

valid {
    input.Body.TelemetryRecords[_].Timestamp == TIMESTAMP
    input.Body.TelemetryRecords[_].SegmentsReceivedCount == INTEGER
    input.Body.TelemetryRecords[_].SegmentsSentCount == INTEGER
    input.Body.TelemetryRecords[_].SegmentsSpilloverCount == INTEGER
    input.Body.TelemetryRecords[_].SegmentsRejectedCount == INTEGER
    input.Body.TelemetryRecords[_].BackendConnectionErrors.TimeoutCount == INTEGER
    input.Body.TelemetryRecords[_].BackendConnectionErrors.ConnectionRefusedCount == INTEGER
    input.Body.TelemetryRecords[_].BackendConnectionErrors.HTTPCode4XXCount == INTEGER
    input.Body.TelemetryRecords[_].BackendConnectionErrors.HTTPCode5XXCount == INTEGER
    input.Body.TelemetryRecords[_].BackendConnectionErrors.UnknownHostCount == INTEGER
    input.Body.TelemetryRecords[_].BackendConnectionErrors.OtherCount == INTEGER
    input.Body.EC2InstanceId == STRING
    input.Body.Hostname == STRING
    input.Body.ResourceARN == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutTraceSegments

valid {
    input.Body.TraceSegmentDocuments[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartTraceRetrieval

valid {
    input.Body.TraceIds[_] == STRING
    input.Body.StartTime == TIMESTAMP
    input.Body.EndTime == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

TagResource

valid {
    input.Body.ResourceARN == STRING
    input.Body.Tags[_].Key == STRING
    input.Body.Tags[_].Value == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UntagResource

valid {
    input.Body.ResourceARN == STRING
    input.Body.TagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateGroup

valid {
    input.Body.GroupName == STRING
    input.Body.GroupARN == STRING
    input.Body.FilterExpression == STRING
    input.Body.InsightsConfiguration.InsightsEnabled == BOOLEAN
    input.Body.InsightsConfiguration.NotificationsEnabled == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateIndexingRule

valid {
    input.Body.Name == STRING
    input.Body.Rule.Probabilistic.DesiredSamplingPercentage == DOUBLE
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateSamplingRule

valid {
    input.Body.SamplingRuleUpdate.RuleName == STRING
    input.Body.SamplingRuleUpdate.RuleARN == STRING
    input.Body.SamplingRuleUpdate.ResourceARN == STRING
    input.Body.SamplingRuleUpdate.Priority == INTEGER
    input.Body.SamplingRuleUpdate.FixedRate == DOUBLE
    input.Body.SamplingRuleUpdate.ReservoirSize == INTEGER
    input.Body.SamplingRuleUpdate.Host == STRING
    input.Body.SamplingRuleUpdate.ServiceName == STRING
    input.Body.SamplingRuleUpdate.ServiceType == STRING
    input.Body.SamplingRuleUpdate.HTTPMethod == STRING
    input.Body.SamplingRuleUpdate.URLPath == STRING
    input.Body.SamplingRuleUpdate.Attributes.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateTraceSegmentDestination

enum_TraceSegmentDestination := [ "XRay", "CloudWatchLogs" ]

valid {
    input.Body.Destination == enum_TraceSegmentDestination[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}