Skip to content

AWS.QuickSight reference

Source: src/AWS/QuickSight/Analysis.ts

An Amazon QuickSight analysis — an editable workspace built from a template or an inline definition, which can be published as a dashboard.

QuickSight requires an active account subscription in the region. Without one, create operations fail with the typed QuickSightSubscriptionRequired error.

const analysis = yield* Analysis("explore-sales", {
name: "Explore Sales",
sourceEntity: {
SourceTemplate: {
Arn: templateArn,
DataSetReferences: [
{ DataSetPlaceholder: "sales", DataSetArn: dataset.arn },
],
},
},
});

Source: src/AWS/QuickSight/CancelIngestion.ts

Runtime binding for quicksight:CancelIngestion.

Cancels an in-flight SPICE ingestion on the bound DataSet. AwsAccountId and DataSetId are injected from the binding. Provide the implementation with Effect.provide(AWS.QuickSight.CancelIngestionHttp).

// init — bind the operation to the dataset
const cancelIngestion = yield* AWS.QuickSight.CancelIngestion(dataSet);
// runtime
yield* cancelIngestion({ IngestionId: ingestionId });

Source: src/AWS/QuickSight/CreateIngestion.ts

Runtime binding for quicksight:CreateIngestion.

Triggers a SPICE refresh (ingestion) of the bound DataSet — e.g. after a pipeline lands new data. AwsAccountId and DataSetId are injected from the binding; the caller supplies a unique IngestionId. Poll the refresh with AWS.QuickSight.DescribeIngestion. Provide the implementation with Effect.provide(AWS.QuickSight.CreateIngestionHttp).

// init — bind the operation to the dataset
const createIngestion = yield* AWS.QuickSight.CreateIngestion(dataSet);
// runtime
const { IngestionId, IngestionStatus } = yield* createIngestion({
IngestionId: crypto.randomUUID(),
IngestionType: "FULL_REFRESH",
});

Source: src/AWS/QuickSight/Dashboard.ts

An Amazon QuickSight dashboard — a published, read-only view built from a template, an analysis, or an inline definition.

QuickSight requires an active account subscription in the region. Without one, create operations fail with the typed QuickSightSubscriptionRequired error.

const dashboard = yield* Dashboard("sales-overview", {
name: "Sales Overview",
sourceEntity: {
SourceTemplate: {
Arn: templateArn,
DataSetReferences: [
{
DataSetPlaceholder: "sales",
DataSetArn: dataset.arn,
},
],
},
},
});

Source: src/AWS/QuickSight/DataSet.ts

An Amazon QuickSight dataset — a prepared, queryable model built on top of one or more data sources.

QuickSight requires an active account subscription in the region. Without one, create operations fail with the typed QuickSightSubscriptionRequired error.

const dataset = yield* DataSet("sales", {
name: "Sales",
importMode: "SPICE",
physicalTableMap: {
sales: {
RelationalTable: {
DataSourceArn: source.arn,
Name: "sales",
InputColumns: [{ Name: "amount", Type: "DECIMAL" }],
},
},
},
});

Source: src/AWS/QuickSight/DataSource.ts

An Amazon QuickSight data source — a connection to an external data store that datasets read from.

QuickSight requires an active account subscription in the region. Without one, create operations fail with the typed QuickSightSubscriptionRequired error.

Athena Data Source

const source = yield* DataSource("analytics", {
name: "Athena Analytics",
type: "ATHENA",
dataSourceParameters: { AthenaParameters: { WorkGroup: "primary" } },
});

S3 Manifest Data Source

const source = yield* DataSource("s3-source", {
name: "S3 Sales Data",
type: "S3",
dataSourceParameters: {
S3Parameters: {
ManifestFileLocation: { Bucket: "my-bucket", Key: "manifest.json" },
},
},
});

Source: src/AWS/QuickSight/DescribeDashboardSnapshotJob.ts

Runtime binding for quicksight:DescribeDashboardSnapshotJob.

Reads the status (QUEUED, RUNNING, COMPLETED, FAILED) and configuration of a snapshot job started on the bound Dashboard. AwsAccountId and DashboardId are injected from the binding. Provide the implementation with Effect.provide(AWS.QuickSight.DescribeDashboardSnapshotJobHttp).

DescribeDashboardSnapshotJob: Dashboard Snapshots

Section titled “DescribeDashboardSnapshotJob: Dashboard Snapshots”
// init — bind the operation to the dashboard
const describeSnapshotJob =
yield* AWS.QuickSight.DescribeDashboardSnapshotJob(dashboard);
// runtime
const job = yield* describeSnapshotJob({ SnapshotJobId: jobId }).pipe(
Effect.repeat({
schedule: Schedule.spaced("5 seconds"),
until: (j) => j.JobStatus === "COMPLETED" || j.JobStatus === "FAILED",
times: 24,
}),
);

Source: src/AWS/QuickSight/DescribeDashboardSnapshotJobResult.ts

Runtime binding for quicksight:DescribeDashboardSnapshotJobResult.

Fetches the result of a COMPLETED snapshot job on the bound Dashboard — the S3 destination or pre-signed download URLs of the generated files, or the error details of a FAILED job. AwsAccountId and DashboardId are injected from the binding. Provide the implementation with Effect.provide(AWS.QuickSight.DescribeDashboardSnapshotJobResultHttp).

