import { DocumentDuplicateIcon } from "@heroicons/react/24/outline";
const SecurityQuery = () => (
<>
SELECT
*
FROM
aws_elbv2_load_balancers
WHERE
scheme = 'internet-facing'
>
)
const MarketingQuery = () => (
<>
SELECT
*
FROM
shopify_abandoned_checkouts
WHERE
total_price {'>'} 1000
>
)
const QueryAcrossApps = () => (
<>
SELECT
arn
FROM
aws_iam_users
JOIN aws_iam_user_tags ON aws_iam_users.id = aws_iam_user_tags.user_id
JOIN okta_users ON aws_iam_users.tags.value = okta_users.profile_email
WHERE
aws_iam_users.tags_key = "email"
>
)
const QUERIES_EXAMPLES = [
{
code: 'SELECT * FROM aws_elbv2_load_balancers WHERE scheme = "internet-facing"',
html: ,
title: 'Security',
description: 'Find all public facing AWS load balancers',
},
{
code: 'SELECT * FROM shopify_abandoned_checkouts WHERE total_price > 1000',
html: ,
title: 'Marketing',
description: 'Find all abandoned checkouts with a total price greater than $1000',
},
{
code: 'SELECT arn FROM aws_iam_users JOIN aws_iam_user_tags ON aws_iam_users.id = aws_iam_user_tags.user_id JOIN okta_users ON aws_iam_users.tags.value = okta_users.profile_email WHERE aws_iam_users.tags_key = "email"',
html: ,
title: 'Query across clouds and SaaS apps',
description: 'Find dormant access keys by joining your AWS IAM users and Okta directory ',
},
]
export const QueriesExamples = ({ onClick }) => {
return (
{QUERIES_EXAMPLES.map(({ code, html, title, description }) => (
onClick(code)}
title={title}
description={description}
key={title}
>
{html}
))}
)
}
const QueryItem = ({ children, onClick, description, title }) => {
const codeClasses = "w-fit h-full px-4 py-3 font-mono text-sm font-medium text-gray-600 bg-black bg-opacity-5 dark:bg-white dark:text-gray-300 dark:bg-opacity-5 betterhover:hover:bg-gray-50 betterhover:dark:hover:bg-gray-900 md:py-3 md:text-base md:leading-6 md:px-10"
return (
)
}