Utilisation d'une vue QuickSight partagée
Après avoir créé une nouvelle vue partagée, utilisez le SDK d'intégration pour rendre la vue partagée utilisable par les autres utilisateurs. Les exemples ci-dessous configurent une vue partagée consommable pour un tableau de bord intégré dans Amazon QuickSight.
- With an appended URL
-
Ajoutez-la
sharedViewIdà l'URL d'intégration, sous/views/{viewId}, et exposez cette URL à vos utilisateurs. Les utilisateurs peuvent utiliser cette URL pour accéder à cette vue partagée.const response = await dashboardFrame.createSharedView(); const newEmbedUrl = await generateNewEmbedUrl(); const formattedUrl = new URL(newEmbedUrl); formattedUrl.pathname = formattedUrl.pathname.concat('/views/' + response.message.sharedViewId); const baseUrl = formattedUrl.href; alert("Click to view this QuickSight shared view", baseUrl); - With the contentOptions SDK
-
Passez un
viewIdà uncontentOptionspour ouvrir l'expérience avec leviewIddonné.const contentOptions = { toolbarOptions: { ... }, viewId: sharedViewId, }; const embeddedDashboard = await embeddingContext.embedDashboard( {container: containerRef.current}, contentOptions ); - With the InitialPath property
-
const shareView = async() => { const returnValue = await consoleFrame.createSharedView(); const {dashboardId, sharedViewId} = returnValue.message; const newEmbedUrl = await generateNewEmbedUrl(`/dashboards/${dashboardId}/views/${sharedViewId}`); setShareUrl(newEmbedUrl); }; const generateNewEmbedUrl = async (initialPath) => { const generateUrlPayload = { experienceConfiguration: { QuickSightConsole: { InitialPath: initialPath, FeatureConfigurations: { "SharedView": { "Enabled": true }, }, }, } const result: GenerateEmbedUrlResult = await generateEmbedUrlForRegisteredUser(generateUrlPayload); return result.url; };
Création d'une vue partagée
Intégration en un clic