DATAEXCHANGE

AcceptDataGrant

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

CancelJob

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

CreateDataGrant

enum_GrantDistributionScope := [ "AWS_ORGANIZATION", "NONE" ]

valid {
    input.Body.Name == STRING
    input.Body.GrantDistributionScope == enum_GrantDistributionScope[_]
    input.Body.ReceiverPrincipal == STRING
    input.Body.SourceDataSetId == STRING
    input.Body.EndsAt == TIMESTAMP
    input.Body.Description == STRING
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateDataSet

enum_AssetType := [ "S3_SNAPSHOT", "REDSHIFT_DATA_SHARE", "API_GATEWAY_API", "S3_DATA_ACCESS", "LAKE_FORMATION_DATA_PERMISSION" ]

valid {
    input.Body.AssetType == enum_AssetType[_]
    input.Body.Description == STRING
    input.Body.Name == STRING
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateEventAction

enum_ServerSideEncryptionTypes := [ "aws:kms", "AES256" ]

valid {
    input.Body.Action.ExportRevisionToS3.Encryption.KmsKeyArn == STRING
    input.Body.Action.ExportRevisionToS3.Encryption.Type == enum_ServerSideEncryptionTypes[_]
    input.Body.Action.ExportRevisionToS3.RevisionDestination.Bucket == STRING
    input.Body.Action.ExportRevisionToS3.RevisionDestination.KeyPattern == STRING
    input.Body.Event.RevisionPublished.DataSetId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateJob

enum_DatabaseLFTagPolicyPermission := [ "DESCRIBE" ]
enum_ProtocolType := [ "REST" ]
enum_ServerSideEncryptionTypes := [ "aws:kms", "AES256" ]
enum_TableTagPolicyLFPermission := [ "DESCRIBE", "SELECT" ]
enum_Type := [ "IMPORT_ASSETS_FROM_S3", "IMPORT_ASSET_FROM_SIGNED_URL", "EXPORT_ASSETS_TO_S3", "EXPORT_ASSET_TO_SIGNED_URL", "EXPORT_REVISIONS_TO_S3", "IMPORT_ASSETS_FROM_REDSHIFT_DATA_SHARES", "IMPORT_ASSET_FROM_API_GATEWAY_API", "CREATE_S3_DATA_ACCESS_FROM_S3_BUCKET", "IMPORT_ASSETS_FROM_LAKE_FORMATION_TAG_POLICY" ]

valid {
    input.Body.Details.ExportAssetToSignedUrl.AssetId == STRING
    input.Body.Details.ExportAssetToSignedUrl.DataSetId == STRING
    input.Body.Details.ExportAssetToSignedUrl.RevisionId == STRING
    input.Body.Details.ExportAssetsToS3.AssetDestinations[_].AssetId == STRING
    input.Body.Details.ExportAssetsToS3.AssetDestinations[_].Bucket == STRING
    input.Body.Details.ExportAssetsToS3.AssetDestinations[_].Key == STRING
    input.Body.Details.ExportAssetsToS3.DataSetId == STRING
    input.Body.Details.ExportAssetsToS3.Encryption.KmsKeyArn == STRING
    input.Body.Details.ExportAssetsToS3.Encryption.Type == enum_ServerSideEncryptionTypes[_]
    input.Body.Details.ExportAssetsToS3.RevisionId == STRING
    input.Body.Details.ExportRevisionsToS3.DataSetId == STRING
    input.Body.Details.ExportRevisionsToS3.Encryption.KmsKeyArn == STRING
    input.Body.Details.ExportRevisionsToS3.Encryption.Type == enum_ServerSideEncryptionTypes[_]
    input.Body.Details.ExportRevisionsToS3.RevisionDestinations[_].Bucket == STRING
    input.Body.Details.ExportRevisionsToS3.RevisionDestinations[_].KeyPattern == STRING
    input.Body.Details.ExportRevisionsToS3.RevisionDestinations[_].RevisionId == STRING
    input.Body.Details.ImportAssetFromSignedUrl.AssetName == STRING
    input.Body.Details.ImportAssetFromSignedUrl.DataSetId == STRING
    input.Body.Details.ImportAssetFromSignedUrl.Md5Hash == STRING
    input.Body.Details.ImportAssetFromSignedUrl.RevisionId == STRING
    input.Body.Details.ImportAssetsFromS3.AssetSources[_].Bucket == STRING
    input.Body.Details.ImportAssetsFromS3.AssetSources[_].Key == STRING
    input.Body.Details.ImportAssetsFromS3.DataSetId == STRING
    input.Body.Details.ImportAssetsFromS3.RevisionId == STRING
    input.Body.Details.ImportAssetsFromRedshiftDataShares.AssetSources[_].DataShareArn == STRING
    input.Body.Details.ImportAssetsFromRedshiftDataShares.DataSetId == STRING
    input.Body.Details.ImportAssetsFromRedshiftDataShares.RevisionId == STRING
    input.Body.Details.ImportAssetFromApiGatewayApi.ApiDescription == STRING
    input.Body.Details.ImportAssetFromApiGatewayApi.ApiId == STRING
    input.Body.Details.ImportAssetFromApiGatewayApi.ApiKey == STRING
    input.Body.Details.ImportAssetFromApiGatewayApi.ApiName == STRING
    input.Body.Details.ImportAssetFromApiGatewayApi.ApiSpecificationMd5Hash == STRING
    input.Body.Details.ImportAssetFromApiGatewayApi.DataSetId == STRING
    input.Body.Details.ImportAssetFromApiGatewayApi.ProtocolType == enum_ProtocolType[_]
    input.Body.Details.ImportAssetFromApiGatewayApi.RevisionId == STRING
    input.Body.Details.ImportAssetFromApiGatewayApi.Stage == STRING
    input.Body.Details.CreateS3DataAccessFromS3Bucket.AssetSource.Bucket == STRING
    input.Body.Details.CreateS3DataAccessFromS3Bucket.AssetSource.KeyPrefixes[_] == STRING
    input.Body.Details.CreateS3DataAccessFromS3Bucket.AssetSource.Keys[_] == STRING
    input.Body.Details.CreateS3DataAccessFromS3Bucket.AssetSource.KmsKeysToGrant[_].KmsKeyArn == STRING
    input.Body.Details.CreateS3DataAccessFromS3Bucket.DataSetId == STRING
    input.Body.Details.CreateS3DataAccessFromS3Bucket.RevisionId == STRING
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.CatalogId == STRING
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.Database.Expression[_].TagKey == STRING
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.Database.Expression[_].TagValues[_] == STRING
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.Database.Permissions[_] == enum_DatabaseLFTagPolicyPermission[_]
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.Table.Expression[_].TagKey == STRING
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.Table.Expression[_].TagValues[_] == STRING
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.Table.Permissions[_] == enum_TableTagPolicyLFPermission[_]
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.RoleArn == STRING
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.DataSetId == STRING
    input.Body.Details.ImportAssetsFromLakeFormationTagPolicy.RevisionId == STRING
    input.Body.Type == enum_Type[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateRevision

valid {
    input.Body.Comment == STRING
    input.Body.Tags.STRING == STRING
    input.ReqMap.DataSetId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteAsset

valid {
    input.ReqMap.AssetId == STRING
    input.ReqMap.DataSetId == STRING
    input.ReqMap.RevisionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteDataGrant

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

DeleteDataSet

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

DeleteEventAction

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

DeleteRevision

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

GetAsset

valid {
    input.ReqMap.AssetId == STRING
    input.ReqMap.DataSetId == STRING
    input.ReqMap.RevisionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetDataGrant

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

GetDataSet

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

GetEventAction

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

GetJob

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

GetReceivedDataGrant

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

GetRevision

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

ListDataGrants

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

ListDataSetRevisions

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

ListDataSets

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

ListEventActions

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

ListJobs

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

ListReceivedDataGrants

enum_AcceptanceStateFilterValue := [ "PENDING_RECEIVER_ACCEPTANCE", "ACCEPTED" ]

valid {
    input.Qs.maxResults == INTEGER
    input.Qs.nextToken == STRING
    input.Qs.acceptanceState[_] == enum_AcceptanceStateFilterValue[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRevisionAssets

valid {
    input.ReqMap.DataSetId == STRING
    input.ReqMap.RevisionId == STRING
    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
}

RevokeRevision

valid {
    input.Body.RevocationComment == STRING
    input.ReqMap.DataSetId == STRING
    input.ReqMap.RevisionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SendApiAsset

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

SendDataSetNotification

enum_NotificationType := [ "DATA_DELAY", "DATA_UPDATE", "DEPRECATION", "SCHEMA_CHANGE" ]
enum_SchemaChangeType := [ "ADD", "REMOVE", "MODIFY" ]

valid {
    input.Body.Scope.LakeFormationTagPolicies[_].Database == STRING
    input.Body.Scope.LakeFormationTagPolicies[_].Table == STRING
    input.Body.Scope.RedshiftDataShares[_].Arn == STRING
    input.Body.Scope.RedshiftDataShares[_].Database == STRING
    input.Body.Scope.RedshiftDataShares[_].Function == STRING
    input.Body.Scope.RedshiftDataShares[_].Table == STRING
    input.Body.Scope.RedshiftDataShares[_].Schema == STRING
    input.Body.Scope.RedshiftDataShares[_].View == STRING
    input.Body.Scope.S3DataAccesses[_].KeyPrefixes[_] == STRING
    input.Body.Scope.S3DataAccesses[_].Keys[_] == STRING
    input.Body.ClientToken == STRING
    input.Body.Comment == STRING
    input.Body.Details.DataUpdate.DataUpdatedAt == TIMESTAMP
    input.Body.Details.Deprecation.DeprecationAt == TIMESTAMP
    input.Body.Details.SchemaChange.Changes[_].Name == STRING
    input.Body.Details.SchemaChange.Changes[_].Type == enum_SchemaChangeType[_]
    input.Body.Details.SchemaChange.Changes[_].Description == STRING
    input.Body.Details.SchemaChange.SchemaChangeAt == TIMESTAMP
    input.Body.Type == enum_NotificationType[_]
    input.ReqMap.DataSetId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartJob

valid {
    input.ReqMap.JobId == 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
}

UpdateAsset

valid {
    input.Body.Name == STRING
    input.ReqMap.AssetId == STRING
    input.ReqMap.DataSetId == STRING
    input.ReqMap.RevisionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateDataSet

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

UpdateEventAction

enum_ServerSideEncryptionTypes := [ "aws:kms", "AES256" ]

valid {
    input.Body.Action.ExportRevisionToS3.Encryption.KmsKeyArn == STRING
    input.Body.Action.ExportRevisionToS3.Encryption.Type == enum_ServerSideEncryptionTypes[_]
    input.Body.Action.ExportRevisionToS3.RevisionDestination.Bucket == STRING
    input.Body.Action.ExportRevisionToS3.RevisionDestination.KeyPattern == STRING
    input.ReqMap.EventActionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateRevision

valid {
    input.Body.Comment == STRING
    input.Body.Finalized == BOOLEAN
    input.ReqMap.DataSetId == STRING
    input.ReqMap.RevisionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}