CreateChatToken

enum_ChatTokenCapability := [ "SEND_MESSAGE", "DISCONNECT_USER", "DELETE_MESSAGE" ]

valid {
    input.Body.roomIdentifier == STRING
    input.Body.userId == STRING
    input.Body.capabilities[_] == enum_ChatTokenCapability[_]
    input.Body.sessionDurationInMinutes == INTEGER
    input.Body.attributes.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateLoggingConfiguration

valid {
    input.Body.name == STRING
    input.Body.destinationConfiguration.s3.bucketName == STRING
    input.Body.destinationConfiguration.cloudWatchLogs.logGroupName == STRING
    input.Body.destinationConfiguration.firehose.deliveryStreamName == STRING
    input.Body.tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateRoom

enum_FallbackResult := [ "ALLOW", "DENY" ]

valid {
    input.Body.name == STRING
    input.Body.maximumMessageRatePerSecond == INTEGER
    input.Body.maximumMessageLength == INTEGER
    input.Body.messageReviewHandler.uri == STRING
    input.Body.messageReviewHandler.fallbackResult == enum_FallbackResult[_]
    input.Body.tags.STRING == STRING
    input.Body.loggingConfigurationIdentifiers[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteLoggingConfiguration

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

DeleteMessage

valid {
    input.Body.roomIdentifier == STRING
    input.Body.id == STRING
    input.Body.reason == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteRoom

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

DisconnectUser

valid {
    input.Body.roomIdentifier == STRING
    input.Body.userId == STRING
    input.Body.reason == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetLoggingConfiguration

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

GetRoom

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

ListLoggingConfigurations

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

ListRooms

valid {
    input.Body.name == STRING
    input.Body.nextToken == STRING
    input.Body.maxResults == INTEGER
    input.Body.messageReviewHandlerUri == STRING
    input.Body.loggingConfigurationIdentifier == 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
}

SendEvent

valid {
    input.Body.roomIdentifier == STRING
    input.Body.eventName == STRING
    input.Body.attributes.STRING == 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
}

UpdateLoggingConfiguration

valid {
    input.Body.identifier == STRING
    input.Body.name == STRING
    input.Body.destinationConfiguration.s3.bucketName == STRING
    input.Body.destinationConfiguration.cloudWatchLogs.logGroupName == STRING
    input.Body.destinationConfiguration.firehose.deliveryStreamName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateRoom

enum_FallbackResult := [ "ALLOW", "DENY" ]

valid {
    input.Body.identifier == STRING
    input.Body.name == STRING
    input.Body.maximumMessageRatePerSecond == INTEGER
    input.Body.maximumMessageLength == INTEGER
    input.Body.messageReviewHandler.uri == STRING
    input.Body.messageReviewHandler.fallbackResult == enum_FallbackResult[_]
    input.Body.loggingConfigurationIdentifiers[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}