MEDIATAILOR

ConfigureLogsForChannel

enum_LogType := [ "AS_RUN" ]

valid {
    input.Body.ChannelName == STRING
    input.Body.LogTypes[_] == enum_LogType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ConfigureLogsForPlaybackConfiguration

valid {
    input.Body.PercentEnabled == INTEGER
    input.Body.PlaybackConfigurationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateChannel

enum_AdMarkupType := [ "DATERANGE", "SCTE35_ENHANCED" ]
enum_PlaybackMode := [ "LOOP", "LINEAR" ]
enum_Tier := [ "BASIC", "STANDARD" ]

valid {
    input.Body.FillerSlate.SourceLocationName == STRING
    input.Body.FillerSlate.VodSourceName == STRING
    input.Body.Outputs[_].DashPlaylistSettings.ManifestWindowSeconds == INTEGER
    input.Body.Outputs[_].DashPlaylistSettings.MinBufferTimeSeconds == INTEGER
    input.Body.Outputs[_].DashPlaylistSettings.MinUpdatePeriodSeconds == INTEGER
    input.Body.Outputs[_].DashPlaylistSettings.SuggestedPresentationDelaySeconds == INTEGER
    input.Body.Outputs[_].HlsPlaylistSettings.AdMarkupType[_] == enum_AdMarkupType[_]
    input.Body.Outputs[_].HlsPlaylistSettings.ManifestWindowSeconds == INTEGER
    input.Body.Outputs[_].ManifestName == STRING
    input.Body.Outputs[_].SourceGroup == STRING
    input.Body.PlaybackMode == enum_PlaybackMode[_]
    input.Body.tags.STRING == STRING
    input.Body.Tier == enum_Tier[_]
    input.Body.TimeShiftConfiguration.MaxTimeDelaySeconds == INTEGER
    input.ReqMap.ChannelName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateLiveSource

enum_Type := [ "DASH", "HLS" ]

valid {
    input.Body.HttpPackageConfigurations[_].Path == STRING
    input.Body.HttpPackageConfigurations[_].SourceGroup == STRING
    input.Body.HttpPackageConfigurations[_].Type == enum_Type[_]
    input.Body.tags.STRING == STRING
    input.ReqMap.LiveSourceName == STRING
    input.ReqMap.SourceLocationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreatePrefetchSchedule

enum_Operator := [ "EQUALS" ]

valid {
    input.Body.Consumption.AvailMatchingCriteria[_].DynamicVariable == STRING
    input.Body.Consumption.AvailMatchingCriteria[_].Operator == enum_Operator[_]
    input.Body.Consumption.EndTime == TIMESTAMP
    input.Body.Consumption.StartTime == TIMESTAMP
    input.Body.Retrieval.DynamicVariables.STRING == STRING
    input.Body.Retrieval.EndTime == TIMESTAMP
    input.Body.Retrieval.StartTime == TIMESTAMP
    input.Body.StreamId == STRING
    input.ReqMap.Name == STRING
    input.ReqMap.PlaybackConfigurationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateProgram

enum_MessageType := [ "SPLICE_INSERT", "TIME_SIGNAL" ]
enum_RelativePosition := [ "BEFORE_PROGRAM", "AFTER_PROGRAM" ]

valid {
    input.Body.AdBreaks[_].AdBreakMetadata[_].Key == STRING
    input.Body.AdBreaks[_].AdBreakMetadata[_].Value == STRING
    input.Body.AdBreaks[_].MessageType == enum_MessageType[_]
    input.Body.AdBreaks[_].OffsetMillis == LONG
    input.Body.AdBreaks[_].Slate.SourceLocationName == STRING
    input.Body.AdBreaks[_].Slate.VodSourceName == STRING
    input.Body.AdBreaks[_].SpliceInsertMessage.AvailNum == INTEGER
    input.Body.AdBreaks[_].SpliceInsertMessage.AvailsExpected == INTEGER
    input.Body.AdBreaks[_].SpliceInsertMessage.SpliceEventId == INTEGER
    input.Body.AdBreaks[_].SpliceInsertMessage.UniqueProgramId == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentNum == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentationEventId == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentationTypeId == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentationUpid == STRING
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentationUpidType == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentsExpected == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SubSegmentNum == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SubSegmentsExpected == INTEGER
    input.Body.LiveSourceName == STRING
    input.Body.ScheduleConfiguration.ClipRange.EndOffsetMillis == LONG
    input.Body.ScheduleConfiguration.Transition.DurationMillis == LONG
    input.Body.ScheduleConfiguration.Transition.RelativePosition == enum_RelativePosition[_]
    input.Body.ScheduleConfiguration.Transition.RelativeProgram == STRING
    input.Body.ScheduleConfiguration.Transition.ScheduledStartTimeMillis == LONG
    input.Body.ScheduleConfiguration.Transition.Type == STRING
    input.Body.SourceLocationName == STRING
    input.Body.VodSourceName == STRING
    input.ReqMap.ChannelName == STRING
    input.ReqMap.ProgramName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateSourceLocation

enum_AccessType := [ "S3_SIGV4", "SECRETS_MANAGER_ACCESS_TOKEN", "AUTODETECT_SIGV4" ]

valid {
    input.Body.AccessConfiguration.AccessType == enum_AccessType[_]
    input.Body.AccessConfiguration.SecretsManagerAccessTokenConfiguration.HeaderName == STRING
    input.Body.AccessConfiguration.SecretsManagerAccessTokenConfiguration.SecretArn == STRING
    input.Body.AccessConfiguration.SecretsManagerAccessTokenConfiguration.SecretStringKey == STRING
    input.Body.DefaultSegmentDeliveryConfiguration.BaseUrl == STRING
    input.Body.HttpConfiguration.BaseUrl == STRING
    input.Body.SegmentDeliveryConfigurations[_].BaseUrl == STRING
    input.Body.SegmentDeliveryConfigurations[_].Name == STRING
    input.Body.tags.STRING == STRING
    input.ReqMap.SourceLocationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateVodSource

enum_Type := [ "DASH", "HLS" ]

valid {
    input.Body.HttpPackageConfigurations[_].Path == STRING
    input.Body.HttpPackageConfigurations[_].SourceGroup == STRING
    input.Body.HttpPackageConfigurations[_].Type == enum_Type[_]
    input.Body.tags.STRING == STRING
    input.ReqMap.SourceLocationName == STRING
    input.ReqMap.VodSourceName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteChannel

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

DeleteChannelPolicy

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

DeleteLiveSource

valid {
    input.ReqMap.LiveSourceName == STRING
    input.ReqMap.SourceLocationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeletePlaybackConfiguration

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

DeletePrefetchSchedule

valid {
    input.ReqMap.Name == STRING
    input.ReqMap.PlaybackConfigurationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteProgram

valid {
    input.ReqMap.ChannelName == STRING
    input.ReqMap.ProgramName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteSourceLocation

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

DeleteVodSource

valid {
    input.ReqMap.SourceLocationName == STRING
    input.ReqMap.VodSourceName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeChannel

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

DescribeLiveSource

valid {
    input.ReqMap.LiveSourceName == STRING
    input.ReqMap.SourceLocationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeProgram

valid {
    input.ReqMap.ChannelName == STRING
    input.ReqMap.ProgramName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeSourceLocation

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

DescribeVodSource

valid {
    input.ReqMap.SourceLocationName == STRING
    input.ReqMap.VodSourceName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetChannelPolicy

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

GetChannelSchedule

valid {
    input.ReqMap.ChannelName == STRING
    input.Qs.durationMinutes == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetPlaybackConfiguration

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

GetPrefetchSchedule

valid {
    input.ReqMap.Name == STRING
    input.ReqMap.PlaybackConfigurationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListAlerts

valid {
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.resourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListChannels

valid {
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListLiveSources

valid {
    input.ReqMap.SourceLocationName == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListPlaybackConfigurations

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

ListPrefetchSchedules

valid {
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.StreamId == STRING
    input.ReqMap.PlaybackConfigurationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListSourceLocations

valid {
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListTagsForResource

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

ListVodSources

valid {
    input.ReqMap.SourceLocationName == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutChannelPolicy

valid {
    input.Body.Policy == STRING
    input.ReqMap.ChannelName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutPlaybackConfiguration

enum_FillPolicy := [ "FULL_AVAIL_ONLY", "PARTIAL_AVAIL" ]
enum_Mode := [ "OFF", "BEHIND_LIVE_EDGE", "AFTER_LIVE_EDGE" ]
enum_OriginManifestType := [ "SINGLE_PERIOD", "MULTI_PERIOD" ]

valid {
    input.Body.AdDecisionServerUrl == STRING
    input.Body.AvailSuppression.FillPolicy == enum_FillPolicy[_]
    input.Body.AvailSuppression.Mode == enum_Mode[_]
    input.Body.AvailSuppression.Value == STRING
    input.Body.Bumper.EndUrl == STRING
    input.Body.Bumper.StartUrl == STRING
    input.Body.CdnConfiguration.AdSegmentUrlPrefix == STRING
    input.Body.CdnConfiguration.ContentSegmentUrlPrefix == STRING
    input.Body.ConfigurationAliases.STRING.STRING == STRING
    input.Body.DashConfiguration.MpdLocation == STRING
    input.Body.DashConfiguration.OriginManifestType == enum_OriginManifestType[_]
    input.Body.LivePreRollConfiguration.AdDecisionServerUrl == STRING
    input.Body.LivePreRollConfiguration.MaxDurationSeconds == INTEGER
    input.Body.ManifestProcessingRules.AdMarkerPassthrough.Enabled == BOOLEAN
    input.Body.Name == STRING
    input.Body.PersonalizationThresholdSeconds == INTEGER
    input.Body.SlateAdUrl == STRING
    input.Body.tags.STRING == STRING
    input.Body.TranscodeProfileName == STRING
    input.Body.VideoContentSourceUrl == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartChannel

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

StopChannel

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

TagResource

valid {
    input.Body.tags.STRING == STRING
    input.ReqMap.ResourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UntagResource

valid {
    input.ReqMap.ResourceArn == STRING
    input.Qs.tagKeys[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateChannel

enum_AdMarkupType := [ "DATERANGE", "SCTE35_ENHANCED" ]

valid {
    input.Body.FillerSlate.SourceLocationName == STRING
    input.Body.FillerSlate.VodSourceName == STRING
    input.Body.Outputs[_].DashPlaylistSettings.ManifestWindowSeconds == INTEGER
    input.Body.Outputs[_].DashPlaylistSettings.MinBufferTimeSeconds == INTEGER
    input.Body.Outputs[_].DashPlaylistSettings.MinUpdatePeriodSeconds == INTEGER
    input.Body.Outputs[_].DashPlaylistSettings.SuggestedPresentationDelaySeconds == INTEGER
    input.Body.Outputs[_].HlsPlaylistSettings.AdMarkupType[_] == enum_AdMarkupType[_]
    input.Body.Outputs[_].HlsPlaylistSettings.ManifestWindowSeconds == INTEGER
    input.Body.Outputs[_].ManifestName == STRING
    input.Body.Outputs[_].SourceGroup == STRING
    input.Body.TimeShiftConfiguration.MaxTimeDelaySeconds == INTEGER
    input.ReqMap.ChannelName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateLiveSource

enum_Type := [ "DASH", "HLS" ]

valid {
    input.Body.HttpPackageConfigurations[_].Path == STRING
    input.Body.HttpPackageConfigurations[_].SourceGroup == STRING
    input.Body.HttpPackageConfigurations[_].Type == enum_Type[_]
    input.ReqMap.LiveSourceName == STRING
    input.ReqMap.SourceLocationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateProgram

enum_MessageType := [ "SPLICE_INSERT", "TIME_SIGNAL" ]

valid {
    input.Body.AdBreaks[_].AdBreakMetadata[_].Key == STRING
    input.Body.AdBreaks[_].AdBreakMetadata[_].Value == STRING
    input.Body.AdBreaks[_].MessageType == enum_MessageType[_]
    input.Body.AdBreaks[_].OffsetMillis == LONG
    input.Body.AdBreaks[_].Slate.SourceLocationName == STRING
    input.Body.AdBreaks[_].Slate.VodSourceName == STRING
    input.Body.AdBreaks[_].SpliceInsertMessage.AvailNum == INTEGER
    input.Body.AdBreaks[_].SpliceInsertMessage.AvailsExpected == INTEGER
    input.Body.AdBreaks[_].SpliceInsertMessage.SpliceEventId == INTEGER
    input.Body.AdBreaks[_].SpliceInsertMessage.UniqueProgramId == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentNum == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentationEventId == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentationTypeId == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentationUpid == STRING
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentationUpidType == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SegmentsExpected == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SubSegmentNum == INTEGER
    input.Body.AdBreaks[_].TimeSignalMessage.SegmentationDescriptors[_].SubSegmentsExpected == INTEGER
    input.Body.ScheduleConfiguration.ClipRange.EndOffsetMillis == LONG
    input.Body.ScheduleConfiguration.Transition.DurationMillis == LONG
    input.Body.ScheduleConfiguration.Transition.ScheduledStartTimeMillis == LONG
    input.ReqMap.ChannelName == STRING
    input.ReqMap.ProgramName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateSourceLocation

enum_AccessType := [ "S3_SIGV4", "SECRETS_MANAGER_ACCESS_TOKEN", "AUTODETECT_SIGV4" ]

valid {
    input.Body.AccessConfiguration.AccessType == enum_AccessType[_]
    input.Body.AccessConfiguration.SecretsManagerAccessTokenConfiguration.HeaderName == STRING
    input.Body.AccessConfiguration.SecretsManagerAccessTokenConfiguration.SecretArn == STRING
    input.Body.AccessConfiguration.SecretsManagerAccessTokenConfiguration.SecretStringKey == STRING
    input.Body.DefaultSegmentDeliveryConfiguration.BaseUrl == STRING
    input.Body.HttpConfiguration.BaseUrl == STRING
    input.Body.SegmentDeliveryConfigurations[_].BaseUrl == STRING
    input.Body.SegmentDeliveryConfigurations[_].Name == STRING
    input.ReqMap.SourceLocationName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateVodSource

enum_Type := [ "DASH", "HLS" ]

valid {
    input.Body.HttpPackageConfigurations[_].Path == STRING
    input.Body.HttpPackageConfigurations[_].SourceGroup == STRING
    input.Body.HttpPackageConfigurations[_].Type == enum_Type[_]
    input.ReqMap.SourceLocationName == STRING
    input.ReqMap.VodSourceName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}