Utilizzo di una vista QuickSight condivisa
Dopo aver creato una nuova vista condivisa, utilizza l'SDK Embedding per rendere la vista condivisa utilizzabile per altri utenti. Gli esempi seguenti configurano una vista condivisa utilizzabile per un pannello di controllo incorporato in Amazon QuickSight.
- With an appended URL
-
Aggiungi
sharedViewIdall'URL di incorporamento, in/views/{viewId}, ed esponi questo URL ai tuoi utenti. Gli utenti possono utilizzare questo URL per accedere alla vista condivisa.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
-
Passa
viewIdacontentOptionsper aprire l'esperienza con ilviewIdfornito.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; };
Creazione di una vista condivisa
Incorporamento con 1 clic