import Link from '@ui/components/Typography/Link' import { ScaffoldSectionDescription, ScaffoldSectionTitle } from 'components/layouts/Scaffold' import { getKeys, useAPIKeysQuery } from 'data/api-keys/api-keys-query' import { useProjectSettingsV2Query } from 'data/config/project-settings-v2-query' import { useSelectedProjectQuery } from 'hooks/misc/useSelectedProject' import { Card } from 'ui' import { getCatalogURI, getConnectionURL } from '../StorageSettings/StorageSettings.utils' import { DESCRIPTIONS } from './constants' import { CopyEnvButton } from './CopyEnvButton' import { DecryptedReadOnlyInput } from './DecryptedReadOnlyInput' const wrapperMeta = { options: [ { name: 'vault_token', label: 'Vault Token', secureEntry: false }, { name: 'warehouse', label: 'Warehouse', secureEntry: false }, { name: 's3.endpoint', label: 'S3 Endpoint', secureEntry: false }, { name: 'catalog_uri', label: 'Catalog URI', secureEntry: false }, ], } export const SimpleConfigurationDetails = ({ bucketName }: { bucketName: string }) => { const { data: project } = useSelectedProjectQuery() const { data: apiKeys } = useAPIKeysQuery({ projectRef: project?.ref }) const { data: settings } = useProjectSettingsV2Query({ projectRef: project?.ref }) const protocol = settings?.app_config?.protocol ?? 'https' const endpoint = settings?.app_config?.storage_endpoint || settings?.app_config?.endpoint const { serviceKey } = getKeys(apiKeys) const serviceApiKey = serviceKey?.api_key ?? 'SUPABASE_CLIENT_SERVICE_KEY' const values: Record = { vault_token: serviceApiKey, warehouse: bucketName, 's3.endpoint': getConnectionURL(project?.ref ?? '', protocol, endpoint), catalog_uri: getCatalogURI(project?.ref ?? '', protocol, endpoint), } return (
Configuration Details You can use the following configuration details to connect to the bucket from your code.

To get AWS credentials, you can create them using the{' '} S3 Access Keys {' '} feature.

{wrapperMeta.options.map((option) => { return ( ) })}
) }