CancelLegalHold

valid {
    input.ReqMap.legalHoldId == STRING
    input.Qs.cancelDescription == STRING
    input.Qs.retainRecordInDays == LONG
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateBackupPlan

valid {
    input.Body.BackupPlan.BackupPlanName == STRING
    input.Body.BackupPlan.Rules[_].RuleName == STRING
    input.Body.BackupPlan.Rules[_].TargetBackupVaultName == STRING
    input.Body.BackupPlan.Rules[_].ScheduleExpression == STRING
    input.Body.BackupPlan.Rules[_].StartWindowMinutes == LONG
    input.Body.BackupPlan.Rules[_].CompletionWindowMinutes == LONG
    input.Body.BackupPlan.Rules[_].Lifecycle.MoveToColdStorageAfterDays == LONG
    input.Body.BackupPlan.Rules[_].Lifecycle.DeleteAfterDays == LONG
    input.Body.BackupPlan.Rules[_].Lifecycle.OptInToArchiveForSupportedResources == BOOLEAN
    input.Body.BackupPlan.Rules[_].RecoveryPointTags.STRING == STRING
    input.Body.BackupPlan.Rules[_].CopyActions[_].Lifecycle.MoveToColdStorageAfterDays == LONG
    input.Body.BackupPlan.Rules[_].CopyActions[_].Lifecycle.DeleteAfterDays == LONG
    input.Body.BackupPlan.Rules[_].CopyActions[_].Lifecycle.OptInToArchiveForSupportedResources == BOOLEAN
    input.Body.BackupPlan.Rules[_].CopyActions[_].DestinationBackupVaultArn == STRING
    input.Body.BackupPlan.Rules[_].EnableContinuousBackup == BOOLEAN
    input.Body.BackupPlan.Rules[_].ScheduleExpressionTimezone == STRING
    input.Body.BackupPlan.AdvancedBackupSettings[_].ResourceType == STRING
    input.Body.BackupPlan.AdvancedBackupSettings[_].BackupOptions.STRING == STRING
    input.Body.BackupPlanTags.STRING == STRING
    input.Body.CreatorRequestId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateBackupSelection

enum_ConditionType := [ "STRINGEQUALS" ]

valid {
    input.Body.BackupSelection.SelectionName == STRING
    input.Body.BackupSelection.IamRoleArn == STRING
    input.Body.BackupSelection.Resources[_] == STRING
    input.Body.BackupSelection.ListOfTags[_].ConditionType == enum_ConditionType[_]
    input.Body.BackupSelection.ListOfTags[_].ConditionKey == STRING
    input.Body.BackupSelection.ListOfTags[_].ConditionValue == STRING
    input.Body.BackupSelection.NotResources[_] == STRING
    input.Body.BackupSelection.Conditions.StringEquals[_].ConditionKey == STRING
    input.Body.BackupSelection.Conditions.StringEquals[_].ConditionValue == STRING
    input.Body.BackupSelection.Conditions.StringNotEquals[_].ConditionKey == STRING
    input.Body.BackupSelection.Conditions.StringNotEquals[_].ConditionValue == STRING
    input.Body.BackupSelection.Conditions.StringLike[_].ConditionKey == STRING
    input.Body.BackupSelection.Conditions.StringLike[_].ConditionValue == STRING
    input.Body.BackupSelection.Conditions.StringNotLike[_].ConditionKey == STRING
    input.Body.BackupSelection.Conditions.StringNotLike[_].ConditionValue == STRING
    input.Body.CreatorRequestId == STRING
    input.ReqMap.backupPlanId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateBackupVault

valid {
    input.Body.BackupVaultTags.STRING == STRING
    input.Body.EncryptionKeyArn == STRING
    input.Body.CreatorRequestId == STRING
    input.ReqMap.backupVaultName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateFramework

valid {
    input.Body.FrameworkName == STRING
    input.Body.FrameworkDescription == STRING
    input.Body.FrameworkControls[_].ControlName == STRING
    input.Body.FrameworkControls[_].ControlInputParameters[_].ParameterName == STRING
    input.Body.FrameworkControls[_].ControlInputParameters[_].ParameterValue == STRING
    input.Body.FrameworkControls[_].ControlScope.ComplianceResourceIds[_] == STRING
    input.Body.FrameworkControls[_].ControlScope.ComplianceResourceTypes[_] == STRING
    input.Body.FrameworkControls[_].ControlScope.Tags.STRING == STRING
    input.Body.IdempotencyToken == STRING
    input.Body.FrameworkTags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateLegalHold

valid {
    input.Body.Title == STRING
    input.Body.Description == STRING
    input.Body.IdempotencyToken == STRING
    input.Body.RecoveryPointSelection.VaultNames[_] == STRING
    input.Body.RecoveryPointSelection.ResourceIdentifiers[_] == STRING
    input.Body.RecoveryPointSelection.DateRange.FromDate == TIMESTAMP
    input.Body.RecoveryPointSelection.DateRange.ToDate == TIMESTAMP
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateLogicallyAirGappedBackupVault

valid {
    input.Body.BackupVaultTags.STRING == STRING
    input.Body.CreatorRequestId == STRING
    input.Body.MinRetentionDays == LONG
    input.Body.MaxRetentionDays == LONG
    input.ReqMap.backupVaultName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateReportPlan

valid {
    input.Body.ReportPlanName == STRING
    input.Body.ReportPlanDescription == STRING
    input.Body.ReportDeliveryChannel.S3BucketName == STRING
    input.Body.ReportDeliveryChannel.S3KeyPrefix == STRING
    input.Body.ReportDeliveryChannel.Formats[_] == STRING
    input.Body.ReportSetting.ReportTemplate == STRING
    input.Body.ReportSetting.FrameworkArns[_] == STRING
    input.Body.ReportSetting.NumberOfFrameworks == INTEGER
    input.Body.ReportSetting.Accounts[_] == STRING
    input.Body.ReportSetting.OrganizationUnits[_] == STRING
    input.Body.ReportSetting.Regions[_] == STRING
    input.Body.ReportPlanTags.STRING == STRING
    input.Body.IdempotencyToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateRestoreTestingPlan

enum_RestoreTestingRecoveryPointSelectionAlgorithm := [ "LATEST_WITHIN_WINDOW", "RANDOM_WITHIN_WINDOW" ]
enum_RestoreTestingRecoveryPointType := [ "CONTINUOUS", "SNAPSHOT" ]

valid {
    input.Body.CreatorRequestId == STRING
    input.Body.RestoreTestingPlan.RecoveryPointSelection.Algorithm == enum_RestoreTestingRecoveryPointSelectionAlgorithm[_]
    input.Body.RestoreTestingPlan.RecoveryPointSelection.ExcludeVaults[_] == STRING
    input.Body.RestoreTestingPlan.RecoveryPointSelection.IncludeVaults[_] == STRING
    input.Body.RestoreTestingPlan.RecoveryPointSelection.RecoveryPointTypes[_] == enum_RestoreTestingRecoveryPointType[_]
    input.Body.RestoreTestingPlan.RecoveryPointSelection.SelectionWindowDays == INTEGER
    input.Body.RestoreTestingPlan.RestoreTestingPlanName == STRING
    input.Body.RestoreTestingPlan.ScheduleExpression == STRING
    input.Body.RestoreTestingPlan.ScheduleExpressionTimezone == STRING
    input.Body.RestoreTestingPlan.StartWindowHours == INTEGER
    input.Body.Tags.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

CreateRestoreTestingSelection

valid {
    input.Body.CreatorRequestId == STRING
    input.Body.RestoreTestingSelection.IamRoleArn == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceArns[_] == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceConditions.StringEquals[_].Key == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceConditions.StringEquals[_].Value == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceConditions.StringNotEquals[_].Key == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceConditions.StringNotEquals[_].Value == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceType == STRING
    input.Body.RestoreTestingSelection.RestoreMetadataOverrides.STRING == STRING
    input.Body.RestoreTestingSelection.RestoreTestingSelectionName == STRING
    input.Body.RestoreTestingSelection.ValidationWindowHours == INTEGER
    input.ReqMap.RestoreTestingPlanName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteBackupPlan

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

DeleteBackupSelection

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

DeleteBackupVault

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

DeleteBackupVaultAccessPolicy

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

DeleteBackupVaultLockConfiguration

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

DeleteBackupVaultNotifications

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

DeleteFramework

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

DeleteRecoveryPoint

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

DeleteReportPlan

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

DeleteRestoreTestingPlan

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

DeleteRestoreTestingSelection

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

DescribeBackupJob

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

DescribeBackupVault

valid {
    input.ReqMap.backupVaultName == STRING
    input.Qs.backupVaultAccountId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeCopyJob

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

DescribeFramework

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

DescribeGlobalSettings

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

DescribeProtectedResource

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

DescribeRecoveryPoint

valid {
    input.ReqMap.backupVaultName == STRING
    input.ReqMap.recoveryPointArn == STRING
    input.Qs.backupVaultAccountId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeRegionSettings

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

DescribeReportJob

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

DescribeReportPlan

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

DescribeRestoreJob

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

DisassociateRecoveryPoint

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

DisassociateRecoveryPointFromParent

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

ExportBackupPlanTemplate

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

GetBackupPlan

valid {
    input.ReqMap.backupPlanId == STRING
    input.Qs.versionId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetBackupPlanFromJSON

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

GetBackupPlanFromTemplate

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

GetBackupSelection

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

GetBackupVaultAccessPolicy

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

GetBackupVaultNotifications

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

GetLegalHold

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

GetRecoveryPointRestoreMetadata

valid {
    input.ReqMap.backupVaultName == STRING
    input.ReqMap.recoveryPointArn == STRING
    input.Qs.backupVaultAccountId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetRestoreJobMetadata

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

GetRestoreTestingInferredMetadata

valid {
    input.Qs.BackupVaultAccountId == STRING
    input.Qs.BackupVaultName == STRING
    input.Qs.RecoveryPointArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

GetRestoreTestingPlan

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

GetRestoreTestingSelection

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

GetSupportedResourceTypes

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

ListBackupJobSummaries

enum_AggregationPeriod := [ "ONE_DAY", "SEVEN_DAYS", "FOURTEEN_DAYS" ]
enum_BackupJobStatus := [ "CREATED", "PENDING", "RUNNING", "ABORTING", "ABORTED", "COMPLETED", "FAILED", "EXPIRED", "PARTIAL", "AGGREGATE_ALL", "ANY" ]

valid {
    input.Qs.AccountId == STRING
    input.Qs.State == enum_BackupJobStatus[_]
    input.Qs.ResourceType == STRING
    input.Qs.MessageCategory == STRING
    input.Qs.AggregationPeriod == enum_AggregationPeriod[_]
    input.Qs.MaxResults == INTEGER
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListBackupJobs

enum_BackupJobState := [ "CREATED", "PENDING", "RUNNING", "ABORTING", "ABORTED", "COMPLETED", "FAILED", "EXPIRED", "PARTIAL" ]

valid {
    input.Qs.nextToken == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.resourceArn == STRING
    input.Qs.state == enum_BackupJobState[_]
    input.Qs.backupVaultName == STRING
    input.Qs.createdBefore == TIMESTAMP
    input.Qs.createdAfter == TIMESTAMP
    input.Qs.resourceType == STRING
    input.Qs.accountId == STRING
    input.Qs.completeAfter == TIMESTAMP
    input.Qs.completeBefore == TIMESTAMP
    input.Qs.parentJobId == STRING
    input.Qs.messageCategory == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListBackupPlanTemplates

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

ListBackupPlanVersions

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

ListBackupPlans

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

ListBackupSelections

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

ListBackupVaults

enum_VaultType := [ "BACKUP_VAULT", "LOGICALLY_AIR_GAPPED_BACKUP_VAULT" ]

valid {
    input.Qs.vaultType == enum_VaultType[_]
    input.Qs.shared == BOOLEAN
    input.Qs.nextToken == STRING
    input.Qs.maxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListCopyJobSummaries

enum_AggregationPeriod := [ "ONE_DAY", "SEVEN_DAYS", "FOURTEEN_DAYS" ]
enum_CopyJobStatus := [ "CREATED", "RUNNING", "ABORTING", "ABORTED", "COMPLETING", "COMPLETED", "FAILING", "FAILED", "PARTIAL", "AGGREGATE_ALL", "ANY" ]

valid {
    input.Qs.AccountId == STRING
    input.Qs.State == enum_CopyJobStatus[_]
    input.Qs.ResourceType == STRING
    input.Qs.MessageCategory == STRING
    input.Qs.AggregationPeriod == enum_AggregationPeriod[_]
    input.Qs.MaxResults == INTEGER
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListCopyJobs

enum_CopyJobState := [ "CREATED", "RUNNING", "COMPLETED", "FAILED", "PARTIAL" ]

valid {
    input.Qs.nextToken == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.resourceArn == STRING
    input.Qs.state == enum_CopyJobState[_]
    input.Qs.createdBefore == TIMESTAMP
    input.Qs.createdAfter == TIMESTAMP
    input.Qs.resourceType == STRING
    input.Qs.destinationVaultArn == STRING
    input.Qs.accountId == STRING
    input.Qs.completeBefore == TIMESTAMP
    input.Qs.completeAfter == TIMESTAMP
    input.Qs.parentJobId == STRING
    input.Qs.messageCategory == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListFrameworks

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

ListLegalHolds

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

ListProtectedResources

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

ListProtectedResourcesByBackupVault

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

ListRecoveryPointsByBackupVault

valid {
    input.ReqMap.backupVaultName == STRING
    input.Qs.backupVaultAccountId == STRING
    input.Qs.nextToken == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.resourceArn == STRING
    input.Qs.resourceType == STRING
    input.Qs.backupPlanId == STRING
    input.Qs.createdBefore == TIMESTAMP
    input.Qs.createdAfter == TIMESTAMP
    input.Qs.parentRecoveryPointArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRecoveryPointsByLegalHold

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

ListRecoveryPointsByResource

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

ListReportJobs

valid {
    input.Qs.ReportPlanName == STRING
    input.Qs.CreationBefore == TIMESTAMP
    input.Qs.CreationAfter == TIMESTAMP
    input.Qs.Status == STRING
    input.Qs.MaxResults == INTEGER
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListReportPlans

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

ListRestoreJobSummaries

enum_AggregationPeriod := [ "ONE_DAY", "SEVEN_DAYS", "FOURTEEN_DAYS" ]
enum_RestoreJobState := [ "CREATED", "PENDING", "RUNNING", "ABORTED", "COMPLETED", "FAILED", "AGGREGATE_ALL", "ANY" ]

valid {
    input.Qs.AccountId == STRING
    input.Qs.State == enum_RestoreJobState[_]
    input.Qs.ResourceType == STRING
    input.Qs.AggregationPeriod == enum_AggregationPeriod[_]
    input.Qs.MaxResults == INTEGER
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRestoreJobs

enum_RestoreJobStatus := [ "PENDING", "RUNNING", "COMPLETED", "ABORTED", "FAILED" ]

valid {
    input.Qs.nextToken == STRING
    input.Qs.maxResults == INTEGER
    input.Qs.accountId == STRING
    input.Qs.resourceType == STRING
    input.Qs.createdBefore == TIMESTAMP
    input.Qs.createdAfter == TIMESTAMP
    input.Qs.status == enum_RestoreJobStatus[_]
    input.Qs.completeBefore == TIMESTAMP
    input.Qs.completeAfter == TIMESTAMP
    input.Qs.restoreTestingPlanArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRestoreJobsByProtectedResource

enum_RestoreJobStatus := [ "PENDING", "RUNNING", "COMPLETED", "ABORTED", "FAILED" ]

valid {
    input.ReqMap.resourceArn == STRING
    input.Qs.status == enum_RestoreJobStatus[_]
    input.Qs.recoveryPointCreationDateAfter == TIMESTAMP
    input.Qs.recoveryPointCreationDateBefore == TIMESTAMP
    input.Qs.nextToken == STRING
    input.Qs.maxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRestoreTestingPlans

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

ListRestoreTestingSelections

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

ListTags

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

PutBackupVaultAccessPolicy

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

PutBackupVaultLockConfiguration

valid {
    input.Body.MinRetentionDays == LONG
    input.Body.MaxRetentionDays == LONG
    input.Body.ChangeableForDays == LONG
    input.ReqMap.backupVaultName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutBackupVaultNotifications

enum_BackupVaultEvent := [ "BACKUP_JOB_STARTED", "BACKUP_JOB_COMPLETED", "BACKUP_JOB_SUCCESSFUL", "BACKUP_JOB_FAILED", "BACKUP_JOB_EXPIRED", "RESTORE_JOB_STARTED", "RESTORE_JOB_COMPLETED", "RESTORE_JOB_SUCCESSFUL", "RESTORE_JOB_FAILED", "COPY_JOB_STARTED", "COPY_JOB_SUCCESSFUL", "COPY_JOB_FAILED", "RECOVERY_POINT_MODIFIED", "BACKUP_PLAN_CREATED", "BACKUP_PLAN_MODIFIED", "S3_BACKUP_OBJECT_FAILED", "S3_RESTORE_OBJECT_FAILED" ]

valid {
    input.Body.SNSTopicArn == STRING
    input.Body.BackupVaultEvents[_] == enum_BackupVaultEvent[_]
    input.ReqMap.backupVaultName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutRestoreValidationResult

enum_RestoreValidationStatus := [ "FAILED", "SUCCESSFUL", "TIMED_OUT", "VALIDATING" ]

valid {
    input.Body.ValidationStatus == enum_RestoreValidationStatus[_]
    input.Body.ValidationStatusMessage == STRING
    input.ReqMap.restoreJobId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartBackupJob

valid {
    input.Body.BackupVaultName == STRING
    input.Body.ResourceArn == STRING
    input.Body.IamRoleArn == STRING
    input.Body.IdempotencyToken == STRING
    input.Body.StartWindowMinutes == LONG
    input.Body.CompleteWindowMinutes == LONG
    input.Body.Lifecycle.MoveToColdStorageAfterDays == LONG
    input.Body.Lifecycle.DeleteAfterDays == LONG
    input.Body.Lifecycle.OptInToArchiveForSupportedResources == BOOLEAN
    input.Body.RecoveryPointTags.STRING == STRING
    input.Body.BackupOptions.STRING == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartCopyJob

valid {
    input.Body.RecoveryPointArn == STRING
    input.Body.SourceBackupVaultName == STRING
    input.Body.DestinationBackupVaultArn == STRING
    input.Body.IamRoleArn == STRING
    input.Body.IdempotencyToken == STRING
    input.Body.Lifecycle.MoveToColdStorageAfterDays == LONG
    input.Body.Lifecycle.DeleteAfterDays == LONG
    input.Body.Lifecycle.OptInToArchiveForSupportedResources == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartReportJob

valid {
    input.Body.IdempotencyToken == STRING
    input.ReqMap.reportPlanName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartRestoreJob

valid {
    input.Body.RecoveryPointArn == STRING
    input.Body.Metadata.STRING == STRING
    input.Body.IamRoleArn == STRING
    input.Body.IdempotencyToken == STRING
    input.Body.ResourceType == STRING
    input.Body.CopySourceTagsToRestoredResource == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StopBackupJob

valid {
    input.ReqMap.backupJobId == 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.Body.TagKeyList[_] == STRING
    input.ReqMap.resourceArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateBackupPlan

valid {
    input.Body.BackupPlan.BackupPlanName == STRING
    input.Body.BackupPlan.Rules[_].RuleName == STRING
    input.Body.BackupPlan.Rules[_].TargetBackupVaultName == STRING
    input.Body.BackupPlan.Rules[_].ScheduleExpression == STRING
    input.Body.BackupPlan.Rules[_].StartWindowMinutes == LONG
    input.Body.BackupPlan.Rules[_].CompletionWindowMinutes == LONG
    input.Body.BackupPlan.Rules[_].Lifecycle.MoveToColdStorageAfterDays == LONG
    input.Body.BackupPlan.Rules[_].Lifecycle.DeleteAfterDays == LONG
    input.Body.BackupPlan.Rules[_].Lifecycle.OptInToArchiveForSupportedResources == BOOLEAN
    input.Body.BackupPlan.Rules[_].RecoveryPointTags.STRING == STRING
    input.Body.BackupPlan.Rules[_].CopyActions[_].Lifecycle.MoveToColdStorageAfterDays == LONG
    input.Body.BackupPlan.Rules[_].CopyActions[_].Lifecycle.DeleteAfterDays == LONG
    input.Body.BackupPlan.Rules[_].CopyActions[_].Lifecycle.OptInToArchiveForSupportedResources == BOOLEAN
    input.Body.BackupPlan.Rules[_].CopyActions[_].DestinationBackupVaultArn == STRING
    input.Body.BackupPlan.Rules[_].EnableContinuousBackup == BOOLEAN
    input.Body.BackupPlan.Rules[_].ScheduleExpressionTimezone == STRING
    input.Body.BackupPlan.AdvancedBackupSettings[_].ResourceType == STRING
    input.Body.BackupPlan.AdvancedBackupSettings[_].BackupOptions.STRING == STRING
    input.ReqMap.backupPlanId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateFramework

valid {
    input.Body.FrameworkDescription == STRING
    input.Body.FrameworkControls[_].ControlName == STRING
    input.Body.FrameworkControls[_].ControlInputParameters[_].ParameterName == STRING
    input.Body.FrameworkControls[_].ControlInputParameters[_].ParameterValue == STRING
    input.Body.FrameworkControls[_].ControlScope.ComplianceResourceIds[_] == STRING
    input.Body.FrameworkControls[_].ControlScope.ComplianceResourceTypes[_] == STRING
    input.Body.FrameworkControls[_].ControlScope.Tags.STRING == STRING
    input.Body.IdempotencyToken == STRING
    input.ReqMap.frameworkName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateGlobalSettings

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

UpdateRecoveryPointLifecycle

valid {
    input.Body.Lifecycle.MoveToColdStorageAfterDays == LONG
    input.Body.Lifecycle.DeleteAfterDays == LONG
    input.Body.Lifecycle.OptInToArchiveForSupportedResources == BOOLEAN
    input.ReqMap.backupVaultName == STRING
    input.ReqMap.recoveryPointArn == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateRegionSettings

valid {
    input.Body.ResourceTypeOptInPreference.STRING == BOOLEAN
    input.Body.ResourceTypeManagementPreference.STRING == BOOLEAN
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateReportPlan

valid {
    input.Body.ReportPlanDescription == STRING
    input.Body.ReportDeliveryChannel.S3BucketName == STRING
    input.Body.ReportDeliveryChannel.S3KeyPrefix == STRING
    input.Body.ReportDeliveryChannel.Formats[_] == STRING
    input.Body.ReportSetting.ReportTemplate == STRING
    input.Body.ReportSetting.FrameworkArns[_] == STRING
    input.Body.ReportSetting.NumberOfFrameworks == INTEGER
    input.Body.ReportSetting.Accounts[_] == STRING
    input.Body.ReportSetting.OrganizationUnits[_] == STRING
    input.Body.ReportSetting.Regions[_] == STRING
    input.Body.IdempotencyToken == STRING
    input.ReqMap.reportPlanName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateRestoreTestingPlan

enum_RestoreTestingRecoveryPointSelectionAlgorithm := [ "LATEST_WITHIN_WINDOW", "RANDOM_WITHIN_WINDOW" ]
enum_RestoreTestingRecoveryPointType := [ "CONTINUOUS", "SNAPSHOT" ]

valid {
    input.Body.RestoreTestingPlan.RecoveryPointSelection.Algorithm == enum_RestoreTestingRecoveryPointSelectionAlgorithm[_]
    input.Body.RestoreTestingPlan.RecoveryPointSelection.ExcludeVaults[_] == STRING
    input.Body.RestoreTestingPlan.RecoveryPointSelection.IncludeVaults[_] == STRING
    input.Body.RestoreTestingPlan.RecoveryPointSelection.RecoveryPointTypes[_] == enum_RestoreTestingRecoveryPointType[_]
    input.Body.RestoreTestingPlan.RecoveryPointSelection.SelectionWindowDays == INTEGER
    input.Body.RestoreTestingPlan.ScheduleExpression == STRING
    input.Body.RestoreTestingPlan.ScheduleExpressionTimezone == STRING
    input.Body.RestoreTestingPlan.StartWindowHours == INTEGER
    input.ReqMap.RestoreTestingPlanName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateRestoreTestingSelection

valid {
    input.Body.RestoreTestingSelection.IamRoleArn == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceArns[_] == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceConditions.StringEquals[_].Key == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceConditions.StringEquals[_].Value == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceConditions.StringNotEquals[_].Key == STRING
    input.Body.RestoreTestingSelection.ProtectedResourceConditions.StringNotEquals[_].Value == STRING
    input.Body.RestoreTestingSelection.RestoreMetadataOverrides.STRING == STRING
    input.Body.RestoreTestingSelection.ValidationWindowHours == INTEGER
    input.ReqMap.RestoreTestingPlanName == STRING
    input.ReqMap.RestoreTestingSelectionName == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}