DEVOPS-GURU

AddNotificationChannel

enum_InsightSeverity := [ "LOW", "MEDIUM", "HIGH" ]
enum_NotificationMessageType := [ "NEW_INSIGHT", "CLOSED_INSIGHT", "NEW_ASSOCIATION", "SEVERITY_UPGRADED", "NEW_RECOMMENDATION" ]

valid {
    input.Body.Config.Sns.TopicArn == STRING
    input.Body.Config.Filters.Severities[_] == enum_InsightSeverity[_]
    input.Body.Config.Filters.MessageTypes[_] == enum_NotificationMessageType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DeleteInsight

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

DescribeAccountHealth

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

DescribeAccountOverview

valid {
    input.Body.FromTime == TIMESTAMP
    input.Body.ToTime == TIMESTAMP
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeAnomaly

valid {
    input.ReqMap.Id == STRING
    input.Qs.AccountId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeEventSourcesConfig

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

DescribeFeedback

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

DescribeInsight

valid {
    input.ReqMap.Id == STRING
    input.Qs.AccountId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeOrganizationHealth

valid {
    input.Body.AccountIds[_] == STRING
    input.Body.OrganizationalUnitIds[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeOrganizationOverview

valid {
    input.Body.FromTime == TIMESTAMP
    input.Body.ToTime == TIMESTAMP
    input.Body.AccountIds[_] == STRING
    input.Body.OrganizationalUnitIds[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeOrganizationResourceCollectionHealth

enum_OrganizationResourceCollectionType := [ "AWS_CLOUD_FORMATION", "AWS_SERVICE", "AWS_ACCOUNT", "AWS_TAGS" ]

valid {
    input.Body.OrganizationResourceCollectionType == enum_OrganizationResourceCollectionType[_]
    input.Body.AccountIds[_] == STRING
    input.Body.OrganizationalUnitIds[_] == STRING
    input.Body.NextToken == STRING
    input.Body.MaxResults == INTEGER
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeResourceCollectionHealth

enum_ResourceCollectionType := [ "AWS_CLOUD_FORMATION", "AWS_SERVICE", "AWS_TAGS" ]

valid {
    input.ReqMap.ResourceCollectionType == enum_ResourceCollectionType[_]
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

DescribeServiceIntegration

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

GetCostEstimation

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

GetResourceCollection

enum_ResourceCollectionType := [ "AWS_CLOUD_FORMATION", "AWS_SERVICE", "AWS_TAGS" ]

valid {
    input.ReqMap.ResourceCollectionType == enum_ResourceCollectionType[_]
    input.Qs.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListAnomaliesForInsight

enum_ServiceName := [ "API_GATEWAY", "APPLICATION_ELB", "AUTO_SCALING_GROUP", "CLOUD_FRONT", "DYNAMO_DB", "EC2", "ECS", "EKS", "ELASTIC_BEANSTALK", "ELASTI_CACHE", "ELB", "ES", "KINESIS", "LAMBDA", "NAT_GATEWAY", "NETWORK_ELB", "RDS", "REDSHIFT", "ROUTE_53", "S3", "SAGE_MAKER", "SNS", "SQS", "STEP_FUNCTIONS", "SWF" ]

valid {
    input.Body.StartTimeRange.FromTime == TIMESTAMP
    input.Body.StartTimeRange.ToTime == TIMESTAMP
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.AccountId == STRING
    input.Body.Filters.ServiceCollection.ServiceNames[_] == enum_ServiceName[_]
    input.ReqMap.InsightId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListAnomalousLogGroups

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

ListEvents

enum_EventClass := [ "INFRASTRUCTURE", "DEPLOYMENT", "SECURITY_CHANGE", "CONFIG_CHANGE", "SCHEMA_CHANGE" ]
enum_EventDataSource := [ "AWS_CLOUD_TRAIL", "AWS_CODE_DEPLOY" ]

valid {
    input.Body.Filters.InsightId == STRING
    input.Body.Filters.EventTimeRange.FromTime == TIMESTAMP
    input.Body.Filters.EventTimeRange.ToTime == TIMESTAMP
    input.Body.Filters.EventClass == enum_EventClass[_]
    input.Body.Filters.EventSource == STRING
    input.Body.Filters.DataSource == enum_EventDataSource[_]
    input.Body.Filters.ResourceCollection.CloudFormation.StackNames[_] == STRING
    input.Body.Filters.ResourceCollection.Tags[_].AppBoundaryKey == STRING
    input.Body.Filters.ResourceCollection.Tags[_].TagValues[_] == STRING
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.AccountId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListInsights

enum_InsightType := [ "REACTIVE", "PROACTIVE" ]

valid {
    input.Body.StatusFilter.Ongoing.Type == enum_InsightType[_]
    input.Body.StatusFilter.Closed.Type == enum_InsightType[_]
    input.Body.StatusFilter.Closed.EndTimeRange.FromTime == TIMESTAMP
    input.Body.StatusFilter.Closed.EndTimeRange.ToTime == TIMESTAMP
    input.Body.StatusFilter.Any.Type == enum_InsightType[_]
    input.Body.StatusFilter.Any.StartTimeRange.FromTime == TIMESTAMP
    input.Body.StatusFilter.Any.StartTimeRange.ToTime == TIMESTAMP
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListMonitoredResources

enum_ResourcePermission := [ "FULL_PERMISSION", "MISSING_PERMISSION" ]
enum_ResourceTypeFilter := [ "LOG_GROUPS", "CLOUDFRONT_DISTRIBUTION", "DYNAMODB_TABLE", "EC2_NAT_GATEWAY", "ECS_CLUSTER", "ECS_SERVICE", "EKS_CLUSTER", "ELASTIC_BEANSTALK_ENVIRONMENT", "ELASTIC_LOAD_BALANCER_LOAD_BALANCER", "ELASTIC_LOAD_BALANCING_V2_LOAD_BALANCER", "ELASTIC_LOAD_BALANCING_V2_TARGET_GROUP", "ELASTICACHE_CACHE_CLUSTER", "ELASTICSEARCH_DOMAIN", "KINESIS_STREAM", "LAMBDA_FUNCTION", "OPEN_SEARCH_SERVICE_DOMAIN", "RDS_DB_INSTANCE", "RDS_DB_CLUSTER", "REDSHIFT_CLUSTER", "ROUTE53_HOSTED_ZONE", "ROUTE53_HEALTH_CHECK", "S3_BUCKET", "SAGEMAKER_ENDPOINT", "SNS_TOPIC", "SQS_QUEUE", "STEP_FUNCTIONS_ACTIVITY", "STEP_FUNCTIONS_STATE_MACHINE" ]

valid {
    input.Body.Filters.ResourcePermission == enum_ResourcePermission[_]
    input.Body.Filters.ResourceTypeFilters[_] == enum_ResourceTypeFilter[_]
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListNotificationChannels

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

ListOrganizationInsights

enum_InsightType := [ "REACTIVE", "PROACTIVE" ]

valid {
    input.Body.StatusFilter.Ongoing.Type == enum_InsightType[_]
    input.Body.StatusFilter.Closed.Type == enum_InsightType[_]
    input.Body.StatusFilter.Closed.EndTimeRange.FromTime == TIMESTAMP
    input.Body.StatusFilter.Closed.EndTimeRange.ToTime == TIMESTAMP
    input.Body.StatusFilter.Any.Type == enum_InsightType[_]
    input.Body.StatusFilter.Any.StartTimeRange.FromTime == TIMESTAMP
    input.Body.StatusFilter.Any.StartTimeRange.ToTime == TIMESTAMP
    input.Body.MaxResults == INTEGER
    input.Body.AccountIds[_] == STRING
    input.Body.OrganizationalUnitIds[_] == STRING
    input.Body.NextToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

ListRecommendations

enum_Locale := [ "DE_DE", "EN_US", "EN_GB", "ES_ES", "FR_FR", "IT_IT", "JA_JP", "KO_KR", "PT_BR", "ZH_CN", "ZH_TW" ]

valid {
    input.Body.InsightId == STRING
    input.Body.NextToken == STRING
    input.Body.Locale == enum_Locale[_]
    input.Body.AccountId == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

PutFeedback

enum_InsightFeedbackOption := [ "VALID_COLLECTION", "RECOMMENDATION_USEFUL", "ALERT_TOO_SENSITIVE", "DATA_NOISY_ANOMALY", "DATA_INCORRECT" ]

valid {
    input.Body.InsightFeedback.Id == STRING
    input.Body.InsightFeedback.Feedback == enum_InsightFeedbackOption[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

RemoveNotificationChannel

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

SearchInsights

enum_InsightSeverity := [ "LOW", "MEDIUM", "HIGH" ]
enum_InsightStatus := [ "ONGOING", "CLOSED" ]
enum_InsightType := [ "REACTIVE", "PROACTIVE" ]
enum_ServiceName := [ "API_GATEWAY", "APPLICATION_ELB", "AUTO_SCALING_GROUP", "CLOUD_FRONT", "DYNAMO_DB", "EC2", "ECS", "EKS", "ELASTIC_BEANSTALK", "ELASTI_CACHE", "ELB", "ES", "KINESIS", "LAMBDA", "NAT_GATEWAY", "NETWORK_ELB", "RDS", "REDSHIFT", "ROUTE_53", "S3", "SAGE_MAKER", "SNS", "SQS", "STEP_FUNCTIONS", "SWF" ]

valid {
    input.Body.StartTimeRange.FromTime == TIMESTAMP
    input.Body.StartTimeRange.ToTime == TIMESTAMP
    input.Body.Filters.Severities[_] == enum_InsightSeverity[_]
    input.Body.Filters.Statuses[_] == enum_InsightStatus[_]
    input.Body.Filters.ResourceCollection.CloudFormation.StackNames[_] == STRING
    input.Body.Filters.ResourceCollection.Tags[_].AppBoundaryKey == STRING
    input.Body.Filters.ResourceCollection.Tags[_].TagValues[_] == STRING
    input.Body.Filters.ServiceCollection.ServiceNames[_] == enum_ServiceName[_]
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.Type == enum_InsightType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

SearchOrganizationInsights

enum_InsightSeverity := [ "LOW", "MEDIUM", "HIGH" ]
enum_InsightStatus := [ "ONGOING", "CLOSED" ]
enum_InsightType := [ "REACTIVE", "PROACTIVE" ]
enum_ServiceName := [ "API_GATEWAY", "APPLICATION_ELB", "AUTO_SCALING_GROUP", "CLOUD_FRONT", "DYNAMO_DB", "EC2", "ECS", "EKS", "ELASTIC_BEANSTALK", "ELASTI_CACHE", "ELB", "ES", "KINESIS", "LAMBDA", "NAT_GATEWAY", "NETWORK_ELB", "RDS", "REDSHIFT", "ROUTE_53", "S3", "SAGE_MAKER", "SNS", "SQS", "STEP_FUNCTIONS", "SWF" ]

valid {
    input.Body.AccountIds[_] == STRING
    input.Body.StartTimeRange.FromTime == TIMESTAMP
    input.Body.StartTimeRange.ToTime == TIMESTAMP
    input.Body.Filters.Severities[_] == enum_InsightSeverity[_]
    input.Body.Filters.Statuses[_] == enum_InsightStatus[_]
    input.Body.Filters.ResourceCollection.CloudFormation.StackNames[_] == STRING
    input.Body.Filters.ResourceCollection.Tags[_].AppBoundaryKey == STRING
    input.Body.Filters.ResourceCollection.Tags[_].TagValues[_] == STRING
    input.Body.Filters.ServiceCollection.ServiceNames[_] == enum_ServiceName[_]
    input.Body.MaxResults == INTEGER
    input.Body.NextToken == STRING
    input.Body.Type == enum_InsightType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

StartCostEstimation

valid {
    input.Body.ResourceCollection.CloudFormation.StackNames[_] == STRING
    input.Body.ResourceCollection.Tags[_].AppBoundaryKey == STRING
    input.Body.ResourceCollection.Tags[_].TagValues[_] == STRING
    input.Body.ClientToken == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateEventSourcesConfig

enum_EventSourceOptInStatus := [ "ENABLED", "DISABLED" ]

valid {
    input.Body.EventSources.AmazonCodeGuruProfiler.Status == enum_EventSourceOptInStatus[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateResourceCollection

enum_UpdateResourceCollectionAction := [ "ADD", "REMOVE" ]

valid {
    input.Body.Action == enum_UpdateResourceCollectionAction[_]
    input.Body.ResourceCollection.CloudFormation.StackNames[_] == STRING
    input.Body.ResourceCollection.Tags[_].AppBoundaryKey == STRING
    input.Body.ResourceCollection.Tags[_].TagValues[_] == STRING
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}

UpdateServiceIntegration

enum_OptInStatus := [ "ENABLED", "DISABLED" ]
enum_ServerSideEncryptionType := [ "CUSTOMER_MANAGED_KEY", "AWS_OWNED_KMS_KEY" ]

valid {
    input.Body.ServiceIntegration.OpsCenter.OptInStatus == enum_OptInStatus[_]
    input.Body.ServiceIntegration.LogsAnomalyDetection.OptInStatus == enum_OptInStatus[_]
    input.Body.ServiceIntegration.KMSServerSideEncryption.KMSKeyId == STRING
    input.Body.ServiceIntegration.KMSServerSideEncryption.OptInStatus == enum_OptInStatus[_]
    input.Body.ServiceIntegration.KMSServerSideEncryption.Type == enum_ServerSideEncryptionType[_]
    input.ProviderMetadata.Account == STRING
    input.ProviderMetadata.AccessKeyId == STRING
    input.ProviderMetadata.Region == STRING
}