- 确认AWS账户是否被授权使用QuickSight服务,并检查IAM用户的权限。
- 确认QuickSight和S3等其他服务的区域是否相同,如果不同则修改区域。
- 尝试使用不同的AWS凭据登录控制台,以确保凭据是否存在问题。
- 确认create dataset方法中的参数是否正确,并检查数据源是否存在并且可被访问。
- 如果问题仍然存在,可以将调用代码与AWS支持团队进行商讨,以获得更多的帮助和支持。下面是一个参考的C#代码示例,可以在Windows中调用Amazon QuickSight API创建数据集:
using Amazon;
using Amazon.Auth;
using Amazon.Auth.AccessControlPolicy;
using Amazon.Auth.AccessControlPolicy.ActionIdentifiers;
using Amazon.Runtime;
using Amazon.QuickSight;
using Amazon.QuickSight.Model;
using Amazon.Runtime.CredentialManagement;
// set the profile name to the AWS credentials previously setup
const string profileName = "default";
// region where the QuickSight account exists
const string Region = "us-east-1";
var options = new CredentialProfileOptions
{
AccessKey = "AWS Access Key",
SecretKey = "AWS Secret Key"
};
// Authenticate with the AWS SDK for .NET
var profile = new CredentialProfile(profileName, options)
{
Region = Region
};
// Instantiate an Amazon QuickSight client with the authenticated profile
var sqsClient = new AmazonQuickSightClient(profile, RegionEndpoint.GetBySystemName(Region));
// Define the create dataset request
var createDataSetRequest = new CreateDataSetRequest
{
AwsAccountId = "1234567890",
DataSetId = "NewDataSet",
ImportMode = ImportMode.SPIDER,
PhysicalTableMap = new PhysicalTableMap
{
"new-table-name", new PhysicalTable
{
RelationalTable = new RelationalTable
{
DataSourceArn = "arn:aws:data_pipeline:us-east-1:123