CreateActivity

enum_EncryptionType := [ "AWS_OWNED_KEY", "CUSTOMER_MANAGED_KMS_KEY" ]

valid {
    input.Body.name == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.Body.encryptionConfiguration.kmsKeyId == STRING
    input.Body.encryptionConfiguration.kmsDataKeyReusePeriodSeconds == INTEGER
    input.Body.encryptionConfiguration.type == enum_EncryptionType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateStateMachine

enum_EncryptionType := [ "AWS_OWNED_KEY", "CUSTOMER_MANAGED_KMS_KEY" ]
enum_LogLevel := [ "ALL", "ERROR", "FATAL", "OFF" ]
enum_StateMachineType := [ "STANDARD", "EXPRESS" ]

valid {
    input.Body.name == STRING
    input.Body.definition == STRING
    input.Body.roleArn == STRING
    input.Body.type == enum_StateMachineType[_]
    input.Body.loggingConfiguration.level == enum_LogLevel[_]
    input.Body.loggingConfiguration.includeExecutionData == BOOLEAN
    input.Body.loggingConfiguration.destinations[_].cloudWatchLogsLogGroup.logGroupArn == STRING
    input.Body.tags[_].key == STRING
    input.Body.tags[_].value == STRING
    input.Body.tracingConfiguration.enabled == BOOLEAN
    input.Body.publish == BOOLEAN
    input.Body.versionDescription == STRING
    input.Body.encryptionConfiguration.kmsKeyId == STRING
    input.Body.encryptionConfiguration.kmsDataKeyReusePeriodSeconds == INTEGER
    input.Body.encryptionConfiguration.type == enum_EncryptionType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateStateMachineAlias

valid {
    input.Body.description == STRING
    input.Body.name == STRING
    input.Body.routingConfiguration[_].stateMachineVersionArn == STRING
    input.Body.routingConfiguration[_].weight == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteActivity

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

DeleteStateMachine

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

DeleteStateMachineAlias

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

DeleteStateMachineVersion

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

DescribeActivity

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

DescribeExecution

enum_IncludedData := [ "ALL_DATA", "METADATA_ONLY" ]

valid {
    input.Body.executionArn == STRING
    input.Body.includedData == enum_IncludedData[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeMapRun

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

DescribeStateMachine

enum_IncludedData := [ "ALL_DATA", "METADATA_ONLY" ]

valid {
    input.Body.stateMachineArn == STRING
    input.Body.includedData == enum_IncludedData[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeStateMachineAlias

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

DescribeStateMachineForExecution

enum_IncludedData := [ "ALL_DATA", "METADATA_ONLY" ]

valid {
    input.Body.executionArn == STRING
    input.Body.includedData == enum_IncludedData[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetActivityTask

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

GetExecutionHistory

valid {
    input.Body.executionArn == STRING
    input.Body.maxResults == INTEGER
    input.Body.reverseOrder == BOOLEAN
    input.Body.nextToken == STRING
    input.Body.includeExecutionData == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListActivities

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

ListExecutions

enum_ExecutionRedriveFilter := [ "REDRIVEN", "NOT_REDRIVEN" ]
enum_ExecutionStatus := [ "RUNNING", "SUCCEEDED", "FAILED", "TIMED_OUT", "ABORTED", "PENDING_REDRIVE" ]

valid {
    input.Body.stateMachineArn == STRING
    input.Body.statusFilter == enum_ExecutionStatus[_]
    input.Body.maxResults == INTEGER
    input.Body.nextToken == STRING
    input.Body.mapRunArn == STRING
    input.Body.redriveFilter == enum_ExecutionRedriveFilter[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListMapRuns

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

ListStateMachineAliases

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

ListStateMachineVersions

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

ListStateMachines

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

ListTagsForResource

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

PublishStateMachineVersion

valid {
    input.Body.stateMachineArn == STRING
    input.Body.revisionId == STRING
    input.Body.description == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RedriveExecution

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

SendTaskFailure

valid {
    input.Body.taskToken == STRING
    input.Body.error == STRING
    input.Body.cause == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SendTaskHeartbeat

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

SendTaskSuccess

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

StartExecution

valid {
    input.Body.stateMachineArn == STRING
    input.Body.name == STRING
    input.Body.input == STRING
    input.Body.traceHeader == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartSyncExecution

enum_IncludedData := [ "ALL_DATA", "METADATA_ONLY" ]

valid {
    input.Body.stateMachineArn == STRING
    input.Body.name == STRING
    input.Body.input == STRING
    input.Body.traceHeader == STRING
    input.Body.includedData == enum_IncludedData[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StopExecution

valid {
    input.Body.executionArn == STRING
    input.Body.error == STRING
    input.Body.cause == STRING
    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
}

TestState

enum_InspectionLevel := [ "INFO", "DEBUG", "TRACE" ]

valid {
    input.Body.definition == STRING
    input.Body.roleArn == STRING
    input.Body.input == STRING
    input.Body.inspectionLevel == enum_InspectionLevel[_]
    input.Body.revealSecrets == BOOLEAN
    input.Body.variables == 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
}

UpdateMapRun

valid {
    input.Body.mapRunArn == STRING
    input.Body.maxConcurrency == INTEGER
    input.Body.toleratedFailurePercentage == FLOAT
    input.Body.toleratedFailureCount == LONG
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateStateMachine

enum_EncryptionType := [ "AWS_OWNED_KEY", "CUSTOMER_MANAGED_KMS_KEY" ]
enum_LogLevel := [ "ALL", "ERROR", "FATAL", "OFF" ]

valid {
    input.Body.stateMachineArn == STRING
    input.Body.definition == STRING
    input.Body.roleArn == STRING
    input.Body.loggingConfiguration.level == enum_LogLevel[_]
    input.Body.loggingConfiguration.includeExecutionData == BOOLEAN
    input.Body.loggingConfiguration.destinations[_].cloudWatchLogsLogGroup.logGroupArn == STRING
    input.Body.tracingConfiguration.enabled == BOOLEAN
    input.Body.publish == BOOLEAN
    input.Body.versionDescription == STRING
    input.Body.encryptionConfiguration.kmsKeyId == STRING
    input.Body.encryptionConfiguration.kmsDataKeyReusePeriodSeconds == INTEGER
    input.Body.encryptionConfiguration.type == enum_EncryptionType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateStateMachineAlias

valid {
    input.Body.stateMachineAliasArn == STRING
    input.Body.description == STRING
    input.Body.routingConfiguration[_].stateMachineVersionArn == STRING
    input.Body.routingConfiguration[_].weight == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ValidateStateMachineDefinition

enum_StateMachineType := [ "STANDARD", "EXPRESS" ]
enum_ValidateStateMachineDefinitionSeverity := [ "ERROR", "WARNING" ]

valid {
    input.Body.definition == STRING
    input.Body.type == enum_StateMachineType[_]
    input.Body.severity == enum_ValidateStateMachineDefinitionSeverity[_]
    input.Body.maxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}