DescribeDashboardSnapshotJobResult: Dashboard Snapshots

Section titled “DescribeDashboardSnapshotJobResult: Dashboard Snapshots”
// init — bind the operation to the dashboard
const describeSnapshotJobResult =
yield* AWS.QuickSight.DescribeDashboardSnapshotJobResult(dashboard);
// runtime
const { Result } = yield* describeSnapshotJobResult({
SnapshotJobId: jobId,
});
const url = Result?.AnonymousUsers?.[0]?.FileGroups?.[0]?.Files?.[0];

Source: src/AWS/QuickSight/DescribeIngestion.ts

Runtime binding for quicksight:DescribeIngestion.

Reads the status, row counts, and error info of a SPICE ingestion on the bound DataSet. AwsAccountId and DataSetId are injected from the binding. Provide the implementation with Effect.provide(AWS.QuickSight.DescribeIngestionHttp).

// init — bind the operation to the dataset
const describeIngestion = yield* AWS.QuickSight.DescribeIngestion(dataSet);
// runtime
const { Ingestion } = yield* describeIngestion({
IngestionId: ingestionId,
}).pipe(
Effect.repeat({
schedule: Schedule.spaced("5 seconds"),
until: (r) =>
r.Ingestion?.IngestionStatus === "COMPLETED" ||
r.Ingestion?.IngestionStatus === "FAILED",
times: 24,
}),
);

Source: src/AWS/QuickSight/GenerateEmbedUrlForAnonymousUser.ts

Runtime binding for quicksight:GenerateEmbedUrlForAnonymousUser.

Generates a single-use embed URL for an anonymous (unregistered) visitor, defaulting the authorized resources and embedded experience to the bound Dashboard. Requires a QuickSight account with session-capacity pricing. Provide the implementation with Effect.provide(AWS.QuickSight.GenerateEmbedUrlForAnonymousUserHttp).

GenerateEmbedUrlForAnonymousUser: Embedding Dashboards

Section titled “GenerateEmbedUrlForAnonymousUser: Embedding Dashboards”
// init — bind the operation to the dashboard
const generateEmbedUrl =
yield* AWS.QuickSight.GenerateEmbedUrlForAnonymousUser(dashboard);
// runtime — namespace, authorized ARNs, and experience default to the dashboard
const { EmbedUrl } = yield* generateEmbedUrl({
SessionLifetimeInMinutes: 60,
});

Source: src/AWS/QuickSight/GenerateEmbedUrlForRegisteredUser.ts

Runtime binding for quicksight:GenerateEmbedUrlForRegisteredUser.

Generates a single-use embed URL for a registered QuickSight user, defaulting the embedded experience to the bound Dashboard. The URL contains a temporary bearer token valid for 5 minutes; the resulting session lasts 15 minutes to 10 hours (SessionLifetimeInMinutes). Provide the implementation with Effect.provide(AWS.QuickSight.GenerateEmbedUrlForRegisteredUserHttp).

GenerateEmbedUrlForRegisteredUser: Embedding Dashboards

Section titled “GenerateEmbedUrlForRegisteredUser: Embedding Dashboards”
// init — bind the operation to the dashboard
const generateEmbedUrl =
yield* AWS.QuickSight.GenerateEmbedUrlForRegisteredUser(dashboard);
// runtime — the embed experience defaults to the bound dashboard
const { EmbedUrl } = yield* generateEmbedUrl({
UserArn: userArn,
SessionLifetimeInMinutes: 60,
});

Source: src/AWS/QuickSight/ListIngestions.ts

Runtime binding for quicksight:ListIngestions.

Lists the SPICE ingestion history of the bound DataSet (most recent first) — useful for skipping a refresh that is already running or for surfacing the last refresh outcome. AwsAccountId and DataSetId are injected from the binding. Provide the implementation with Effect.provide(AWS.QuickSight.ListIngestionsHttp).

// init — bind the operation to the dataset
const listIngestions = yield* AWS.QuickSight.ListIngestions(dataSet);
// runtime
const { Ingestions } = yield* listIngestions({ MaxResults: 1 });
const latest = Ingestions?.[0];

Source: src/AWS/QuickSight/StartDashboardSnapshotJob.ts

Runtime binding for quicksight:StartDashboardSnapshotJob.

Starts an asynchronous snapshot job that exports the bound Dashboard as a PDF, CSV, or Excel file delivered to S3 or returned as a download URL. AwsAccountId and DashboardId are injected from the binding; poll the job with AWS.QuickSight.DescribeDashboardSnapshotJob. Provide the implementation with Effect.provide(AWS.QuickSight.StartDashboardSnapshotJobHttp).

StartDashboardSnapshotJob: Dashboard Snapshots

Section titled “StartDashboardSnapshotJob: Dashboard Snapshots”
// init — bind the operation to the dashboard
const startSnapshotJob =
yield* AWS.QuickSight.StartDashboardSnapshotJob(dashboard);
// runtime
const { SnapshotJobId } = yield* startSnapshotJob({
SnapshotJobId: crypto.randomUUID(),
UserConfiguration: { AnonymousUsers: [] },
SnapshotConfiguration: {
FileGroups: [{ Files: [{ FormatType: "PDF" }] }],
},
});