Create Snowflake Datasource with Username & Password (2FA)

@Xclipse I’m also having issues with the CreateDataSource operation.

Here is my API script with boto3:

response = client.create_data_source(
    AwsAccountId= 'XXX',
    DataSourceId= 'XXX',
    Name='OAuth Connection Test',
    Type='SNOWFLAKE',
    DataSourceParameters={
        'SnowflakeParameters': {
            'Host': 'xxx.xxx.snowflakecomputing.com',
            'Database': 'XXX',
            'Warehouse': 'XXX',
            'AuthenticationType': 'TOKEN',
            'DatabaseAccessControlRole': 'REPORTER',
            'OAuthParameters': {
            'TokenProviderUrl': 'https://xxx.xxx.snowflakecomputing.com/oauth/token-request'
        },
        }
    },
    Credentials={
        'SecretArn': 'arn:aws:secretsmanager:us-east-1:XXXXX:secret:prod/quicksight-5lHVHC'
    }
)

I then get these errors.

Unknown parameter in DataSourceParameters.SnowflakeParameters: "AuthenticationType", must be one of: Host, Database, Warehouse
Unknown parameter in DataSourceParameters.SnowflakeParameters: "DatabaseAccessControlRole", must be one of: Host, Database, Warehouse
Unknown parameter in DataSourceParameters.SnowflakeParameters: "OAuthParameters", must be one of: Host, Database, Warehouse

I searched around and found this thread that says “AuthenticationType” is not a valid param for DataSourceParameters and to move it to the Credentials object. So I did this:

response = client.create_data_source(
    AwsAccountId= 'XXX',
    DataSourceId= 'XXX',
    Name='OAuth Connection Test',
    Type='SNOWFLAKE',
    DataSourceParameters={
        'SnowflakeParameters': {
            'Host': 'XXX.XXX.snowflakecomputing.com',
            'Database': 'XXX',
            'Warehouse': 'XXX'
        }
    },
    Credentials={
        'AuthenticationType': 'XXX',
        'DatabaseAccessControlRole': 'XXX',
        'OAuthParameters': {
            'TokenProviderUrl': 'https://XXX.XXX.snowflakecomputing.com/oauth/token-request'
        },
        'SecretArn': 'arn:aws:secretsmanager:us-east-1:XXX:secret:prod/quicksight-5lHVHC'
    }
)

And got this:

Unknown parameter in Credentials: "AuthenticationType", must be one of: CredentialPair, CopySourceArn, SecretArn
Unknown parameter in Credentials: "DatabaseAccessControlRole", must be one of: CredentialPair, CopySourceArn, SecretArn
Unknown parameter in Credentials: "OAuthParameters", must be one of: CredentialPair, CopySourceArn, SecretArn