- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
ListDataSourcesCommand
Lists data sources in current Amazon Web Services Region that belong to this Amazon Web Services account.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QuickSightClient, ListDataSourcesCommand } from "@aws-sdk/client-quicksight"; // ES Modules import
// const { QuickSightClient, ListDataSourcesCommand } = require("@aws-sdk/client-quicksight"); // CommonJS import
const client = new QuickSightClient(config);
const input = { // ListDataSourcesRequest
AwsAccountId: "STRING_VALUE", // required
NextToken: "STRING_VALUE",
MaxResults: Number("int"),
};
const command = new ListDataSourcesCommand(input);
const response = await client.send(command);
// { // ListDataSourcesResponse
// DataSources: [ // DataSourceList
// { // DataSource
// Arn: "STRING_VALUE",
// DataSourceId: "STRING_VALUE",
// Name: "STRING_VALUE",
// Type: "ADOBE_ANALYTICS" || "AMAZON_ELASTICSEARCH" || "ATHENA" || "AURORA" || "AURORA_POSTGRESQL" || "AWS_IOT_ANALYTICS" || "GITHUB" || "JIRA" || "MARIADB" || "MYSQL" || "ORACLE" || "POSTGRESQL" || "PRESTO" || "REDSHIFT" || "S3" || "SALESFORCE" || "SERVICENOW" || "SNOWFLAKE" || "SPARK" || "SQLSERVER" || "TERADATA" || "TWITTER" || "TIMESTREAM" || "AMAZON_OPENSEARCH" || "EXASOL" || "DATABRICKS" || "STARBURST" || "TRINO" || "BIGQUERY",
// Status: "CREATION_IN_PROGRESS" || "CREATION_SUCCESSFUL" || "CREATION_FAILED" || "UPDATE_IN_PROGRESS" || "UPDATE_SUCCESSFUL" || "UPDATE_FAILED" || "DELETED",
// CreatedTime: new Date("TIMESTAMP"),
// LastUpdatedTime: new Date("TIMESTAMP"),
// DataSourceParameters: { // DataSourceParameters Union: only one key present
// AmazonElasticsearchParameters: { // AmazonElasticsearchParameters
// Domain: "STRING_VALUE", // required
// },
// AthenaParameters: { // AthenaParameters
// WorkGroup: "STRING_VALUE",
// RoleArn: "STRING_VALUE",
// },
// AuroraParameters: { // AuroraParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// AuroraPostgreSqlParameters: { // AuroraPostgreSqlParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// AwsIotAnalyticsParameters: { // AwsIotAnalyticsParameters
// DataSetName: "STRING_VALUE", // required
// },
// JiraParameters: { // JiraParameters
// SiteBaseUrl: "STRING_VALUE", // required
// },
// MariaDbParameters: { // MariaDbParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// MySqlParameters: { // MySqlParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// OracleParameters: { // OracleParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// UseServiceName: true || false,
// },
// PostgreSqlParameters: { // PostgreSqlParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// PrestoParameters: { // PrestoParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Catalog: "STRING_VALUE", // required
// },
// RdsParameters: { // RdsParameters
// InstanceId: "STRING_VALUE", // required
// Database: "STRING_VALUE", // required
// },
// RedshiftParameters: { // RedshiftParameters
// Host: "STRING_VALUE",
// Port: Number("int"),
// Database: "STRING_VALUE", // required
// ClusterId: "STRING_VALUE",
// IAMParameters: { // RedshiftIAMParameters
// RoleArn: "STRING_VALUE", // required
// DatabaseUser: "STRING_VALUE",
// DatabaseGroups: [ // DatabaseGroupList
// "STRING_VALUE",
// ],
// AutoCreateDatabaseUser: true || false,
// },
// IdentityCenterConfiguration: { // IdentityCenterConfiguration
// EnableIdentityPropagation: true || false,
// },
// },
// S3Parameters: { // S3Parameters
// ManifestFileLocation: { // ManifestFileLocation
// Bucket: "STRING_VALUE", // required
// Key: "STRING_VALUE", // required
// },
// RoleArn: "STRING_VALUE",
// },
// ServiceNowParameters: { // ServiceNowParameters
// SiteBaseUrl: "STRING_VALUE", // required
// },
// SnowflakeParameters: { // SnowflakeParameters
// Host: "STRING_VALUE", // required
// Database: "STRING_VALUE", // required
// Warehouse: "STRING_VALUE", // required
// AuthenticationType: "PASSWORD" || "TOKEN" || "X509",
// DatabaseAccessControlRole: "STRING_VALUE",
// OAuthParameters: { // OAuthParameters
// TokenProviderUrl: "STRING_VALUE", // required
// OAuthScope: "STRING_VALUE",
// IdentityProviderVpcConnectionProperties: { // VpcConnectionProperties
// VpcConnectionArn: "STRING_VALUE", // required
// },
// IdentityProviderResourceUri: "STRING_VALUE",
// },
// },
// SparkParameters: { // SparkParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// },
// SqlServerParameters: { // SqlServerParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// TeradataParameters: { // TeradataParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// TwitterParameters: { // TwitterParameters
// Query: "STRING_VALUE", // required
// MaxRows: Number("int"), // required
// },
// AmazonOpenSearchParameters: { // AmazonOpenSearchParameters
// Domain: "STRING_VALUE", // required
// },
// ExasolParameters: { // ExasolParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// },
// DatabricksParameters: { // DatabricksParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// SqlEndpointPath: "STRING_VALUE", // required
// },
// StarburstParameters: { // StarburstParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Catalog: "STRING_VALUE", // required
// ProductType: "GALAXY" || "ENTERPRISE",
// DatabaseAccessControlRole: "STRING_VALUE",
// AuthenticationType: "PASSWORD" || "TOKEN" || "X509",
// OAuthParameters: {
// TokenProviderUrl: "STRING_VALUE", // required
// OAuthScope: "STRING_VALUE",
// IdentityProviderVpcConnectionProperties: {
// VpcConnectionArn: "STRING_VALUE", // required
// },
// IdentityProviderResourceUri: "STRING_VALUE",
// },
// },
// TrinoParameters: { // TrinoParameters
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Catalog: "STRING_VALUE", // required
// },
// BigQueryParameters: { // BigQueryParameters
// ProjectId: "STRING_VALUE", // required
// DataSetRegion: "STRING_VALUE",
// },
// },
// AlternateDataSourceParameters: [ // DataSourceParametersList
// {// Union: only one key present
// AmazonElasticsearchParameters: {
// Domain: "STRING_VALUE", // required
// },
// AthenaParameters: {
// WorkGroup: "STRING_VALUE",
// RoleArn: "STRING_VALUE",
// },
// AuroraParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// AuroraPostgreSqlParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// AwsIotAnalyticsParameters: {
// DataSetName: "STRING_VALUE", // required
// },
// JiraParameters: {
// SiteBaseUrl: "STRING_VALUE", // required
// },
// MariaDbParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// MySqlParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// OracleParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// UseServiceName: true || false,
// },
// PostgreSqlParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// PrestoParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Catalog: "STRING_VALUE", // required
// },
// RdsParameters: {
// InstanceId: "STRING_VALUE", // required
// Database: "STRING_VALUE", // required
// },
// RedshiftParameters: {
// Host: "STRING_VALUE",
// Port: Number("int"),
// Database: "STRING_VALUE", // required
// ClusterId: "STRING_VALUE",
// IAMParameters: {
// RoleArn: "STRING_VALUE", // required
// DatabaseUser: "STRING_VALUE",
// DatabaseGroups: [
// "STRING_VALUE",
// ],
// AutoCreateDatabaseUser: true || false,
// },
// IdentityCenterConfiguration: {
// EnableIdentityPropagation: true || false,
// },
// },
// S3Parameters: {
// ManifestFileLocation: {
// Bucket: "STRING_VALUE", // required
// Key: "STRING_VALUE", // required
// },
// RoleArn: "STRING_VALUE",
// },
// ServiceNowParameters: {
// SiteBaseUrl: "STRING_VALUE", // required
// },
// SnowflakeParameters: {
// Host: "STRING_VALUE", // required
// Database: "STRING_VALUE", // required
// Warehouse: "STRING_VALUE", // required
// AuthenticationType: "PASSWORD" || "TOKEN" || "X509",
// DatabaseAccessControlRole: "STRING_VALUE",
// OAuthParameters: {
// TokenProviderUrl: "STRING_VALUE", // required
// OAuthScope: "STRING_VALUE",
// IdentityProviderVpcConnectionProperties: {
// VpcConnectionArn: "STRING_VALUE", // required
// },
// IdentityProviderResourceUri: "STRING_VALUE",
// },
// },
// SparkParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// },
// SqlServerParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// TeradataParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Database: "STRING_VALUE", // required
// },
// TwitterParameters: {
// Query: "STRING_VALUE", // required
// MaxRows: Number("int"), // required
// },
// AmazonOpenSearchParameters: {
// Domain: "STRING_VALUE", // required
// },
// ExasolParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// },
// DatabricksParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// SqlEndpointPath: "STRING_VALUE", // required
// },
// StarburstParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Catalog: "STRING_VALUE", // required
// ProductType: "GALAXY" || "ENTERPRISE",
// DatabaseAccessControlRole: "STRING_VALUE",
// AuthenticationType: "PASSWORD" || "TOKEN" || "X509",
// OAuthParameters: {
// TokenProviderUrl: "STRING_VALUE", // required
// OAuthScope: "STRING_VALUE",
// IdentityProviderVpcConnectionProperties: {
// VpcConnectionArn: "STRING_VALUE", // required
// },
// IdentityProviderResourceUri: "STRING_VALUE",
// },
// },
// TrinoParameters: {
// Host: "STRING_VALUE", // required
// Port: Number("int"), // required
// Catalog: "STRING_VALUE", // required
// },
// BigQueryParameters: {
// ProjectId: "STRING_VALUE", // required
// DataSetRegion: "STRING_VALUE",
// },
// },
// ],
// VpcConnectionProperties: "<VpcConnectionProperties>",
// SslProperties: { // SslProperties
// DisableSsl: true || false,
// },
// ErrorInfo: { // DataSourceErrorInfo
// Type: "ACCESS_DENIED" || "COPY_SOURCE_NOT_FOUND" || "TIMEOUT" || "ENGINE_VERSION_NOT_SUPPORTED" || "UNKNOWN_HOST" || "GENERIC_SQL_FAILURE" || "CONFLICT" || "UNKNOWN",
// Message: "STRING_VALUE",
// },
// SecretArn: "STRING_VALUE",
// },
// ],
// NextToken: "STRING_VALUE",
// RequestId: "STRING_VALUE",
// Status: Number("int"),
// };
ListDataSourcesCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
AwsAccountId Required | string | undefined | The Amazon Web Services account ID. |
MaxResults | number | undefined | The maximum number of results to be returned per request. |
NextToken | string | undefined | The token for the next set of results, or null if there are no more results. |
ListDataSourcesCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
DataSources | DataSource[] | undefined | A list of data sources. |
NextToken | string | undefined | The token for the next set of results, or null if there are no more results. |
RequestId | string | undefined | The Amazon Web Services request ID for this operation. |
Status | number | undefined | The HTTP status of the request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon QuickSight service, that your policies have the correct permissions, and that you are using the correct credentials. |
InternalFailureException | server | An internal failure occurred. |
InvalidNextTokenException | client | The |
InvalidParameterValueException | client | One or more parameters has a value that isn't valid. |
ThrottlingException | client | Access is throttled. |
QuickSightServiceException | Base exception class for all service exceptions from QuickSight service. |